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

Ivan Ravin commented on CAMEL-24619:
------------------------------------

tcp protocol: tcp://localhost:61616
I am using pooled connection factory, so JMS configuration is like this:
{code:java}
// Artemis connection factory
org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory inner = new 
org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory("tcp://localhost:61616");
// pool (any pool, not only activemq)
org.apache.activemq.jms.pool.PooledConnectionFactory pooled = new 
org.apache.activemq.jms.pool.PooledConnectionFactory(); 
pooled.setConnectionFactory(inner);
// JMS component
camelContext.addComponent("jmsComp", 
org.apache.camel.component.jms.JmsComponent                
.jmsComponent(pooled));


// route causes OOM on broker side
from("jmsComp:topic:topic.name").to("log:ArtemisTestLog1?level=INFO");
// workaround 
from("jmsComp:topic:topic.name?consumerType=Simple").to("log:ArtemisTestLog2?level=INFO");
 {code}
 

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