davsclaus commented on code in PR #28174:
URL: https://github.com/apache/camel/pull/28174#discussion_r4324153444
##########
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) {
Review Comment:
This makes `key` the only option of this producer that wins over its header
(value, oldValue, defaultValue and the cache name keep header-first). It also
reverses the precedence that CAMEL-15609 chose on purpose. See the review
summary.
##########
components/camel-infinispan/camel-infinispan/src/main/docs/infinispan-component.adoc:
##########
@@ -200,6 +200,25 @@ The resulting value is returned in the exchange *body*.
Write methods like put(key, value) and remove(key) do not return the previous
value by default.
====
+=== Key and cache name headers
+
+The `key` option of the endpoint takes precedence over the
`CamelInfinispanKey` header. When the endpoint does not set
+`key`, the producer uses the `CamelInfinispanKey` header.
+
+The `CamelInfinispanCacheName` header takes precedence over the cache name of
the endpoint.
+
+A `infinispan` consumer sets `CamelInfinispanKey` and
`CamelInfinispanCacheName` to the key and the cache of the event.
Review Comment:
Nit: "An `infinispan` consumer" (also "a `infinispan` producer" below, and
the same in the embedded docs).
--
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]