3 Replies Latest reply on Dec 2, 2019 6:40 PM by Tom B-Oracle

    Durable Subscription on foreign server reference to Artemis/HornetQ

    3561380

      Hi,

       

      I'm trying to create a MDB that is a durable subscriber on a topic in an Apache ActiveMQ Artemis topic. The MDB resides in a cluster with two nodes.

       

      It looks severly limited.

       

      On one node (server in the cluster) I get:

       

      ####<2019-nov-25, 1:55:30,26 em CET>(...) <BEA-010237> <The Message-Driven Bean DomstolGatekeeperMDBean was configured to use a JMS Topic, does not require transactions, and uses a non-WebLogic JMS provider. Only one thread will be used to receive and process all messages.>

      ####<2019-nov-25, 1:55:30,49 em CET> (...) <BEA-010060> <The Message-Driven EJB DomstolGatekeeperMDBean has connected or reconnected to the JMS destination jms.kfm.amq.MeddelaDomstol.v1.T.>

       

      On the other node I get:

       

      ####<2019-nov-25, 2:05:40,48 em CET> <Warning> <EJB> <Q26409> (..)  <BEA-010061> <The Message-Driven EJB DomstolGatekeeperMDBean is unable to connect to the JMS destination jms.kfm.amq.MeddelaDomstol.v1.T. The Error was:

      javax.jms.InvalidClientIDException: clientID=DomstolGatekeeperMDBean was already set into another connection>

       

      In all, in the whole cluster, I get one thread that serves the topic, not 2x16 as I would expect.

       

      My mdb is annotated like:

       

      @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"),

      @ActivationConfigProperty(propertyName = "subscriptionDurability", propertyValue = "Durable"),

       

      @ActivationConfigProperty(propertyName = "subscriptionName", propertyValue = "shared-${domain.name}-DomstolGatekeeperMDBean"),

      @ActivationConfigProperty(propertyName = "shareSubscriptions", propertyValue="true"),


      @ActivationConfigProperty(propertyName = "connectionFactoryJndiName", propertyValue = "jms.kfm.amq.ConnectionFactory"),

      @ActivationConfigProperty(propertyName = "destinationJndiName", propertyValue = "jms.kfm.amq.MeddelaDomstol.v1.T") })

       

      My Foreign Server looks like:

       

      <foreign-server name="jms.kfm.amq.kontiki.ForeignServer">

          <default-targeting-enabled>true</default-targeting-enabled>

          <foreign-destination name="jms.kfm.amq.MeddelaKonkurs.v1.T">

            <local-jndi-name>jms.kfm.amq.MeddelaKonkurs.v1.T</local-jndi-name>

            <remote-jndi-name>jms.kfm.MeddelaKonkurs.v1.T</remote-jndi-name>

          </foreign-destination>

          <foreign-destination name="jms.kfm.amq.MeddelaForetagsrekonstruktion.v1.T">

            <local-jndi-name>jms.kfm.amq.MeddelaForetagsrekonstruktion.v1.T</local-jndi-name>

            <remote-jndi-name>jms.kfm.MeddelaForetagsrekonstruktion.v1.T</remote-jndi-name>

          </foreign-destination>

          <foreign-destination name="jms.kfm.amq.MeddelaDomstol.v1.T">

            <local-jndi-name>jms.kfm.amq.MeddelaDomstol.v1.T</local-jndi-name>

            <remote-jndi-name>jms.kfm.MeddelaDomstol.v1.T</remote-jndi-name>

          </foreign-destination>

          <foreign-destination name="jms.kfm.amq.MeddelaKonkursforvaltare.v1.T">

            <local-jndi-name>jms.kfm.amq.MeddelaKonkursforvaltare.v1.T</local-jndi-name>

            <remote-jndi-name>jms.kfm.MeddelaKonkursforvaltare.v1.T</remote-jndi-name>

          </foreign-destination>

          <foreign-connection-factory name="jms.kfm.amq.ConnectionFactory">

            <local-jndi-name>jms.kfm.amq.ConnectionFactory</local-jndi-name>

            <remote-jndi-name>jms.kfm.ConnectionFactory</remote-jndi-name>

          </foreign-connection-factory>

          <initial-context-factory>org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory</initial-context-factory>

          <connection-url>tcp://0.0.0.0:61616</connection-url>

          <jndi-property>

            <key>topic.jms.kfm.MeddelaDomstol.v1.T</key>

            <value>jms.kfm.MeddelaDomstol.v1.T</value>

          </jndi-property>

          <jndi-property>

            <key>topic.jms.kfm.MeddelaKonkursforvaltare.v1.T</key>

            <value>jms.kfm.MeddelaKonkursforvaltare.v1.T</value>

          </jndi-property>

          <jndi-property>

            <key>connectionFactory.jms.kfm.ConnectionFactory</key>

            <value>tcp://0.0.0.0:61616?type=TOPIC_XA_CF</value>

          </jndi-property>

          <jndi-property>

            <key>topic.jms.kfm.MeddelaKonkurs.v1.T</key>

            <value>jms.kfm.MeddelaKonkurs.v1.T</value>

          </jndi-property>

          <jndi-property>

            <key>topic.jms.kfm.MeddelaForetagsrekonstruktion.v1.T</key>

            <value>jms.kfm.MeddelaForetagsrekonstruktion.v1.T</value>

          </jndi-property>

        </foreign-server>