[rabbitmq-discuss] Initiating queue monitoring, but returning to main method with indication of success

McMahon, James S (TASC) james.mcmahon at TASC.COM
Fri May 11 18:50:08 BST 2012


     Simon, in this example we had referenced in this discussion thread - what is "ticket", and how does that get created?

     I tried to visit the AMQP site to find some class library description but did not find the AMQP methods detailed there.

     Thank you for your help.

Jim


    boolean autoAck = false;
channel.basicConsume(ticket, queueName, autoAck,
     new DefaultConsumer(channel) {
         @Override
         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);
         }
     });




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.


More information about the rabbitmq-discuss mailing list