camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From waterback <>
Subject Connect with WebSphere MQ / Single Consumer allowed
Date Thu, 11 Nov 2010 12:45:06 GMT

Hi All,

i work with Camel 2.2 and connect to WebSphere MQ for Queue Consumers.
My Problem is, that the Queue on WMQ the route is trying to connect to is
configured for a single consumer only.
When a second consumer tries to connect, i get the respective
queue-connection error from WebSphere MQ.
When route 2 is started directly (without the .noAutoStartup() in the test
it throws a real exception: 
org.apache.camel.FailedToStartRouteException: Failed to start route 2
because of Multiple consumers for the same endpoint is not allowed:

 If i use the configuration like shown below (with .noAutoStartup() ) and i
start the route later on in the test, the route tries to connect to mq
forever and is in a real "zombie" state, because it declares itself started
but cannot get to do anything. 
What i would need is, that the route stops at some point and say: i can't
like it does when it is started with the camelcontext. 

Does someone have a hint how to achieve this? (I know that activemq has that
nice "maxReconnectAttempts" -thing that AFAIK i can't use with the standard

Here's some code:
My route starts with: (rest is obmitted because it's irrelevant - it's just
a test)
            .process( bla bla bla);

            .process( bla bla bla);

spring looks like this:
<bean id="ibmmq"
			<property name="connectionFactory">
				<bean class="">
					<property name="transportType">
static-field="" />
					<property name="queuemanager" value="MQMGR1" />
					<property name="hostName" value="localhost" />
					<property name="port" value="1414" />
					<property name="channel" value="CHL" />

When i'm trying to start route "2", there is also a "1" that is started
directly and gets the consumer "pole position"  

Any help would be greatly appreciated!

Thanx in advance,

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message