0 Replies Latest reply on Mar 19, 2019 5:46 AM by vivek_verma

    Connecting Wildfly 10.1.0 to standalone activeMQ server

    vivek_verma

      Hello,

       

      We are having wildfly connected to its built-in ActiveMQ artemis server. We are using Camel to process the messages. Attached are the files we have used for this configuration. We have couple of queues (e.g BEEERequisitionsQueue)  defined in standalone-full.xml which we are referring to in rcjms.properties. This property file is being used by Camel in its configuration file beeeCamelContext.xml.

      Now I am trying to connect wildlfy 10.1.0 to standlaone ActiveMQ artemis server wherein I am facing configuration issues.

      For remote connection I have added the following entries in standalone-full.xml by following the link https://docs.jboss.org/author/display/WFLY10/Connect+a+pooled-connection-factory+to+a+Remote+Artemis+Server

      <subsystem xmlns="urn:jboss:domain:messaging-activemq:1.0">
          <server name="default">
              <security-setting name="#">
                  <role consume="true" create-non-durable-queue="true" delete-non-durable-queue="true" name="jmsrole" send="true"/>
              </security-setting>
              <address-setting dead-letter-address="jms.queue.DLQ" expiry-address="jms.queue.ExpiryQueue" max-size-bytes="10485760" message-counter-history-day-limit="10" name="#" page-size-bytes="2097152"/>
              <http-connector endpoint="http-acceptor" name="http-connector" socket-binding="my-http"/>
              <http-connector endpoint="http-acceptor-throughput" name="http-connector-throughput" socket-binding="http">
                  <param name="batch-delay" value="50"/>
              </http-connector>
              ...
              <connection-factory connectors="in-vm" entries="/ConnectionFactory" name="InVmConnectionFactory"/>
              <connection-factory connectors="http-connector" entries="/RemoteConnectionFactory jboss/exported/jms/RemoteConnectionFactory" name="RemoteConnectionFactory"/>
              <pooled-connection-factory connectors="in-vm" entries="/JmsXA jboss/DefaultJMSConnectionFactory" name="activemq-ra" transaction="xa"/>
              <remote-connector name="remote-artemis" socket-binding="remote-artemis"/>
              <pooled-connection-factory name="remote-artemis" entries="java:/jms/remoteCF" connectors="remote-artemis"/>
          </server>
      </subsystem>
      

       

      I have tried to modify rcjms.properties to refer to this external connection for BEEERequisitionsQueue case using the following entries:-

      BEEERequisitions.JMS_VENDOR=JBOSSMQ
      BEEERequisitions.CLIENT_KEYSTORE=
      BEEERequisitions.CLIENT_TRUSTSTORE=
      BEEERequisitions.KEYSTORE_PASSWORD=
      BEEERequisitions.TRUSTSTORE_PASSWORD=
      BEEERequisitions.TRUSTSTORE_TYPE=
      ....
      BEEERequisitions.JndiProviderUrl=tcp://localhost:61616
      BEEERequisitions.JndiFactory=org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory
      BEEERequisitions.UserName=admin
      BEEERequisitions.Password=admin
      BEEERequisitions.JmsTopicFactory=jms/remoteCF
      BEEERequisitions.JmsQueueFactory=jms/remoteCF
      BEEERequisitions.JmsQueue=jms/queue/BEEERequisitionsQueue
      BEEERequisitions.JmsTopic=jms/queue/BEEERequisitionsQUeue
      BEEERequisitions.MessageMode=Queue
      BEEERequisitions.Listener.PollerInterval=100
      

       

      However wildfly server complains javax.naming.NameNotFoundException: jms/remoteCF. I also tried with the following changes in rcjms.properties

      ...
      EEERequisitions.JndiProviderUrl=tcp://localhost:61616
      BEEERequisitions.JndiFactory=org.jboss.naming.remote.client.InitialContextFactory
      ...
      

      But then it complained

      09:14:28,841 ERROR [com.celosis.servlet.jms.StartJMSListenerServlet] (ServerService Thread Pool -- 100) Error while initializing the context: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'connectionFactory' defined in class path resource [config/beeeCamelContext.xml]: Invocation of init method failed; nested exception is javax.naming.CommunicationException: Failed to connect to any server. Servers tried: [tcp://localhost:61616 (No connection provider for URI scheme "tcp" is installed)]

       

      Could you please suggest what configuration I should use to make wildlfy connect to the standalone jms server.

       

      Thanks,

      Vivek