oscerd opened a new pull request, #26886:
URL: https://github.com/apache/camel/pull/26886

   ## Summary
   
   [CAMEL-25019](https://issues.apache.org/jira/browse/CAMEL-25019)
   
   With `exchangePattern=InOut`, `QuickfixjConsumer` chose the session for the 
reply by reading the `SessionID` header when the route completed. Any step in 
the route that set or replaced that header therefore changed which session 
received the reply. The consumer now captures the session the request arrived 
on before it hands the exchange to the route, and sends the reply there.
   
   This keeps the intent of CAMEL-5979. That change stopped rebuilding the 
reply's session ID from the message's CompID fields and used the engine's own 
`SessionID` instead, so replies still find the session when 
SenderSubID/TargetSubID vary. The value used here is the same one the consumer 
puts in the header; it is now read before routing instead of after.
   
   ## Changes
   
   - `QuickfixjConsumer`: read the `SessionID` before processing and pass it to 
`sendOutMessage`, instead of reading the header again afterwards. No public API 
change.
   - `QuickfixjConsumerTest` (new): the reply goes to the originating session, 
including when the route changes the `SessionID` header. The component has had 
no consumer test since `QuickfixjConsumerTest` was removed in CAMEL-16222.
   - `quickfix-component.adoc`: the Usage section called `DataDictionary` a 
header, but `QuickfixjConverters` reads it from an exchange property; the 
wording is corrected. The InOut consumer section now says which session 
receives the reply.
   - Upgrade guide 4.23: note for routes that changed the header to send the 
reply to another session.
   
   ## Testing
   
   - `components/camel-quickfix`: all 43 tests pass. The new 
`replyIgnoresSessionIdHeaderChangedDuringRouting` fails without the fix.
   - Full reactor `mvn clean install -DskipTests -DskipITs`: BUILD SUCCESS. The 
only regenerated file is the catalog copy of `quickfix-component.adoc`, which 
is included.
   
   Backports to `camel-4.22.x` and `camel-4.18.x` will follow once this is 
merged.
   
   _Claude Code on behalf of oscerd_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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]

Reply via email to