EAP JNDI queue names not map to admin-object in AMQ broker

Latest response

Hi,

Trying to use exerna queue manager, AMQ broker 7.2, with EAP 7.2.

My problem is that when the EAR/WAR startup it creates a dynamic queue in the AMQ with the JNDI-name both as name and address (not mapped to the physical queue name).
If I rename the queue config to the jndi-name it get mapped and use that queue...

So the mappning within the EAP to the admin-object seems to be erroneous configured...

The queues created in the broker are:

name: TestQueue address:TestQueue <- this is created by the broker (from broker.xml)
name: java:jboss/jms/queue/TestQueue address: java:jboss/jms/queue/TestQueue  <- this is created dynamically from the EAR/WAR

Tried to follow the instuctions:
https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.2/html/configuring_messaging/resource_adapters#using_jboss_amq_for_remote_jms_communication


AMQ: broker.xml


  ...
  <acceptor name="artemis">tcp://0.0.0.0:61616?anycastPrefix=jms.queue.;multicastPrefix=jms.topic.;tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=CORE,AMQP,STOMP,HORNETQ,M\
QTT,OPENWIRE;useEpoll=true;amqpCredits=1000;amqpLowCredits=300</acceptor>
  ...
  <address name="TestQueue">
    <anycast>
      <queue name="TestQueue" />
    </anycast>
  </address>

EAP: standalone-full.xml


<subsystem xmlns="urn:jboss:domain:messaging-activemq:4.0">
  ...
  <pooled-connection-factory name="activemq-ra-remote" entries="java:/RemoteJmsXA java:jboss/RemoteJmsXA" connectors="netty-remote-throughput" transaction="xa"/>

<subsystem xmlns="urn:jboss:domain:naming:2.0">
  ...
  <external-context name="java:global/remoteContext" module="org.apache.activemq.artemis" class="javax.naming.InitialContext">
    <environment>
        <property name="java.naming.factory.initial" value="org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory"/>
        <property name="java.naming.provider.url" value="tcp://127.0.0.1:61616"/>
        <property name="queue.TestQueue" value="TestQueue"/>
  ...
  <lookup name="java:jboss/jms/queue/TestQueue" lookup="java:global/remoteContext/TestQueue"/>

<subsystem xmlns="urn:jboss:domain:resource-adapters:5.0">
  ...
  <resource-adapter id="activemq-rar.rar">
    <archive>
      activemq-rar.rar
    </archive>
    <transaction-support>XATransaction</transaction-support>
    <config-property name="ServerUrl">
      tcp://localhost:61616?jms.rmIdFromConnectionId=true
    </config-property>
  ...
  <connection-definition class-name="org.apache.activemq.ra.ActiveMQManagedConnectionFactory" jndi-name="java:/ConnectionFactory" enabled="true" tracking="false" pool-name="QUEUEPOOL">
  ...
  <admin-objects>
    <admin-object class-name="org.apache.activemq.command.ActiveMQQueue" jndi-name="java:/queue.TestQeueue" use-java-context="true" pool-name="TestQeueue">
      <config-property name="PhysicalName">
        TestQeueue
      </config-property>
    </admin-object>

RA: ra.xml


<adminobject-interface>javax.jms.Queue</adminobject-interface>
  <adminobject-class>org.apache.activemq.command.ActiveMQQueue</adminobject-class>
  <config-property>
    <config-property-name>PhysicalName</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
  </config-property>
</adminobject>

Best regards,
Fredrik

Responses