How to subscribe to existing ActiveMQ topics using the JMS Input Adapter

How to subscribe to existing ActiveMQ topics using the JMS Input Adapter

book

Article ID: KB0075198

calendar_today

Updated On:

Products Versions
TIBCO Streaming 7

Description

I've set create-destinations="false" in my jmsreader.sbconf configuration file. When I attempt to subscribe to an existing topic on the ActiveMQ server, I see the following exception:
 
2013-01-22 10:44:51.504-0500 [TaskRunner] DEBUG InFromJMS - Server Server1 is now connected.
2013-01-22 10:44:51.508-0500 [TaskRunner] DEBUG InFromJMS - Looking up destination MarketData.SYM in JNDI
2013-01-22 10:44:51.514-0500 [TaskRunner] ERROR InFromJMS - Could not find JMS destination MarketData.SYM in JNDI. Cause: Could not find JNDI object MarketData.SYM using settings configured for JMS server Server1: MarketData.SYM
com.streambase.sb.StreamBaseException: Could not find JNDI object MarketData.SYM using settings configured for JMS server Server1: MarketData.SYM
at com.streambase.sb.adapter.common.jms.common.JNDISettings.jndiLookup(JNDISettings.java:176) ~[na:na]
at com.streambase.sb.adapter.common.jms.common.JMSServer.lookupDestination(JMSServer.java:229) [na:na]
at com.streambase.sb.adapter.common.jms.common.JMSServer.lookupOrCreateDestination(JMSServer.java:296) [na:na]

Issue/Introduction

How to subscribe to existing ActiveMQ topics using the JMS Input Adapter

Resolution

For topics that already exist in ActiveMQ, use the prefix 'dynamicTopics/' in the destination name attribute in your jmsreader.sbconf configuration file. For example:
 
<destinations>
<destination name="dynamicTopics/MarketData.SYM"/>
</destinations>


This allows you to locate topics using JNDI without any configuration, as described in the ActiveMQ Help under Apache ActiveMQ > Connectivity > Containers > JNDI Support