camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Connect with WebSphere MQ / Single Consumer allowed
Date Thu, 11 Nov 2010 14:57:12 GMT
Hi

I think you can maybe tell Camel to allow multipleConsumers=true on
those ibmjms endpoints.



On Thu, Nov 11, 2010 at 1:45 PM, waterback <martinh@innoq.com> wrote:
>
> 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.RuntimeCamelException:
> org.apache.camel.FailedToStartRouteException: Failed to start route 2
> because of Multiple consumers for the same endpoint is not allowed:
> Endpoint[ibmmq://queue:IN?cacheLevelName=CACHE_NONE&testConnectionOnStartup=true]
>
>  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
> jms-component.
>
>
> Here's some code:
> My route starts with: (rest is obmitted because it's irrelevant - it's just
> a test)
> from("ibmmq:queue:DEB.VSL.ZIFS.IN.ARE?testConnectionOnStartup=true&cacheLevelName=CACHE_NONE")
>            .routeId("1")
>            .process( bla bla bla);
>
>
> from("ibmmq:queue:DEB.VSL.ZIFS.IN.ARE?testConnectionOnStartup=true&cacheLevelName=CACHE_NONE")
>            .routeId("2")
>            .noAutoStartup()
>            .process( bla bla bla);
>
> spring looks like this:
> <bean id="ibmmq"
>                class="org.apache.camel.component.jms.JmsComponent">
>                        <property name="connectionFactory">
>                                <bean class="com.ibm.mq.jms.MQQueueConnectionFactory">
>                                        <property name="transportType">
>                                                <util:constant
> static-field="com.ibm.mq.jms.JMSC.MQJMS_CLIENT_NONJMS_MQ" />
>                                        </property>
>                                        <property name="queuemanager"
value="MQMGR1" />
>                                        <property name="hostName"
value="localhost" />
>                                        <property name="port" value="1414"
/>
>                                        <property name="channel"
value="CHL" />
>                                </bean>
>                        </property>
>                </bean>
>
> 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,
> martin
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Connect-with-WebSphere-MQ-Single-Consumer-allowed-tp3260184p3260184.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message