ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Connectivity issues MQTTPublish & MQTTSubscribe

Post new topic  Reply to topic
 Connectivity issues MQTTPublish & MQTTSubscribe « View previous topic :: View next topic » 
Author Message
Lucky
PostPosted: Wed Feb 08, 2017 3:09 am    Post subject: Connectivity issues MQTTPublish & MQTTSubscribe Reply with quote

Apprentice

Joined: 06 Feb 2007
Posts: 35

Hi All,

Create a simple flow to check MQTTPublish n MQTTSubscribe nodes on IIB10 on Windows 7.

Flow 1: MQInput - sending an XML message to the queue and is connected to MQTTPublish node. TopicName is mentioned is 'News'
Flow 2: MQTTSubscribe - subscribinb to the same topic and connected to an OUT queue.

We have enabled the MQTTServer using
mqsireportproperties IIB -b pubsub -o MQTTServer -n enabled
Subscriber flow is not getting invoked.

Thanks.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Feb 08, 2017 5:00 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

What type of MQTT server are you connecting to?
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Lucky
PostPosted: Wed Feb 08, 2017 9:44 pm    Post subject: Reply with quote

Apprentice

Joined: 06 Feb 2007
Posts: 35

Hi Jeff,

We haven't connected to any explicit MQTT server... Is that required? If so please help us with some information here. In order to check on MQTT pub sub locally we tried this sample where in we are publishing using an flow and subscribing to the same event in an another flow.
I am able to publish messages using MQTTPublish node.


Thanks.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Feb 09, 2017 5:17 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Well. Perhaps IIB10 has a built in MQTT server...

In general, MQTT is like MQ, in that you can't use two MQ clients to talk directly to each other. Ah, a little bit of research. By default they use the MQTelemetry service in MQ.

How have you determined that you were able to publish? Because the publish node doesn't throw an error?

You should run a user trace of the flows.

You should also verify that the topics for the publication are the same as the topics for the subscription.

