You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Aryan <ka...@gmail.com> on 2014/12/11 07:30:04 UTC

Camel activemq topic route adds addtional subscriber to the activeMQ topic upon each processing

Hi All,

We are using camel 2.13.2 with apache activeMQ 5.9.0 configured to store
messages in the database. We are using a standalone java class  which
publishes the messages to that topic.

Here is our activeMQ configuration.


	<bean id="activemq"
class="org.apache.activemq.camel.component.ActiveMQComponent">
		
		<property name="configuration" ref="jmsConfig" />
		<property name="transacted" value="false" />
		<property name="transactionManager" ref="jmsTransactionManager" />
		<property name="acceptMessagesWhileStopping" value="false" />
		<property name="cacheLevelName" value="CACHE_CONSUMER" />
	</bean>

We have a route which creates a subscriber(we tried with both durable and
non durable subscriber)

	<route id="topc subscriber">
			<from
uri="activemq:topic:com.RefreshTopic?clientId=1&amp;durableSubscriptionName=bar1"
/>
			<process ref="repositoryRefreshProcessor" />
		</route>

We have added a simple debug statement to the repositoryRefreshProcessor.

We have written a sample publisher which puts a message on the topic. When
the topic subscriber route picks up the message, it invokes
repositoryRefreshProcessor and the message is processed. But the consumer
created (because of this route processing is still registered to the topic).
When a second message is sent, this route registers a new consumer and the
message is consumed twice (one by this new consumer and one by the previous
existing consumer). This goes on and on and every time a new consumer gets
added and message gets processed for +1 times.

Also another issue is that the message does not get removed from JMS DB (we
are using oracle). But this message is not processed again. It gets
processed only once but is not removed from DB after processing
Even If we delete the messages manually, the consumers are still not
removed. Every time the route processes a message. a new consumer gets added
and hence message gets processed that many number of times.

It appears we are missing some configuration which cause this behavior.
Please advice.

Regards,
Aryan




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-activemq-topic-route-adds-addtional-subscriber-to-the-activeMQ-topic-upon-each-processing-tp5760532.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel activemq topic route adds addtional subscriber to the activeMQ topic upon each processing

Posted by Aryan <ka...@gmail.com>.
Any advice guys?

Regards,
Aryan



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-activemq-topic-route-adds-addtional-subscriber-to-the-activeMQ-topic-upon-each-processing-tp5760532p5760692.html
Sent from the Camel - Users mailing list archive at Nabble.com.