On 9/6/07, Juergen Mayrbaeurl <[EMAIL PROTECTED]> wrote:
>
> Hi!
>
> Our application has to make sure that all consumers with durable topic
> subscriptions get messages in strict order even when a message has to be
> delivered.
> E.g.
> Publisher puts message 1 to 10 on topic. Consumer opens a session, gets
> message 1, makes a client acknowledment, gets message 2, makes a client
> acknowledment, and so on. On message 3 a runtime exception occurs and no
> client acknowledment is done, but the session and the connection are closed.
> The next time the consumer opens a session message 4 gets delivered before
> message 3.
>
> What do we have to do to get message 3 (and not 4) as the first message? Do
> we have to use a special redelivery policy?

It should just work; though FWIW I'd recommend you switch from using
acknowledge to using JMS transactions. They are typically faster as
well as allowing you to do a rollback (rather than having to close the
session & connection on failure)
http://activemq.apache.org/should-i-use-transactions.html


> PS: We're using ActiveMQ 4.1.0

I'd also recommend you upgrade to 4.1.1
-- 
James
-------
http://macstrac.blogspot.com/

Reply via email to