So if the transaction commit fails you'll get a JMSException thrown back to the client. The producing application can then choose to attempt rollback and/or retry the send. (Obviously, limited retry is a good idea to avoid thrashing).
More likely htough is that the failure will cause the Producer's connection to be dropped - since any condition causing transactions to fail most likely to be considered fatal. Timeout is the most common cause of a commit failure, and would usually reflect system load or network issues. In the Qpid client example packages, there are various publisher classes in the publisher package with examples of handling exceptions on commit for a transacted send. hth, Marnie On Tue, Dec 14, 2010 at 3:44 PM, William Drozd <[email protected]> wrote: > > Thanks Marnie!, > > > I appreciate the help. I have a follow-up question though, if the > Transaction fails what happens from the Publisher's perspective? > > > > Thanks again, > Bill > > > -----Original Message----- > From: Marnie McCormack [mailto:[email protected]] > Sent: Tuesday, December 14, 2010 10:26 AM > To: [email protected] > Subject: Re: Confirm Broker received message from Producer? (Java client > and broker) > > Hi Bill, > > Transactions are the way to go here, for the simplest solution. > > The transaction will return on the send() once the message has been > received > and processed (i.e. persisted etc ) on the broker. > > The JMS API exposes the Connection.createSession (transacted, > acknowledeMode) method - set transacted to true on the MessageProducer's > session. > > Regards, > Marnie > > On Tue, Dec 14, 2010 at 2:38 PM, William Drozd <[email protected]> wrote: > > > Hello, > > > > For the Java client and Java Broker: > > > > When a producer sends a message to a Broker, is there any way to confirm > > that the Broker received the message in the Producer? Ideally, I am > looking > > for some type of ACK call-back after the Broker receives the Producer's > > message. > > > > Thanks, > > Bill > > > > > > > > > > > > > > > __________________________________________________________________________ > > This message and all attachments are PRIVATE, and contain information > that > > is PROPRIETARY to Intelligent Automation, Inc. You are not authorized to > > transmit or otherwise disclose this message or any attachments to any > > third party whatsoever without the express written consent of Intelligent > > Automation, Inc. If you received this message in error or you are not > > willing to view this message or any attachments on a confidential basis, > > please immediately delete this email and any attachments and notify > > Intelligent Automation, Inc. > > > > > > --------------------------------------------------------------------- > > Apache Qpid - AMQP Messaging Implementation > > Project: http://qpid.apache.org > > Use/Interact: mailto:[email protected] > > > > > > > __________________________________________________________________________ > This message and all attachments are PRIVATE, and contain information that > is PROPRIETARY to Intelligent Automation, Inc. You are not authorized to > transmit or otherwise disclose this message or any attachments to any > third party whatsoever without the express written consent of Intelligent > Automation, Inc. If you received this message in error or you are not > willing to view this message or any attachments on a confidential basis, > please immediately delete this email and any attachments and notify > Intelligent Automation, Inc. > > > --------------------------------------------------------------------- > Apache Qpid - AMQP Messaging Implementation > Project: http://qpid.apache.org > Use/Interact: mailto:[email protected] > >
