Gordon, Thank you very much for quick response. We have decided to use reconnect_timeout and close session on exception. Could you please provide some best practice for error handling with messaging API?
PS. I expected something like callback error handler and so on... Regards, Boris -----Original Message----- From: Gordon Sim [mailto:[email protected]] Sent: Wednesday, May 11, 2011 5:08 PM To: [email protected] Subject: Re: Sender Capacity and error handling On 05/11/2011 12:55 PM, Ilyushonak Barys wrote: > Greetings. > > Could you please help me to answer on the following question: how can I > handle exceptions while synchronous send? > > The docs says: > If the connection fails and is transparently reconnected (see Section 2.10, > "Connection Options" for details on how to control this feature), the > unsettled messages for each sender over that connection will be > re-transmitted. > http://qpid.apache.org/books/0.10/Programming-In-Apache-Qpid/html/ch02 > s05.html > > But: what is happened if the connection do not reconnect? How can I handle > such error? You can control the reconnection via the various related connection settings (reconnect, reconnect_timeout etc). If reconnection is disabled, or unsuccessful, loss of a connection is signalled by throwing qpid::messaging::TransportFailure which you can then catch and handle appropriately. > I would like log it in the file. Loss of connection is already logged on the client side. --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:[email protected] _______________________________________________________ The information contained in this message may be privileged and conf idential and protected from disclosure. If you are not the original intended recipient, you are hereby notified that any review, retransmission, dissemination, or other use of, or taking of any action in reliance upon, this information is prohibited. If you have received this communication in error, please notify the sender immediately by replying to this message and delete it from your computer. Thank you for your cooperation. Troika Dialog, Russia. If you need assistance please contact our Contact Center (+7495) 258 0500 or go to www.troika.ru/eng/Contacts/system.wbp --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:[email protected]
