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

   [CAMEL-25879](https://issues.apache.org/jira/browse/CAMEL-25879)
   
   The `infinispan` and `infinispan-embedded` producers resolved the key of 
every operation as `message.getHeader(InfinispanConstants.KEY, 
configuration::getKey)`, so the `CamelInfinispanKey` header won over the `key` 
option of the endpoint. An Infinispan consumer sets that header to the key of 
each cache event, so a route forwarding events to a producer with a fixed `key` 
worked on the key of the event instead.
   
   ### Changes
   
   - `InfinispanProducer.getKey(Message)`: the `key` option when it is set, 
otherwise the `CamelInfinispanKey` header. Used by the 13 operations that read 
a key.
   - Component docs (`infinispan`, `infinispan-embedded`, and the catalog 
copies): new section "Key and cache name headers" on the precedence of the two 
headers, and on removing the `CamelInfinispan*` headers between an Infinispan 
consumer and producer. `CamelInfinispanCacheName` still takes precedence over 
the cache name of the endpoint.
   - Upgrade guide 4.24: routes that set `key` on the endpoint and override it 
per message with the header must remove `key` from the endpoint.
   
   ### Tests
   
   
`publishKeyAndValueByExplicitlySpecifyingTheKeyAndValueOptionsHeaderHavePriorities`
 (shared by the embedded and remote producer tests) asserted the previous 
precedence. It is renamed `...KeyOptionHasPriority` and now expects the put on 
the key of the endpoint, while the `CamelInfinispanValue` header still wins 
over the `value` option. All 99 tests of `camel-infinispan-embedded` pass; the 
remote `InfinispanRemoteProducerIT` uses the same test and was not run locally 
(needs a container).
   


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