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

   JIRA: [CAMEL-27063](https://issues.apache.org/jira/browse/CAMEL-27063)
   
   - On a topic, each consumer of the listener container is a subscriber of its 
own: with `concurrentConsumers` (or `maxConcurrentConsumers`) greater than 1 
and no shared subscription, every message is processed once per consumer. This 
also happens when the option is set on the component (for its queues) and a 
route of that component consumes from a topic. Spring's 
`DefaultMessageListenerContainer` does not prevent it (its javadoc only advises 
against it), and Camel logged nothing.
   - `JmsConsumer` now logs a WARN when such a consumer starts, with the topic, 
the number of consumers and the options to use: `subscriptionShared=true` with 
a `subscriptionName`, or a single consumer. For a non-shared durable 
subscription it says that the subscription accepts only one consumer. The 
behaviour is unchanged. This also covers camel-activemq, camel-activemq6 and 
camel-amqp, which use the camel-jms consumer.
   - The `concurrentConsumers` and `maxConcurrentConsumers` descriptions say 
what happens on a topic (regenerated into the jms, activemq, activemq6 and amqp 
JSON, the catalog and the component/endpoint DSL).
   - The component page has a new "Concurrent Consuming from a topic" section 
with a shared-subscription example.
   
   Tests: `JmsTopicConcurrentConsumersTest` (new, 7 tests). On main, the 3 
tests that expect the WARN (endpoint option, component option, 
`maxConcurrentConsumers`) fail: no WARN is logged, and the endpoint case gets 
the message 3 times. The single-consumer, shared-subscription and queue 
controls pass before and after. With the fix, all 7 pass; the 7th test covers 
`consumerType=Simple`. The camel-jms unit tests pass (527 run, 0 failures, 11 
skipped).
   
   Upgrade guide: `camel-4x-upgrade-guide-4_24.adoc`, "camel-jms - a topic 
consumer with several concurrent consumers and no shared subscription logs a 
WARN".
   
   _Claude Code on behalf of Federico Mariani_
   


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