Home

 

Example

Here are some examples of a NameValueString for a Publish command message. The first example is for an Event Publication sent by the match simulator in the sample application to indicate that a match has started, with 'No Registration' specified for the publisher:

 MQPSCommand     Publish
 MQPSPubOpts     NoReg
 MQPSStreamName  SAMPLE.BROKER.RESULTS.STREAM
 MQPSTopic       Sport/Soccer/Event/MatchStarted

The second example is for a State Publication, so 'Retain Publication' is specified as well. In this case the results service is publishing the latest score in the match between Team1 and Team2.

 MQPSCommand     Publish
 MQPSPubOpts     RetainPub
 MQPSPubOpts     NoReg
 MQPSStreamName  SAMPLE.BROKER.RESULTS.STREAM
 MQPSTopic       "Sport/Soccer/State/LatestScore/Team1 Team2"

In both examples the publication data (the names of the teams, or the latest score) follows the NameValueString, as string data in MQSTR format.



 

Home