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

   Fixes [CAMEL-26278](https://issues.apache.org/jira/browse/CAMEL-26278), 
found while adding the catalog body types (CAMEL-24961).
   
   ## The hazelcast-seda consumer restores a transferred exchange whatever its 
transferExchange option says
   
   **Was:** `HazelcastSedaConsumer` restored any `DefaultExchangeHolder` it 
took from the queue with `DefaultExchangeHolder.unmarshal`, with its headers 
and exchange properties, also when the consumer endpoint had 
`transferExchange=false`, the default. Only `HazelcastSedaProducer` read the 
option.
   
   **Now:** the consumer restores the headers and exchange properties of such 
an exchange only when it has `transferExchange=true` itself. Without the option 
it takes only the body of the exchange, as it does for any other item of the 
queue, and logs a warning the first time, so that a route that relied on the 
old behaviour can see why the headers are missing. camel-mina does the same 
since CAMEL-24509 (`MinaPayloadHelper.isExchangeTransfer`).
   
   ## Tests
   
   `HazelcastSedaTransferExchangeTest` has three new tests:
   - an exchange that a producer with `transferExchange=true` puts on the queue 
reaches a consumer without the option with its body only;
   - a `DefaultExchangeHolder` put on the queue directly gives only its body to 
a consumer without the option;
   - with `transferExchange=true` on the consumer, the headers and exchange 
properties are restored.
   
   With the consumer change reverted, the first two fail, as the headers and 
exchange properties are restored without the option; the third passes either 
way, as the option keeps working. The 27 tests of the hazelcast-seda test 
classes pass.
   
   ## Docs and generated files
   
   - The description of the `transferExchange` option (and so the endpoint 
DSL), the consumer body types and the component page now say that both the 
producer and the consumer need the option. The catalog copies of the JSON and 
the page are updated.
   - Upgrade guide: an entry in the 4.24 guide, and the same note in the 4.22.3 
and 4.18.6 sections of the 4.22 and 4.18 guides, as the change is planned for 
those patch releases too.
   
   ## Not changed
   
   - A consumer with `transferExchange=true` restores the headers and exchange 
properties of the exchange as before: the option is how a route transfers a 
whole exchange through the queue.
   
   Planned for 4.24.0, 4.22.3 and 4.18.6: the backports to camel-4.22.x and 
camel-4.18.x follow once this is merged.
   
   _Claude Code on behalf of Andrea Cosentino (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