You should also create an MQ Subscription object that subscribes to the same topic... (If it's possible to sbscribe to an MQTT topic with an MQ subscriber... not 100% sure from reading the doc)
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Feb 09, 2017 6:04 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

It all depends if you're using the IIB embedded MQTT server or the queue manager's MQTT server... You cannot mix and match. You have to subscribe to the server you published to.
For the rest as mqjeff said, make sure the publish and subscription strings match first. You can then experiment with wildcards.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Lucky
PostPosted: Thu Feb 09, 2017 8:47 pm    Post subject: Reply with quote

Apprentice

Joined: 06 Feb 2007
Posts: 35

Hi,

Yes I am using IIB embedded MQTTserver. I am using pub and sub details on both the nodes. I am not using any wild cards.

Also, I've connected a trace node after MQTTPublish node to know if publication is done without errors. Even with the user trace i see its published.


Code:
UserTrace   BIP3907I: Message received and propagated to 'out' terminal of input node 'PubSub_MsgFlow.MQ Input'.
UserTrace   BIP6060I: Node 'PubSub_MsgFlow.MQ Input' used parser type ''Properties'' to process a portion of the incoming message of length '0' bytes beginning at offset '0'.
UserTrace   BIP6061I: Node 'PubSub_MsgFlow.MQ Input' used parser type ''XMLNSC'' to process a portion of the incoming message of length '52' bytes beginning at offset '364'. The parser type was selected based on value ''XMLNSC'' from the previous parser.
UserTrace   BIP7944I: A message is being processed in node ''PubSub_MsgFlow.MQTTPublish'', with the following attributes derived from the policy at '''': ''logLabel: PubSub_MsgFlow.MQTTPublish''.
 Each message that is processed by the node might use different attributes derived from a policy. This message records the attribute values that are used for a specific message.
 No user action required.
UserTrace   BIP12062E: Lost connection to ''tcp://localhost:11884''.
 Lost connection to ''tcp://localhost:11884''.
UserTrace   BIP12063I: Established connection to ''tcp://localhost:11884''.
 Established connection to ''tcp://localhost:11884''.
UserTrace   BIP12097I: Published to topic ''News'' with quality of service ''2''.
 Published to topic ''News'' with quality of service ''2''.
UserTrace   BIP3903I: Node (class='ComIbmOutputNode', name='MQTTPublish') propagating to 'out' terminal.
 The specified node is about to propagate a message to the specified terminal.
 No user action required.  This is an information message.
UserTrace   BIP2539I: Node 'PubSub_MsgFlow.Trace': Evaluating expression ''Root'' at ('', '1.3'). This resolved to ''Root''. The result was ''ROW... Root Element Type=16777216 NameSpace='' Name='Root' Value=NULL''.
UserTrace   BIP4067I: Message propagated to output terminal for trace node 'PubSub_MsgFlow.Trace'.
 The trace node 'PubSub_MsgFlow.Trace' has received a message and is propagating it to any nodes connected to its output terminal.
 No user action required.
UserTrace   BIP13033I: Committed a locally-coordinated transaction on WebSphere MQ queue manager ''BKRQMGR''.
 Successfully committed a locally-coordinated transaction on WebSphere MQ queue manager ''BKRQMGR''.
UserTrace   BIP11506I: Committed a local transaction.
 A local transaction has been committed for work done on the message flow thread.
UserTrace   BIP11504I: Waiting for data from input node ''MQ Input''.
 A thread is waiting for data from input node ''MQ Input'' in flow ''PubSub_MsgFlow''.
UserTrace   BIP12063I: Established connection to ''tcp://localhost:11884''.
 Established connection to ''tcp://localhost:11884''.
UserTrace   BIP12095I:  Subscribed to topic ''News'' with quality of service ''2''.
  Subscribed to topic ''News'' with quality of service ''2''.
UserTrace   BIP13025I: Connected to WebSphere MQ queue manager ''BKRQMGR''.
 Successfully connected to WebSphere MQ queue manager ''BKRQMGR''.
UserTrace   BIP13024I: Disconnected from WebSphere MQ queue manager ''BKRQMGR''.
 Successfully disconnected from WebSphere MQ queue manager ''BKRQMGR''.
UserTrace   BIP13025I: Connected to WebSphere MQ queue manager ''BKRQMGR''.
 Successfully connected to WebSphere MQ queue manager ''BKRQMGR''.
UserTrace   BIP13024I: Disconnected from WebSphere MQ queue manager ''BKRQMGR''.
 Successfully disconnected from WebSphere MQ queue manager ''BKRQMGR''.
UserTrace   BIP3907I: Message received and propagated to 'out' terminal of input node '.InputNode'.
UserTrace   BIP6060I: Node '.InputNode' used parser type ''Properties'' to process a portion of the incoming message of length '0' bytes beginning at offset '0'.
UserTrace   BIP6061I: Node '.InputNode' used parser type ''MQMD'' to process a portion of the incoming message of length '364' bytes beginning at offset '0'. The parser type was selected based on value ''MQHMD'' from the previous parser.
UserTrace   BIP6061I: Node '.InputNode' used parser type ''XMLS'' to process a portion of the incoming message of length '409' bytes beginning at offset '364'. The parser type was selected based on value ''XMLS'' from the previous parser.
Information  BIP2152I: Configuration message received from integration node.
 An integration server received a command from the integration node.
 No user action required.
Information  BIP2153I: About to ''Change'' an integration server.
 An integration server is about to perform an action.
 No user action required.


Thanks.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Feb 10, 2017 4:16 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

What if you use the MQTT sample client to point to the embedded MQTT server?

Do you get the publication?
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Feb 10, 2017 5:27 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

You cannot publish on node A and subscribe on node B. You need to subscribe to the node you published on. This is why you need to set the MQTT server for the subscription to the node you published on (which may or may not be the node the publication flow runs on)
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Fri Feb 10, 2017 5:39 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

fjb_saper wrote:
You cannot publish on node A and subscribe on node B. You need to subscribe to the node you published on.


Or publish and subscribe on an external MQTT server... like MessageSight shameless plug
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Lucky
PostPosted: Mon Feb 13, 2017 11:50 pm    Post subject: Reply with quote

Apprentice

Joined: 06 Feb 2007
Posts: 35

Quote:

You cannot publish on node A and subscribe on node B. You need to subscribe to the node you published on. This is why you need to set the MQTT server for the subscription to the node you published on (which may or may not be the node the publication flow runs on)


I have done pub sub in same single message flow and deployed to one server.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Connectivity issues MQTTPublish & MQTTSubscribe
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.