[jboss-user] [JBoss Messaging] - Re: question with rollback/redelivery semantics

rlucente do-not-reply at jboss.com
Tue Apr 1 09:27:39 EDT 2008


Ok, I'm using the Apache Muse product to build a WS-Notification 1.3 based message broker.  JBoss Messaging is used as a message store to buffer messages between senders/receivers.  Clients can publish and subscribe using the web services offered by Muse.  When a message is published to the system, Muse determines the client endpoints that should receive the message.  These messages are written to client specific JMS queues for eventual delivery.  A separate thread pool has periodically scheduled client delivery tasks that, within a single transaction, read messages from a client-specific queue and then attempt to deliver a batch of messages to the client using the WS-Notify SOAP message.  If the delivery fails (client unavailable) the transaction is rolled back.  Use of the thread pool results in different threads attempting delivery to the remote endpoint, so I use a thread local variable to cache the session and a map of session to messageconsumer for each client delivery task.  JMS is providing time-to-live, prioritization, and message persistence.

I modified the DefaultMaxDeliveryAttempts to -1 to prevent rollbacks from causing messages to be sent to the DLQ.

The rollback semantics are where questions arise.  When I rollback, the messages appear to be marked for redelivery only by the messageconsumer that read them.  The messages are not visible to other messageconsumers at that point.

I believe I attempted closing the consumers and then rolling back the session, but that seemed to destroy the messages instead of replacing them on the queue.

I hope this gives a more complete picture of what I'm attempting to do.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4140495#4140495

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4140495




More information about the jboss-user mailing list