title: JMS Query: How to define Topic along with Queue?
body: <p>We have already defined the inboundConnector in our jms-context.xml as specified in <a href="http://activemq.apache.org/jms-and-jdbc-operations-in-one-transaction.html" rel="nofollow">http://activemq.apache.org/jms-and-jdbc-operations-in-one-transaction.html</a> for Queue</p>
  
  <p>I have defined a new inboundTopicConnector for topic and when i send a message for the topic it gives the following error java.lang.UnsupportedOperationException: A destination must be specified.</p>
  
  <p>Could you please help me how to resolve the issue?</p>
  
  <p>in jms-context.xml</p>
  
  <pre><code>bean id="inboundConnector" ....
  property name="destinationType" value="javax.jms.Queue"
  
  bean id="inboundTopicConnector" ...
  property name="destination" value="${jms.topic}"
  property name="destinationType" value="javax.jms.Topic"
  </code></pre>
  
  <p>in jms-context-without-inbound-listeners.xml</p>
  
  <pre><code>bean id="sendTo" ...
  bean id="topic" class="org.apache.activemq.command.ActiveMQTopic"
  property name="physicalName" value="${jms.topic}"
  </code></pre>
  
  <p>in java file</p>
  
  <pre><code>@Autowired
    @Qualifier("topic")
    private Destination destination;
            getJMSTemplate().setPubSubDomain(true);
            getJMSTemplate().send(this.destination, new MessageCreator() {
              @Override
              public Message createMessage(Session session) throws JMSException {
                return session.createTextMessage("Hello...." + destination);
              }
            });
  </code></pre>
  
  <p>Thanks,
  Kathir</p>