[rabbitmq-discuss] Ruby library
Phillip N.
pneumann at gmail.com
Fri Oct 17 14:26:53 BST 2008
Hi,
I dont know if its ok to send this question here. if not sorry.. :)
Im trying to send durable messages to durable queues, using tmm1-amqp
ruby library, without much luck.
Im using the attached script to test this.
The idea is to get the message after rabbitmq restarts, but im not
getting it.
When i run the test, and do not restart rabbitmq, then the message
arrives as this:
"got the msg! 'body'"
#<AMQP::Protocol::Header:0x857ccc4
@klass=AMQP::Protocol::Basic,
@properties=
{:consumer_tag=>"q4",
:redelivered=>false,
:exchange=>"ex4",
:priority=>0,
:delivery_mode=>2,
:delivery_tag=>1,
:content_type=>"application/octet-stream",
:routing_key=>"this.one.key4"},
@size=4,
@weight=0>
delivery_mode=2 meas its a durable message, isnit?
Why is the script not getting the message after rabbitmq restarts?
Im using version 0.5.5.
With 0.5.9 cannot test it becouse AMQP.stop {EM.stop_event_loop } is
generating an exception:
/usr/local/lib/ruby/gems/1.8/gems/tmm1-amqp-0.5.9/lib/amqp/client.rb:72:in `connection_completed': Disconnected from server (AMQP::Error)
from /usr/local/lib/ruby/gems/1.8/gems/tmm1-amqp-0.5.9/lib/amqp/client.rb:42:in `call'
from /usr/local/lib/ruby/gems/1.8/gems/tmm1-amqp-0.5.9/lib/amqp/client.rb:42:in `process_frame'
from /usr/local/lib/ruby/gems/1.8/gems/tmm1-amqp-0.5.9/lib/amqp/client.rb:100:in `receive_data'
from /usr/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.2/lib/eventmachine.rb:231:in `run_machine'
from /usr/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.2/lib/eventmachine.rb:231:in `run'
from broker_test.rb:12
Any tip is welcome. Thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: broker_test.rb
Type: application/x-ruby
Size: 933 bytes
Desc: not available
Url : http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20081017/05991229/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: broker_test.rb
Type: application/x-ruby
Size: 933 bytes
Desc: not available
Url : http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20081017/05991229/attachment-0001.bin
More information about the rabbitmq-discuss
mailing list