0

I need to send a JMS message to a topic on a IBM MQ.

How can I specify the desired topic name inside the liberty server.xml?

This is my current server.xml

   <jmsConnectionFactory jndiName="jms/testConnectionFactory" connectionManagerRef="testConnectionManager">
     <properties.wmqJms userName="testUser" password="testPass" transportType="CLIENT" hostName="myTestHost" port="1424" channel="SYSTEM.DEF.SVRCONN" queueManager="TestQManager"/>
  </jmsConnectionFactory>

  <connectionManager id="testConnectionManager" maxPoolSize="5"/>

  <jmsQueue id="jms/testQueue" jndiName="jms/testQueue">
    <properties.wmqJms baseQueueName="TEST.OUT" baseQueueManagerName="TestQManager"/>
  </jmsQueue>

Failed to find a snippet online which deals with topics, and I'm not interested in creating topics in code.

Any help would be appreciated

Mandark
  • 798
  • 1
  • 12
  • 33

1 Answers1

0

How about:

<jmsTopic id="myTopic" jndiName="jms/myTopic">
  <properties.wmqJms baseTopicName="MyTopic"/>
</jmsTopic>

(Edited since you already had a ConnFactory and a ConnMgr, and I didn't mean to suggest you needed to change them.)

Scott Kurz
  • 4,985
  • 1
  • 18
  • 40