allthingssecurity commented on code in PR #27031:
URL: https://github.com/apache/camel/pull/27031#discussion_r4130959144
##########
components/camel-sjms/src/main/java/org/apache/camel/component/sjms/reply/ReplyManager.java:
##########
@@ -88,6 +88,20 @@ String registerReply(
*/
void updateCorrelationId(String correlationId, String newCorrelationId,
long requestTimeout);
+ /**
+ * Cancels a pending reply correlation, so the request timeout does not
complete the exchange.
+ * <p/>
+ * This is used when the JMS send fails after the reply has been
registered. Whoever removes the correlation owns
+ * the completion of the exchange. When this method returns
<tt>false</tt>, the request timeout or the reply has
+ * already removed the correlation (for example while a slow send was
still running), and it completes the exchange:
+ * the caller must then not complete the exchange as well.
+ *
+ * @param correlationId the correlation id to cancel
+ * @return <tt>true</tt> if the correlation was pending and
has been cancelled, <tt>false</tt> if it
+ * was not pending (anymore)
+ */
+ boolean cancelCorrelationId(String correlationId);
Review Comment:
Agreed, done in 586a800ea: `cancelCorrelationId` is now a `default` method
returning `true`, which keeps the previous behaviour (the caller completes the
exchange with the send failure) for a custom `ReplyManager`;
`ReplyManagerSupport` overrides it. The upgrade-guide entry now says so.
camel-sjms passes (126 tests, 5 skipped).
_Claude Code on behalf of allthingssecurity_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]