lib/logstash/inputs/amqp.rb in logstash-lite-0.2.20110112115019 vs lib/logstash/inputs/amqp.rb in logstash-lite-0.2.20110122143801

- old
+ new

@@ -25,10 +25,16 @@ end # def initialize public def register @logger.info("Registering input #{@url}") - @amqp = AMQP.connect(:host => @url.host) + amqpsettings = { + :host => @url.host, + :port => (@url.port or 5672), + } + amqpsettings[:user] = @url.user if @url.user + amqpsettings[:pass] = @url.password if @url.password + @amqp = AMQP.connect(amqpsettings) @mq = MQ.new(@amqp) @target = nil @target = @mq.queue(UUIDTools::UUID.timestamp_create) case @mqtype