On Thu, Feb 25, 2010 at 3:12 PM, jerdavis <[email protected]> wrote: > > > I need a little help with the Native Java API. > I chose not to use JMS because I'm trying to accomplish a specific messaging > pattern that doesn't work in JMS:
There is no supported Native Java API. The use case you described below can be done with JMS. You need to use CLIENT_ACK as the acknowledge mode when creating the session. Then when you ack the millionth message, all the messages will be acked. > I would like to read from a queue, and not ACK the messages until a later > time, and I don't want to have to individually ack each message at the end. > Should my app crash or otherwise signal the Broker before the ACK, it may > also ask the broker to redeliver all the messages. > > So for example.. Read 1 million messages, and on the 1 millionth, send one > ack, and the Broker deletes all 1M from the Queue. > However if during processing the 500,000th message my application throws an > exception, I would signal the broker to start over from Msg #1. > > Would this sort of thing be possible? > > I was able to implement this on rabbitMQ with AMQP0-8 by: > channel.basicGet(NO_ACK) > then > channel.basicAck( DeliveryTag(a long) from the Millionth Msg, > true(ACK_MULTIPLE) ) > > Many thanks! > -- > View this message in context: > http://n2.nabble.com/Need-Help-Using-Native-Java-API-tp4635059p4635059.html > Sent from the Apache Qpid users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > Apache Qpid - AMQP Messaging Implementation > Project: http://qpid.apache.org > Use/Interact: mailto:[email protected] > > -- Regards, Rajith Attapattu Red Hat http://rajith.2rlabs.com/ --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:[email protected]
