mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
- AMQPize.
This commit is contained in:
parent
257c2de5d0
commit
eeeb7b4cd3
3 changed files with 5 additions and 9 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue