Class: LogStash::Inputs::Stomp

Inherits:
Base
  • Object
show all
Defined in:
lib/logstash/inputs/stomp.rb

Defined Under Namespace

Classes: InputHandler

Instance Attribute Summary

Attributes inherited from Base

#logger

Instance Method Summary collapse

Methods inherited from Base

#receive, #tag

Constructor Details

#initialize(url, config = {}, &block) ⇒ Stomp

Returns a new instance of Stomp.



7
8
9
10
# File 'lib/logstash/inputs/stomp.rb', line 7

def initialize(url, config={}, &block)
  super
  @logger.debug(["Connecting", { :url => @url }])
end

Instance Method Details

#registerObject



13
14
15
16
# File 'lib/logstash/inputs/stomp.rb', line 13

def register
  @logger.info(["Registering input", { :url => @url}])
  EventMachine::connect(@url.host, @url.port, InputHandler, self, @logger, @url)
end