Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-221

JMS Openwire client is unable to find topics with prefix "jms.topic."

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • None
    • None
    • Compatibility/Configuration, User Experience
    • Hide

      1) Create a topic destination (via JMX call)

      $ java  -jar /var/dtests/node_data/clients/amqx.jar  jmstopic --host <host-ip>:1099 --action add --name "myTopic"

      2) Try to send a message to such topic using "myTopic" name:

      java  -cp "/var/dtests/node_data/clients/java/aoc:/usr/share/java/log4j-amq-1.2.17/log4j-1.2.17.redhat-1.jar:/usr/share/java/slf4j-api-amq-1.7.14/slf4j-api-1.7.14.redhat-1.jar:/usr/share/java/slf4j-log4j-amq-1.7.14/slf4j-log4j12-1.7.14.redhat-1.jar:/var/dtests/node_data/clients/java/aac/lib/jopt-simple-4.8.jar:/opt/jboss-amq-7/lib/activemq-client-5.11.0.redhat-621107.jar:/opt/jboss-amq-7/lib/artemis-commons-1.2.0.amq-700004-redhat-1.jar:/opt/jboss-amq-7/lib/commons-collections-3.2.2.redhat-1.jar:/opt/jboss-amq-7/lib/jboss-logging-3.3.0.Final-redhat-1.jar:/opt/jboss-amq-7/lib/artemis-core-client-1.2.0.amq-700004-redhat-1.jar:/opt/jboss-amq-7/lib/commons-logging-1.2.0.redhat-2.jar:/opt/jboss-amq-7/lib/netty-all-4.0.32.Final-redhat-1.jar:/opt/jboss-amq-7/lib/artemis-jms-client-1.2.0.amq-700004-redhat-1.jar:/opt/jboss-amq-7/lib/slf4j-api-1.7.12.redhat-1.jar:/opt/jboss-amq-7/lib/artemis-selector-1.2.0.amq-700004-redhat-1.jar:/opt/jboss-amq-7/lib/commons-beanutils-1.9.2.redhat-1.jar:/opt/jboss-amq-7/lib/geronimo-jms_2.0_spec-1.0.0.alpha-2-redhat-2.jar:/opt/jboss-amq-7/lib/hawtbuf-1.11.0.redhat-1.jar" -Daoc7.jndi=/var/dtests/node_data/clients/java/aoc/src/resources/ArtemisJNDI.properties  -Dlog4j.configuration=file:/var/dtests/node_data/clients/java/aoc/src/resources/log4j.properties  com.redhat.mqe.jms.aoc7_sender  --log-msgs dict --broker tcp://10.34.75.171:61616 --conn-username admin --conn-password admin --address "topic://myTopic" --count 1 --msg-content-map-item "string=String"
      tcp://10.34.75.171:61616?jms.username='admin'&jms.password='admin'
      13:32:19,142 WARN Failed to generate a seed from SecureRandom within 3 seconds. Not enough entrophy?
      13:32:19,142 WARN Failed to generate a seed from SecureRandom within 3 seconds. Not enough entrophy?
      {'redelivered': False, 'reply_to': None, 'id': '0872bca1-0dfe-11e6-8a0a-525400061be7', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1461929539597, 'properties': {'JMSXDeliveryCount': '0'}, 'content': {'string': 'String'}}
      

      3) Try to send a message to such topic using "jms.topic.myTopic" name:

      $ java  -cp "/var/dtests/node_data/clients/java/aoc:/usr/share/java/log4j-amq-1.2.17/log4j-1.2.17.redhat-1.jar:/usr/share/java/slf4j-api-amq-1.7.14/slf4j-api-1.7.14.redhat-1.jar:/usr/share/java/slf4j-log4j-amq-1.7.14/slf4j-log4j12-1.7.14.redhat-1.jar:/var/dtests/node_data/clients/java/aac/lib/jopt-simple-4.8.jar:/opt/jboss-amq-7/lib/activemq-client-5.11.0.redhat-621107.jar:/opt/jboss-amq-7/lib/artemis-commons-1.2.0.amq-700004-redhat-1.jar:/opt/jboss-amq-7/lib/commons-collections-3.2.2.redhat-1.jar:/opt/jboss-amq-7/lib/jboss-logging-3.3.0.Final-redhat-1.jar:/opt/jboss-amq-7/lib/artemis-core-client-1.2.0.amq-700004-redhat-1.jar:/opt/jboss-amq-7/lib/commons-logging-1.2.0.redhat-2.jar:/opt/jboss-amq-7/lib/netty-all-4.0.32.Final-redhat-1.jar:/opt/jboss-amq-7/lib/artemis-jms-client-1.2.0.amq-700004-redhat-1.jar:/opt/jboss-amq-7/lib/slf4j-api-1.7.12.redhat-1.jar:/opt/jboss-amq-7/lib/artemis-selector-1.2.0.amq-700004-redhat-1.jar:/opt/jboss-amq-7/lib/commons-beanutils-1.9.2.redhat-1.jar:/opt/jboss-amq-7/lib/geronimo-jms_2.0_spec-1.0.0.alpha-2-redhat-2.jar:/opt/jboss-amq-7/lib/hawtbuf-1.11.0.redhat-1.jar" -Daoc7.jndi=/var/dtests/node_data/clients/java/aoc/src/resources/ArtemisJNDI.properties  -Dlog4j.configuration=file:/var/dtests/node_data/clients/java/aoc/src/resources/log4j.properties  com.redhat.mqe.jms.aoc7_sender  --log-msgs dict --broker tcp://10.34.75.171:61616 --conn-username admin --conn-password admin --address "topic://jms.topic.myTopic" --count 1 --msg-content-map-item "string=String"
      tcp://10.34.75.171:61616?jms.username='admin'&jms.password='admin'
      13:32:29,641 WARN Failed to generate a seed from SecureRandom within 3 seconds. Not enough entrophy?
      13:32:29,641 WARN Failed to generate a seed from SecureRandom within 3 seconds. Not enough entrophy?
      13:32:30,012 ERROR Error while sending a message!
      javax.jms.InvalidDestinationException: Destination jms.topic.myTopic does not exist
      	at org.apache.activemq.artemis.jms.client.ActiveMQSession.createProducer(ActiveMQSession.java:306)
      	at com.redhat.mqe.jms.SenderClient.startClient(SenderClient.java:67)
      	at com.redhat.mqe.jms.aoc7_sender.main(aoc7_sender.java:39)
      

      Note: AMQP clients have similar address resolution. Destination has to be explicitly prefixed with "jms.topic." to be able to send to such destination. Receival from such "destination-topics" via AMQP clients has never been tested, as it is blocked on AMQP drain support ENTMQ-1668.

      $ ./aac1_sender.java.sh --log-msgs dict --broker amqp://10.34.75.171:5672 --conn-username admin --conn-password admin --address "topic://jms.topic.myTopic" --count 1 --msg-content-map-item "string=String"
      {'redelivered': False, 'reply_to': None, 'id': ':6e344ebb-03c1-4711-9de2-b81366f055eb:1:1:1-1', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1461929662623, 'destination': 'jms.topic.myTopic', 'properties': {'JMSXDeliveryCount': 1}, 'content': {'string': 'String'}}
      
      $ ./aac1_sender.java.sh --log-msgs dict --broker amqp://10.34.75.171:5672 --conn-username admin --conn-password admin --address "topic://myTopic" --count 1 --msg-content-map-item "string=String"
      13:34:31,890 WARN Open of resource:(JmsProducerInfo {}) failed: AMQ219003: error finding temporary queue, AMQ219002: target address does not exist [condition = amqp:internal-error]
      13:34:31,893 ERROR Error while sending a message!
      javax.jms.JMSException: AMQ219003: error finding temporary queue, AMQ219002: target address does not exist [condition = amqp:internal-error]
      

      I can provide more details.

      Show
      1) Create a topic destination (via JMX call) $ java -jar /var/dtests/node_data/clients/amqx.jar jmstopic --host <host-ip>:1099 --action add --name "myTopic" 2) Try to send a message to such topic using "myTopic" name: java -cp "/var/dtests/node_data/clients/java/aoc:/usr/share/java/log4j-amq-1.2.17/log4j-1.2.17.redhat-1.jar:/usr/share/java/slf4j-api-amq-1.7.14/slf4j-api-1.7.14.redhat-1.jar:/usr/share/java/slf4j-log4j-amq-1.7.14/slf4j-log4j12-1.7.14.redhat-1.jar:/var/dtests/node_data/clients/java/aac/lib/jopt-simple-4.8.jar:/opt/jboss-amq-7/lib/activemq-client-5.11.0.redhat-621107.jar:/opt/jboss-amq-7/lib/artemis-commons-1.2.0.amq-700004-redhat-1.jar:/opt/jboss-amq-7/lib/commons-collections-3.2.2.redhat-1.jar:/opt/jboss-amq-7/lib/jboss-logging-3.3.0.Final-redhat-1.jar:/opt/jboss-amq-7/lib/artemis-core-client-1.2.0.amq-700004-redhat-1.jar:/opt/jboss-amq-7/lib/commons-logging-1.2.0.redhat-2.jar:/opt/jboss-amq-7/lib/netty-all-4.0.32.Final-redhat-1.jar:/opt/jboss-amq-7/lib/artemis-jms-client-1.2.0.amq-700004-redhat-1.jar:/opt/jboss-amq-7/lib/slf4j-api-1.7.12.redhat-1.jar:/opt/jboss-amq-7/lib/artemis-selector-1.2.0.amq-700004-redhat-1.jar:/opt/jboss-amq-7/lib/commons-beanutils-1.9.2.redhat-1.jar:/opt/jboss-amq-7/lib/geronimo-jms_2.0_spec-1.0.0.alpha-2-redhat-2.jar:/opt/jboss-amq-7/lib/hawtbuf-1.11.0.redhat-1.jar" -Daoc7.jndi=/var/dtests/node_data/clients/java/aoc/src/resources/ArtemisJNDI.properties -Dlog4j.configuration=file:/var/dtests/node_data/clients/java/aoc/src/resources/log4j.properties com.redhat.mqe.jms.aoc7_sender --log-msgs dict --broker tcp://10.34.75.171:61616 --conn-username admin --conn-password admin --address "topic://myTopic" --count 1 --msg-content-map-item "string=String" tcp://10.34.75.171:61616?jms.username='admin'&jms.password='admin' 13:32:19,142 WARN Failed to generate a seed from SecureRandom within 3 seconds. Not enough entrophy? 13:32:19,142 WARN Failed to generate a seed from SecureRandom within 3 seconds. Not enough entrophy? {'redelivered': False, 'reply_to': None, 'id': '0872bca1-0dfe-11e6-8a0a-525400061be7', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1461929539597, 'properties': {'JMSXDeliveryCount': '0'}, 'content': {'string': 'String'}} 3) Try to send a message to such topic using "jms.topic.myTopic" name: $ java -cp "/var/dtests/node_data/clients/java/aoc:/usr/share/java/log4j-amq-1.2.17/log4j-1.2.17.redhat-1.jar:/usr/share/java/slf4j-api-amq-1.7.14/slf4j-api-1.7.14.redhat-1.jar:/usr/share/java/slf4j-log4j-amq-1.7.14/slf4j-log4j12-1.7.14.redhat-1.jar:/var/dtests/node_data/clients/java/aac/lib/jopt-simple-4.8.jar:/opt/jboss-amq-7/lib/activemq-client-5.11.0.redhat-621107.jar:/opt/jboss-amq-7/lib/artemis-commons-1.2.0.amq-700004-redhat-1.jar:/opt/jboss-amq-7/lib/commons-collections-3.2.2.redhat-1.jar:/opt/jboss-amq-7/lib/jboss-logging-3.3.0.Final-redhat-1.jar:/opt/jboss-amq-7/lib/artemis-core-client-1.2.0.amq-700004-redhat-1.jar:/opt/jboss-amq-7/lib/commons-logging-1.2.0.redhat-2.jar:/opt/jboss-amq-7/lib/netty-all-4.0.32.Final-redhat-1.jar:/opt/jboss-amq-7/lib/artemis-jms-client-1.2.0.amq-700004-redhat-1.jar:/opt/jboss-amq-7/lib/slf4j-api-1.7.12.redhat-1.jar:/opt/jboss-amq-7/lib/artemis-selector-1.2.0.amq-700004-redhat-1.jar:/opt/jboss-amq-7/lib/commons-beanutils-1.9.2.redhat-1.jar:/opt/jboss-amq-7/lib/geronimo-jms_2.0_spec-1.0.0.alpha-2-redhat-2.jar:/opt/jboss-amq-7/lib/hawtbuf-1.11.0.redhat-1.jar" -Daoc7.jndi=/var/dtests/node_data/clients/java/aoc/src/resources/ArtemisJNDI.properties -Dlog4j.configuration=file:/var/dtests/node_data/clients/java/aoc/src/resources/log4j.properties com.redhat.mqe.jms.aoc7_sender --log-msgs dict --broker tcp://10.34.75.171:61616 --conn-username admin --conn-password admin --address "topic://jms.topic.myTopic" --count 1 --msg-content-map-item "string=String" tcp://10.34.75.171:61616?jms.username='admin'&jms.password='admin' 13:32:29,641 WARN Failed to generate a seed from SecureRandom within 3 seconds. Not enough entrophy? 13:32:29,641 WARN Failed to generate a seed from SecureRandom within 3 seconds. Not enough entrophy? 13:32:30,012 ERROR Error while sending a message! javax.jms.InvalidDestinationException: Destination jms.topic.myTopic does not exist at org.apache.activemq.artemis.jms.client.ActiveMQSession.createProducer(ActiveMQSession.java:306) at com.redhat.mqe.jms.SenderClient.startClient(SenderClient.java:67) at com.redhat.mqe.jms.aoc7_sender.main(aoc7_sender.java:39) Note: AMQP clients have similar address resolution. Destination has to be explicitly prefixed with "jms.topic." to be able to send to such destination. Receival from such "destination-topics" via AMQP clients has never been tested, as it is blocked on AMQP drain support ENTMQ-1668 . $ ./aac1_sender.java.sh --log-msgs dict --broker amqp://10.34.75.171:5672 --conn-username admin --conn-password admin --address "topic://jms.topic.myTopic" --count 1 --msg-content-map-item "string=String" {'redelivered': False, 'reply_to': None, 'id': ':6e344ebb-03c1-4711-9de2-b81366f055eb:1:1:1-1', 'user_id':None, 'correlation_id': None, 'priority': 4, 'durable': True, 'ttl': 0, 'type': None, 'expiration': 0, 'timestamp': 1461929662623, 'destination': 'jms.topic.myTopic', 'properties': {'JMSXDeliveryCount': 1}, 'content': {'string': 'String'}} $ ./aac1_sender.java.sh --log-msgs dict --broker amqp://10.34.75.171:5672 --conn-username admin --conn-password admin --address "topic://myTopic" --count 1 --msg-content-map-item "string=String" 13:34:31,890 WARN Open of resource:(JmsProducerInfo {}) failed: AMQ219003: error finding temporary queue, AMQ219002: target address does not exist [condition = amqp:internal-error] 13:34:31,893 ERROR Error while sending a message! javax.jms.JMSException: AMQ219003: error finding temporary queue, AMQ219002: target address does not exist [condition = amqp:internal-error] I can provide more details.

    Description

      The provided bundled Openwire JMS client is unable to connect to topics, which are created as jms.topic.X.
      Although, they can only connect to such address only by calling it "X" and not by its full name "jms.topic.X".

      Attachments

        Issue Links

          Activity

            People

              gaohoward Howard Gao
              mtoth@redhat.com Michal Toth
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: