Reputation: 511
I'm trying to send messages between an application using WebSphere MQ queues, and a nodeJS application using the Websphere MQ topics via the MQTT protocol.
I know we can create an alias queue :
Now, I want the opposite procedure:
How can I create an alias topic pointing to a queue ? In that case, the nodeJS applicaton would be able to listen to the incoming messages via the alias topic from the other application which pushes messages on the original queue.
Configuration :
Upvotes: 1
Views: 1682
Reputation: 511
Finally, I found myself the answer.
To resolve it, I had to create a subscription, specifying the topic source and the queue destination. To do it, in the IBM WebSphere MQ Explorer :
That's it ! There were the minimal prerequisites to make it, but you can specify other options. You can check the properties of subscription on the documentation via this link : https://www.ibm.com/support/knowledgecenter/SSFKSJ_7.5.0/com.ibm.mq.explorer.doc/e_properties_subs.htm
Note : The instructions' words can be slightly different because I translated the functionnalities of the Websphere MQ software from french to english to answer this post.
(Edit) Explanation :
My NodeJS application has to communicate both ways (publish/receive) with the other app. As @Shashi said in the comments, MQTT protocol basically works only with Publish/Subscribe model. However, it is able to communicates with a queue thanks to the "Subscription" functionnality of IBM WebSphere MQ software as I explain earlier.
Indeed, according to what I understand, the "Subscription" functionnality is a kind of "bridge" linking/converting a topic (for the NodeJS) to a destination queue (for the app).
It is the opposite of what an AliasQueue can be for a Topic in IBM Websphere MQ :
"An alias name can also resolve to a topic. If an application currently puts messages onto a queue, it can be made to publish to a topic by making the queue name an alias for the topic. No change to the application code is necessary." (from the documentation)
Upvotes: 0