Class: LogStash::Inputs::Stomp
- Defined in:
- lib/logstash/inputs/stomp.rb
Constant Summary
Constants included from Config::Mixin
Instance Attribute Summary
Attributes inherited from Base
Attributes included from Config::Mixin
Attributes inherited from Plugin
Instance Method Summary collapse
Methods inherited from Base
Methods included from Config::Mixin
Methods inherited from Plugin
#eql?, #finished, #finished?, #hash, #initialize, #inspect, lookup, #reload, #running?, #shutdown, #teardown, #terminating?, #to_s
Constructor Details
This class inherits a constructor from LogStash::Inputs::Base
Instance Method Details
#register ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/logstash/inputs/stomp.rb', line 48 def register require "onstomp" @client = OnStomp::Client.new("stomp://#{@host}:#{@port}", :login => @user, :passcode => @password.value) @client.host = @vhost if @vhost @stomp_url = "stomp://#{@user}:#{@password}@#{@host}:#{@port}/#{@destination}" # Handle disconnects @client.on_connection_closed { connect subscription_handler # is required for re-subscribing to the destination } connect end |
#run(output_queue) ⇒ Object
80 81 82 83 |
# File 'lib/logstash/inputs/stomp.rb', line 80 def run(output_queue) @output_queue = output_queue subscription_handler end |