On Wed, 2011-03-16 at 16:40 -0400, Rafael Schloming wrote: > On 03/16/2011 04:26 PM, Rajith Attapattu wrote: > > While trying to answer a question on the user list, I was trying to test the > > behaviour around rejecting a message. > > It seems the 'reject' and 'release' methods are missing from the session > > class in the new API. > > > > Is this a deliberate omission ? is there an alternate way of achieving the > > same ? > > (The C++ API does have these methods, all though the JMS API doesn't really > > have anything of the sort). > > > > Regards, > > > > Rajith > > > > There aren't methods, but you can reject and release messages this way: > > session.acknowledge(msg) > session.acknowledge(msg, Disposition(REJECTED)) > session.acknowledge(msg, Disposition(RELEASED)) > session.acknowledge(msg, Disposition(RELEASED, set_redelivered=True)) > > The pattern is supposed to allow a bit more flexibility since the set of > available dispositions is a bit more open ended than just reject and > release.
As Rajith says this is nice, but perhaps there should be some wrappers for these as they are not intuitive for someone either coming from the C ++ API or the old API (IMO). Andrew --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:[email protected]
