[openamq-dev] Fwd: Ruby QPID libraries
Carl Bourne
cbourne at intellect.co.uk
Wed Apr 30 23:08:50 CEST 2008
Thanks again Gordon - That make things clearer.
Carl
On 30/04/2008 20:00, "Gordon Sim" <gsim at redhat.com> wrote:
Carl Bourne wrote:
> 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")
That sends a connection.start command to the broker and authenticates
using SASL PLAIN as user guest with password guest.
> msg = c.queue("ctag").pop()
Messages that are delivered by the broker are identified by a 'tag' that
the consumer specified when issuing the basic_consume command. On
receipt at the client, messages are queued by delivery tag.
The c.queue("ctag") get the queue for the tag 'ctag'. The first message
from that is then popped off (blocks if no-message exists).
> ch.basic_ack(msg.delivery_tag)
This acknowledges the message, allowing the broker to safely dequeue it.
_______________________________________________
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/e758756e/attachment.htm
More information about the openamq-dev
mailing list