On 5/14/19 5:29 AM, akabhishek1 wrote:
Hi Tim,
Thank you so much for your quick reply and fix.
Could you please suggest time frame to release "0.43.0", So I can inform to
team accordingly ?
I'd suspect that the next release will be in the next few weeks.
Could you please also suggest your opinion on below code snippet, which one
is better approach 1 or 2? Or i can use anyone?
Your code shouldn't use internal APIs unless absolutely necessary as it
ties you to a given JMS provider. In this case the copy may work but it
isn't tested for this scenario so it cannot be guaranteed to always do
exactly what you want. You may need to handle the error and reconstruct
the message from the contents which should be accessible after the throw.
//*** (1) Code At Time Of Error***
final Message origionalJmsMessage = message; // message = javax.jms.Message
try {
sendMessage(message);
} catch (IllegalStateException illegalStateException) {
// Reset Producer due to Idle TimeOut after 10m
resetProducer();
sendMessage(origionalJmsMessage);
}
//*** (2) Code After Correction***
Message origionalJmsMessage;
try {
sendMessage(message); // message = javax.jms.Message
} catch (IllegalStateException illegalStateException) {
// Reset Producer due to Idle TimeOut after 10m
resetProducer();
origionalJmsMessage =
((org.apache.qpid.jms.message.JmsMessage)message).copy();
sendMessage(origionalJmsMessage);
}
Regards,
Abhishek Kumar
--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
--
Tim Bish
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]