# Unable to consume a message from ActiveMQ topic

**URL:** <https://discuss.elastic.co/t/unable-to-consume-a-message-from-activemq-topic/175763>\
**Category:** Logstash\
**Created:** [April 8, 2019, 6:29am UTC](https://discuss.elastic.co/t/unable-to-consume-a-message-from-activemq-topic/175763 "2019-04-08T06:29:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajeshk150](https://avatars.discourse-cdn.com/v4/letter/r/7c8e57/32.png) [@rajeshk150](https://discuss.elastic.co/u/rajeshk150)\
**Post date:** [April 8, 2019, 6:29am UTC](https://discuss.elastic.co/t/unable-to-consume-a-message-from-activemq-topic/175763/1 "2019-04-08T06:29:52Z")

</div>

Hi,

I am unable to consume a message from activemq topic. The topic with the given name will be created in activemq but when I send a message for that topic, I am unable to consume the same message in logstash. The activemq version used is 5.15.8, logstash version is 6.6.2  
The configurations are as below.  
Logstash config file followed by jms.yml file.

```
input {
                  jms {
                    include_header => true
                    include_properties => true
                    include_body => true
                    use_jms_timestamp => true
                    interval => 10
                	destination => "TOPIC1"
                	pub_sub => true
                    yaml_file => "C:/Rajesh/Elk/logstash-6.6.2/config/jms.yml"
                    yaml_section => "activemq"
                  }
                }
            activemq:
              :broker_url: tcp://localhost:61616
              :username: admin
              :password: admin
              :runner: consumer
              :factory: org.apache.activemq.ActiveMQConnectionFactory
              :require_jars:
                - C:/Rajesh/Elk/logstash-6.6.2/config/activemq-all-5.15.8.jar
```

---

<div class="post-metadata">

**Author:** ![rajeshk150](https://avatars.discourse-cdn.com/v4/letter/r/7c8e57/32.png) [@rajeshk150](https://discuss.elastic.co/u/rajeshk150)\
**Post date:** [April 8, 2019, 6:31am UTC](https://discuss.elastic.co/t/unable-to-consume-a-message-from-activemq-topic/175763/2 "2019-04-08T06:31:32Z")

</div>

I am able to connect for an activemq queue and consume a message just by the config pub\_sub: false attribute. But not able to consume a message from activemq topic.  
Please help me with the same.  
Even I am able to consume an activemq queue message with jndi configuration as below, but not able to consume a topic message.

```
jndi:

      :jndi_name: ConnectionFactory

      :jndi_context:
        java.naming.factory.initial: org.apache.activemq.jndi.ActiveMQInitialContextFactory
        java.naming.provider.url: tcp://localhost:61616
        java.naming.security.principal: admin
        java.naming.security.credentials: admin

      :require_jars:
        - C:/Rajesh/Elk/logstash-6.6.2/config/activemq-all-5.15.8.jar
```

---

<div class="post-metadata">

**Author:** ![rajeshk150](https://avatars.discourse-cdn.com/v4/letter/r/7c8e57/32.png) [@rajeshk150](https://discuss.elastic.co/u/rajeshk150)\
**Post date:** [April 10, 2019, 7:14am UTC](https://discuss.elastic.co/t/unable-to-consume-a-message-from-activemq-topic/175763/3 "2019-04-10T07:14:17Z")

</div>

I am able to connect to the activemq topic and consume the message using the stomp plugin, but not able to do the same using the jms plugin. It would be helpful for us if we can achieve the same in jms plugin. Appreciate the suggestions and solutions for this query.

Thank You.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 8, 2019, 7:14am UTC](https://discuss.elastic.co/t/unable-to-consume-a-message-from-activemq-topic/175763/4 "2019-05-08T07:14:20Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
