gnodet-bot commented on code in PR #28174:
URL: https://github.com/apache/camel/pull/28174#discussion_r4324263111


##########
components/camel-infinispan/camel-infinispan-common/src/main/java/org/apache/camel/component/infinispan/InfinispanProducer.java:
##########
@@ -420,6 +420,12 @@ protected <K, V> BasicCache<K, V> getCache(Message 
message) {
         return manager.getCache(message, this.cacheName);
     }
 
+    protected Object getKey(Message message) {
+        // the key configured on the endpoint wins over the header

Review Comment:
   💡 **Note:** `getKey()` uses endpoint-wins-over-header precedence, while 
`getCache()` uses header-wins-over-endpoint. This is intentional (per the JIRA) 
but asymmetric — a brief Javadoc would help future readers:
   
   ```suggestion
       /**
        * Resolves the cache key: endpoint-configured key takes precedence over 
the message header.
        *
        * <p>Note: cache-name resolution ({@link #getCache}) uses the inverse 
precedence (header wins).
        */
       protected Object getKey(Message message) {
   ```



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