[openamq-dev] Fwd: Ruby QPID libraries

Carl Bourne cbourne at intellect.co.uk
Wed Apr 30 19:49:38 CEST 2008


Thanks Gordon - that fixed it!

Still trying to understand the options available in the client. Could you tell me what the following lines in the code do please?

c.start("\0guest\0guest", mechanism="PLAIN")

msg = c.queue("ctag").pop()

ch.basic_ack(msg.delivery_tag)


Best Regards,

Carl

On 30/04/2008 18:30, "Gordon Sim" <gsim at redhat.com> wrote:

Carl Bourne wrote:
> Gordon,
>
> Just ran your attached test script:
>
> ruby newsend.rb ../amqp0-8.xml 2
> newsend.rb:15: undefined method `body=' for #<Qpid::Content:0xb7b93270>
> (NoMethodError)
>     from newsend.rb:14:in `times'
>     from newsend.rb:14
>
> Any pointers as to why it failed?

My stupidity I'm afraid. I had modified the client to allow the body to
be set as a test. Thats not a good idea though and didn't make a great
deal of difference anyway.

Please replace:

content = Qpid::Content.new({}, "Test Message")
iterations.times {|i|
   content.body = "Test Message #{i}"
   ch.basic_publish(:routing_key => "test-queue", :content => content )
}

with:

iterations.times {|i|
   content = Qpid::Content.new({}, "Test Message #{i}")
   ch.basic_publish(:routing_key => "test-queue", :content => content )
}

Apologies for that!
_______________________________________________
openamq-dev mailing list
openamq-dev at lists.openamq.org
http://lists.openamq.org/mailman/listinfo/openamq-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openamq.org/pipermail/openamq-dev/attachments/20080430/2e315629/attachment.htm 


More information about the openamq-dev mailing list