You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by bigbear <st...@gmail.com> on 2011/03/03 22:01:39 UTC

Camel, GlassFish and durable subscriber

Hi,

I have a route that works fine when the subscriber is non-durable.
I tried to make the subscriber durable by adding parameters to the jms
component as follows:

from("jms:topic:myTopic?clientId=aaaaa&durableSubscriptionName=bbbbbb")

I get the following warnings.

WARNING: MQJMSRA_DC2001:
connectionId=8653154849935814656:_setClientID():JMSService.setClientId():JMSServiceException=setClientId:
set client ID failed. Connection ID: 8653154849935814656, Client ID:
myTopicClientId, Shareable: false, nameSpace: null

WARNING: MQJMSRA_DC2001:
Unsupported:setClientID():inACC=false:connectionId=8653154849935814656

INFO: [03/03/11 03:41:49:049 EST]  WARN
listener.DefaultMessageListenerContainer: Could not refresh JMS Connection
for destination 'myTopic' - retrying in 5000 ms. Cause: MQJMSRA_DC2001:
Unsupported:setClientID():inACC=false:connectionId=8653154849935814656

At this point I can't look at any topics using the imqcmd command.

Here is my jms configuration:

<bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
<property name="connectionFactory" ref="myConnectionFactory" />
<property name="destinationResolver" ref="jmsDestinationResolver" />
</bean>

<jee:jndi-lookup id="myConnectionFactory"
jndi-name="jms/patientOutBoundSender" />

<bean id="jmsDestinationResolver"
class="org.springframework.jms.support.destination.JndiDestinationResolver">
</bean>

>From the glassfish documentation it looks like the clientId needs to be set
on the connectionfactory.
http://download.oracle.com/docs/cd/E19798-01/821-1794/aeohg/index.html

I tried a few scenarios:

1.

set the clientId on connectionfactory in the admin console.
Leave the code: from("jms:topic:myTopic)

I can access the topics using imqcmd but the sub is not durable.

2.

set the clientId on connectionfactory in the admin console.
Change the code to: from("jms:topic:myTopic?durableSubscriptionName=bbbbb")
//no clientId

Got an error that client id is required.
Caused by: java.lang.IllegalArgumentException: ClientId must be configured
when subscription is durable for
Endpoint[jms://topic:myTopic?durableSubscriptionName=bbbbbb]

3.
with or with out clientId in admin console
Code:
from("jms:topic:myTopic?clientId=aaaaa&durableSubscriptionName=bbbbbb")

Get the warning as mentioned above and cannot access any topic (did not
check queues) using imqcmd.

Could you please let me know what I am doing wrong here?

Thanks!!

Re: Camel, GlassFish and durable subscriber

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

I have created a ticket
https://issues.apache.org/jira/browse/CAMEL-3753

And will implement a fix to relax the check for clientId.
This should allow you to configure clientId on the ConnectionFactory,
and leave out the option in the endpoint uri.

The fix will be in Camel 2.7 which is to be released later this month.


On Thu, Mar 3, 2011 at 10:01 PM, bigbear <st...@gmail.com> wrote:
> Hi,
>
> I have a route that works fine when the subscriber is non-durable.
> I tried to make the subscriber durable by adding parameters to the jms
> component as follows:
>
> from("jms:topic:myTopic?clientId=aaaaa&durableSubscriptionName=bbbbbb")
>
> I get the following warnings.
>
> WARNING: MQJMSRA_DC2001:
> connectionId=8653154849935814656:_setClientID():JMSService.setClientId():JMSServiceException=setClientId:
> set client ID failed. Connection ID: 8653154849935814656, Client ID:
> myTopicClientId, Shareable: false, nameSpace: null
>
> WARNING: MQJMSRA_DC2001:
> Unsupported:setClientID():inACC=false:connectionId=8653154849935814656
>
> INFO: [03/03/11 03:41:49:049 EST]  WARN
> listener.DefaultMessageListenerContainer: Could not refresh JMS Connection
> for destination 'myTopic' - retrying in 5000 ms. Cause: MQJMSRA_DC2001:
> Unsupported:setClientID():inACC=false:connectionId=8653154849935814656
>
> At this point I can't look at any topics using the imqcmd command.
>
> Here is my jms configuration:
>
> <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
> <property name="connectionFactory" ref="myConnectionFactory" />
> <property name="destinationResolver" ref="jmsDestinationResolver" />
> </bean>
>
> <jee:jndi-lookup id="myConnectionFactory"
> jndi-name="jms/patientOutBoundSender" />
>
> <bean id="jmsDestinationResolver"
> class="org.springframework.jms.support.destination.JndiDestinationResolver">
> </bean>
>
> From the glassfish documentation it looks like the clientId needs to be set
> on the connectionfactory.
> http://download.oracle.com/docs/cd/E19798-01/821-1794/aeohg/index.html
>
> I tried a few scenarios:
>
> 1.
>
> set the clientId on connectionfactory in the admin console.
> Leave the code: from("jms:topic:myTopic)
>
> I can access the topics using imqcmd but the sub is not durable.
>
> 2.
>
> set the clientId on connectionfactory in the admin console.
> Change the code to: from("jms:topic:myTopic?durableSubscriptionName=bbbbb")
> //no clientId
>
> Got an error that client id is required.
> Caused by: java.lang.IllegalArgumentException: ClientId must be configured
> when subscription is durable for
> Endpoint[jms://topic:myTopic?durableSubscriptionName=bbbbbb]
>
> 3.
> with or with out clientId in admin console
> Code:
> from("jms:topic:myTopic?clientId=aaaaa&durableSubscriptionName=bbbbbb")
>
> Get the warning as mentioned above and cannot access any topic (did not
> check queues) using imqcmd.
>
> Could you please let me know what I am doing wrong here?
>
> Thanks!!
>



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