diff --git a/bin/agent.rb b/bin/agent.rb index 202e98f10..b116c2f90 100755 --- a/bin/agent.rb +++ b/bin/agent.rb @@ -37,7 +37,7 @@ class Agent < LogStash::Net::MessageClient puts "Indexing: #{string}" - sendmsg("/queue/logstash", ier) + sendmsg("logstash", ier) end # def index def IndexEventResponseHandler(msg) diff --git a/lib/net/servers/parser.rb b/lib/net/servers/parser.rb index f66391f1c..3cf6b5be3 100644 --- a/lib/net/servers/parser.rb +++ b/lib/net/servers/parser.rb @@ -17,12 +17,8 @@ module LogStash; module Net; module Servers SYNCDELAY = 10 def initialize(configfile) - #def initialize(*args) - # 'super' is not the same as 'super()', and we want super(). @config = LogStash::Config::IndexerConfig.new(configfile) - super(username="", password="", - host="localhost", port=61613) - #host=@config.stomphost, port=@config.stompport) + super() @indexes = Hash.new @lines = Hash.new { |h,k| h[k] = 0 } @indexcount = 0 @@ -66,7 +62,7 @@ module LogStash; module Net; module Servers # Now we have a hash for the log data, send it to the indexer request.log_data = entry - sendmsg("/queue/logstash-index", request) + sendmsg("logstash-index", request) #@indexes[log_type] << entry end diff --git a/lib/net/socket.rb b/lib/net/socket.rb index b6986bfa5..71496974f 100644 --- a/lib/net/socket.rb +++ b/lib/net/socket.rb @@ -90,7 +90,7 @@ module LogStash; module Net def handle_new_subscriptions todo = @want_queues - @queues todo.each do |queue| - #puts "Subscribing to queue #{queue}" + puts "Subscribing to queue #{queue}" mq_q = @mq.queue(queue) mq_q.subscribe(:ack =>true) { |hdr, msg| handle_message(hdr, msg) } @queues << queue @@ -98,7 +98,7 @@ module LogStash; module Net todo = @want_topics - @topics todo.each do |topic| - #puts "Subscribing to topic #{topic}" + puts "Subscribing to topic #{topic}" exchange = @mq.topic("amq.topic") mq_q = @mq.queue("#{@id}-#{topic}", :exclusive => true,