Atomikos Forum

Use Topic with durable Subscription

I try to listen Topic with a durable subscription but i obtain this error and i don't know why :

javax.jms.InvalidClientIDException: Broker: activemq-preprod master - Client: Perrier-Server already connected from /192.168.101.233:2101 at org.apache.activemq.broker.region.RegionBroker.addConnection(RegionBroker.java:209)
    

My spring setup is as follows :


    <!-- JMS vendor's XA connection factory -->
    <bean id="xaFactory" class="org.apache.activemq.ActiveMQXAConnectionFactory">
        <property name="brokerURL" value="${mom.url}" />
        <property name="clientID" value="Perrier-Server" />
    </bean>

    <!-- Atomikos connection factory -->
    <bean id="atomikosConnectionFactory" class="com.atomikos.jms.AtomikosConnectionFactoryBean">
        <property name="uniqueResourceName" value="XA_Perrier_JMS" />
        <property name="xaConnectionFactory" ref="xaFactory" />
        <property name="poolSize" value="1" />
    </bean>
        
    <!--  Creation of listener -->
    <bean id="activationGazCallBackListener" class="de.perrier.server.mdp.ActivationGazCallBackMDP" />


    <!--  initialize the destination -->
    <bean id="centaureTopic" class="org.apache.activemq.command.ActiveMQTopic" >
          <constructor-arg value="activation.gaz" />
    </bean>
        
    <bean id="messageDrivenContainer" class="com.atomikos.jms.extra.MessageDrivenContainer" init-method="start" destroy-method="stop">
        <property name="atomikosConnectionFactoryBean" ref="atomikosConnectionFactory" />
        <property name="transactionTimeout" value="300" />
        <property name="destination" ref="centaureTopic" />
        <property name="messageListener" ref="activationGazCallBackListener" />
        <property name="subscriberName" value="activationGaz" />
        <property name="poolSize" value="1" />
    </bean>

thanks for your help
BOUCHOT Christophe Send private email
Tuesday, March 31, 2009
 
 
Hi Guy,

We tried this configuration as well, using Spring:

<!-- The underying JMS vendor's XA connection factory -->
    <bean id="xaFactory" class="org.apache.activemq.ActiveMQXAConnectionFactory">
        <property name="brokerURL" value="${mom.url}" />
        <property name="clientID" value="Perrier-Server" />
    </bean>

<!-- Configure the JMS connector -->
    <bean id="atomikosConnectionFactory" class="com.atomikos.jms.AtomikosConnectionFactoryBean" init-method="init" destroy-method="close">
        <property name="uniqueResourceName" value="XA_Perrier_JMS" />
        <property name="xaConnectionFactory" ref="xaFactory" />
    </bean>
        
    <!--  Creation of listener -->
    <bean id="activationGazCallBackListener" class="de.perrier.server.mdp.ActivationGazCallBackMDP" />


    <!--  initialize the destination -->
    <bean id="centaureTopic" class="org.apache.activemq.command.ActiveMQTopic" >
          <constructor-arg value="activation.gaz" />
    </bean>
        
    <!--  this is the message listener container -->
    <bean id="jmsContainer" class="org.springframework.jms.listener.DefaultMessageListenerContainer">
          <property name="connectionFactory" ref="atomikosConnectionFactory"/>
<property name="transactionManager" ref="transactionManager"/>
          <property name="destination" ref="centaureTopic"/>
          <property name="messageListener" ref="activationGazCallBackListener" />
          <property name="sessionTransacted" value="true" />
          <property name="subscriptionDurable" value="true"/>
          <property name="durableSubscriptionName" value="XA_Perrier_JMS"/>
<property name="pubSubDomain" value="true" />
    </bean>

This configuration works fine if we don't use a durable subscription, but as soon as we do we have this error:

javax.jms.InvalidClientIDException: Broker: activemq-int-slave - Client: Perrier-Server already connected from /192.168.101.233:2536

What's wrong with durable subscription?

Thank you for your help et vive la Belgique ;)

Mickael
Mickael Coquer Send private email
Thursday, April 02, 2009
 
 
Hi,

I haven't seen this before, looks like an activeMQ issue? I did find this, very similar problem:

http://www.nabble.com/Cannot-unsubscribe-the-durable-subscriber-because-of-InvalidClientIDException-td19381769.html

We can try to find out more details but that will require some time - do you have a budget for developer support?

Best
Guy Pardon Send private email
Thursday, April 02, 2009
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics