We have already defined the inboundConnector in our jms-context.xml as specified in http://activemq.apache.org/jms-and-jdbc-operations-in-one-transaction.html for Queue
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.
Could you please help me how to resolve the issue?
in jms-context.xml
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"
in jms-context-without-inbound-listeners.xml
bean id="sendTo" ...
bean id="topic" class="org.apache.activemq.command.ActiveMQTopic"
property name="physicalName" value="${jms.topic}"
in java file
@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);
}
});
Thanks, Kathir