[rabbitmq-discuss] What is ticket object, and how does it get created?

McMahon, James S (TASC) james.mcmahon at TASC.COM
Mon May 14 17:59:28 BST 2012

The following sample code refers to an object "ticket", but I have not been able to find any examples of how ticket gets created, or what it represents. I found in the AMQP docs that it is an integer, but that is all. Can anyone provide me with an example of how to create ticket, and what it represents?

boolean autoAck = false;
channel.basicConsume(ticket, queueName, autoAck,
     new DefaultConsumer(channel) {
         public void handleDelivery(String consumerTag,
                                    Envelope envelope,
                                    AMQP.BasicProperties properties,
                                    byte[] body)
             throws IOException
             String routingKey = envelope.getRoutingKey();
             String contentType = properties.contentType;
             long deliveryTag = envelope.getDeliveryTag();
             // my custom handling stuff here
             channel.basicAck(deliveryTag, false);

Thanks very much for any help or reference to any further examples.

Jim Mc.

CONFIDENTIALITY NOTICE: This message and any attachments or files transmitted with it (collectively, the "Message") are intended only for the addressee and may contain information that is privileged, proprietary and/or prohibited from disclosure by law or contract. If you are not the intended recipient: (a) please do not read, copy or retransmit the Message; (b) permanently delete and/or destroy all electronic and hard copies of the Message; (c) notify us by return email; and (d) you are hereby notified that any dissemination, distribution or copying of the Message is strictly prohibited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120514/c1ce28ad/attachment.htm>

More information about the rabbitmq-discuss mailing list