[ 
https://issues.apache.org/jira/browse/CAMEL-24619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18111451#comment-18111451
 ] 

Torsten Mielke commented on CAMEL-24619:
----------------------------------------

[~gnodet] and [~ivanra] my initial tests performed yesterday did not confirm 
the bug so far. 
I was using a default Artemis broker, with no special configuration and 
DefaultMessageListenerContainer.
Camel JMS by default uses CACHE_CONSUMER setting (unless XA transactions are in 
use) and with CACHE_CONSUMER the topic subscriber is created at the start of 
the Camel route and re-used for the entire life time of the route. Looking at 
the registered topic subscribers in JMX it remains the exact same throughout my 
tests.

Switching to a lower cacheLevelName like CACHE_CONNECTION will re-create the 
consumer for every new message. That is expected and the broker seems to handle 
this correctly and deletes any (non durable) topic subscriber once it is 
disconnected (which happens after every message poll, so every second). So 
while in this configuration a new consumer is created and registered in the 
Artemis broker, it is also unregistered and freed once the subscriber 
disconnects.
Things seem to work as expected and the test once again shows that users 
ideally want to go with default CACHE_CONNECTION.

> camel-jms + Artemis: the default topic consumer causes an OOM on the broker.
> ----------------------------------------------------------------------------
>
>                 Key: CAMEL-24619
>                 URL: https://issues.apache.org/jira/browse/CAMEL-24619
>             Project: Camel
>          Issue Type: Bug
>          Components: came-jms
>            Reporter: Ivan Ravin
>            Assignee: Guillaume Nodet
>            Priority: Major
>
> Maybe it's known problem. The Artemis broker creates a temporary queue for 
> each topic consumer. camel-jms component can create Default and Simple 
> consumer. A simple consumer is essentially a listener, and all works fine. 
> The default consumer attempts to retrieve a message every second, and every 
> second creates temporary queue on topic address, which live until the 
> connection is terminated. This leads OOM on the broker.
> To work around this situation, you can specify in the URI 
> consumerType=Simple, but default behavior is dangerous.
> It might not be a bad idea by default to switch consumer type to Simple for 
> topic consumers?
> This is complex problem that affects camel-jms + Artemis topics + (maybe) 
> pooled connection factory



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to