Message formats

Client applications that are developed for WebSphere Event Broker should use the MQRFH2 message header. These applications can then use all the function provided by WebSphere Event Broker.

Existing WebSphere MQ Publish/Subscribe applications that use the MQRFH message header are also supported by WebSphere Event Broker, but function is limited to that provided by WebSphere MQ Publish/Subscribe.

WebSphere MQ Publish/Subscribe does not support the MQRFH2 format. Clients that are connected to WebSphere MQ Publish/Subscribe brokers must use the MQRFH format.

However, client applications that need to communicate with one another using publish/subscribe can do so regardless of the message format that they use. WebSphere Event Broker provides automatic conversion to ensure that a subscriber receives messages in the correct format.

The following table shows the mapping between equivalent fields in the MQRFH and MQRFH2 message headers:

MQRFH field name MQRFH2 field name
MQPSCommand Command
MQPSDelOpts DelOpt
MQPSPubOpts PubOpt
MQPSPubTime PubTime
MQPSQMgrName QMgrName
MQPSQName QName
MQPSRegOpts RegOpt
MQPSSeqNum SeqNum
MQPSTopic Topic

All the MQRFH2 fields that are shown in the table are contained in a <psc> folder.

Field names that are not shown in the table do not have a common meaning, or are valid in only one of the two header formats. Field names that are not recognized, or not appropriate to the other format, are not copied. For example, the following name-value area of an MQRFH:
MQPSCommand Publish
MQPSPubOpts RetainPub
MQPSStreamName SAMPLE.BROKER.RESULTS.STREAM
MQPSTopic "Sport/Soccer/State/LatestScore/Team1 Team2"
is converted to this MQRFH2 folder:
<psc>
<Command>Publish</Command>
<PubOpt>RetainPub</PubOpt>
<Topic>Sport/Soccer/State/LatestScore/Team1 Team2</Topic>
</psc>

Using these mapping rules, WebSphere Event Broker makes sure that MQRFH2 publications can still be received by MQRFH subscribers, and that MQRFH publications can be received by MQRFH2 subscribers.

Content filters can be specified by MQRFH2 subscribers even if the topic that they are subscribing to is one that is published in MQRFH format by an WebSphere MQ Publish/Subscribe client, although there is some limit to compatibility. These limitations are described later in this topic.

The next table summarizes the valid options for clients that use the different message formats.

Message

Option Name

Option Value

Support

All requests
(client to broker)

MQPSCommand

DeletePub
DeregPub
DeregSub
Publish
RegPub
RegSub
ReqUpdate

yes
yes1
yes
yes
yes1
yes
yes

MQMD.Format

MQFMT_PCF
MQFMT_RF_HEADER

no
yes

MQMD.Report

MQRO_PAN
MQRO_NAN

yes
yes

MQMD.MsgType

MQMT_REQUEST
MQMT_DATAGRAM

yes
yes

MQMD.MsgId

 

yes

MQMD.CorrelId

 

yes4

MQMD.ReplyToQ

 

yes

MQMD.ReplyToQMgr

 

yes

MQPSStreamName

 

prefixed on topic3

MQPSTopic

 

yes

All requests except
Delete Publication

MQPSQMgrName

 

yes

MQPSQName

 

yes

MQPSRegOpts

CorrelAsId

yes

Delete Publication

MQPSDelOpts

Local

yes5

Deregister Publisher1

MQPSRegOpts

DeregAll

yes

Deregister Subscriber

MQPSRegOpts

DeregAll

yes

Publish

MQMD fields

As specified by MQPS2

yes

MQPSRegOpts

Anon

yes7

Local

yes5

DirectReq

yes1

MQPSPubOpts

NoReg

yes1

RetainPub

yes (set by publisher)

IsRetainedPub

yes (set by broker)

OtherSubsOnly

yes

MQPSPubTime

 

yes

MQPSSeqNum

 

yes

MQPSStringData1

 

yes

MQPSIntData1

 

yes

Register Publisher1

MQPSRegOpts

Anon

yes7

Local

yes5

DirectReq

yes1

Register Subscriber

MQPSRegOpts

Anon

yes7

Local

yes5

NewPubsOnly

yes

PubOnReqOnly

yes

InclStreamName

no3

InformIfRet

yes

All responses
(broker to client)

MQPSCompCode

 

new values added6

MQPSReason

 

new values added6

MQPSReasonText

 

new values added6

MQPSCommand

 

command to which this is
a response

Notes:
  1. This option is supported for migration purposes.
  2. MQPS is WebSphere MQ Publish/Subscribe.
  3. The stream name parameter is effectively prefixed on the topic. The stream name can be deduced from the queue name if the property implicitStreamNaming of the Publication node is set.
  4. The client identity is determined as the concatenation of the queue manager name, the queue name, and optionally the correlation id (when the correlation ID as identity option is set). The application identifier is thus "MQPSQMgrName:MQPSQName[:correlId]". The default values specified by WebSphere MQ Publish/Subscribe are used if these values are not present in a message.
  5. The behavior of this option differs.
  6. New values have been added.
  7. Ignored by WebSphere Event Broker.