Le applicazioni client che sono sviluppate per WebSphere Message Broker devono utilizzare l'intestazione dei messaggi MQRFH2. Tali applicazioni possono quindi utilizzare tutte le funzioni fornite da WebSphere Message Broker.
Le applicazioni di WebSphere MQ Pubblicazione/Sottoscrizione esistenti che utilizzando l'intestazione dei messaggi MQRFH sono supportate anche da WebSphere Message Broker, ma la funzione è limitata a quella fornita da WebSphere MQ Pubblicazione/Sottoscrizione.
La WebSphere MQ Pubblicazione/Sottoscrizione non supporta il formato MQRFH2. I client che sono collegati ai broker di WebSphere MQ Pubblicazione/Sottoscrizione devono utilizzare il formato MQRFH.
Tuttavia, le applicazioni client che devono comunicare una con l'altra utilizzando la pubblicazione/sottoscrizione possono effettuare ciò indipendentemente dal formato del messaggio che utilizzano. WebSphere Message Broker fornisce la conversione automatica per assicurare che un sottoscrittore (subscriber) riceva i messaggi nel formato corretto.
Nella tabella riportata di seguito sono presenti le mappature tra campi equivalenti nelle intestazioni dei messaggi MQRFH e MQRFH2:
Nome campo MQRFH | Nome campo MQRFH2 |
---|---|
MQPSCommand | Command |
MQPSDelOpts | DelOpt |
MQPSPubOpts | PubOpt |
MQPSPubTime | PubTime |
MQPSQMgrName | QMgrName |
MQPSQName | QName |
MQPSRegOpts | RegOpt |
MQPSSeqNum | SeqNum |
MQPSTopic | Topic |
Tutti i campi MQRFH2 mostrati nella tabella sono contenuti in una cartella <psc>.
MQPSCommand Publish MQPSPubOpts RetainPub MQPSStreamName SAMPLE.BROKER.RESULTS.STREAM MQPSTopic "Sport/Soccer/State/LatestScore/Team1 Team2"
<psc> <Command>Publish</Command> <PubOpt>RetainPub</PubOpt> <Topic>Sport/Soccer/State/LatestScore/Team1 Team2</Topic> </psc>
Mediante l'uso di queste regole di mappatura, WebSphere Message Broker fa sì che le pubblicazioni MQRFH2 possano essere ancora ricevute dai sottoscrittori (subscriber) MQRFH e che le pubblicazioni MQRFH possano essere ricevute dai sottoscrittori (subscriber) MQRFH2.
I sottoscrittori (subscriber) MQRFH2 possono specificare filtri del contenuto anche se l'argomento di cui stanno eseguendo la sottoscrizione è pubblicato in formato MQRFH da un client di WebSphere MQ Pubblicazione/Sottoscrizione, sebbene sia presente qualche limite di compatibilità. Tali limitazioni sono descritte più avanti in questo argomento.
Nella tabella riportata di seguito sono presenti le opzioni valide per client che utilizzano diversi formati del messaggio.
Messaggio |
Nome opzione |
Valore opzione |
Supporto |
---|---|---|---|
Tutte le richieste |
MQPSCommand |
DeletePub |
sì |
MQMD.Format |
MQFMT_PCF |
no |
|
MQMD.Report |
MQRO_PAN |
sì |
|
MQMD.MsgType |
MQMT_REQUEST |
sì |
|
MQMD.MsgId |
|
sì |
|
MQMD.CorrelId |
|
sì4 |
|
MQMD.ReplyToQ |
|
sì |
|
MQMD.ReplyToQMgr |
|
sì |
|
MQPSStreamName |
|
con prefisso sull'argomento3 |
|
MQPSTopic |
|
sì |
|
Tutte le richieste eccetto |
MQPSQMgrName |
|
sì |
MQPSQName |
|
sì |
|
MQPSRegOpts |
CorrelAsId |
sì |
|
Elimina pubblicazione |
MQPSDelOpts |
Local |
sì5 |
Annulla registrazione autore (publisher)1 |
MQPSRegOpts |
DeregAll |
sì |
Annulla registrazione sottoscrittore (subscriber) |
MQPSRegOpts |
DeregAll |
sì |
Pubblica |
Campi MQMD |
Come specificato da MQPS2 |
sì |
MQPSRegOpts |
Anon |
sì7 |
|
Local |
sì5 |
||
DirectReq |
sì1 |
||
MQPSPubOpts |
NoReg |
sì1 |
|
RetainPub |
sì (impostato dall'autore - publisher) |
||
IsRetainedPub |
sì (impostato dal broker) |
||
OtherSubsOnly |
sì |
||
MQPSPubTime |
|
sì |
|
MQPSSeqNum |
|
sì |
|
MQPSStringData1 |
|
sì |
|
MQPSIntData1 |
|
sì |
|
Registra autore (publisher)1 |
MQPSRegOpts |
Anon |
sì7 |
Local |
sì5 |
||
DirectReq |
sì1 |
||
Registra sottoscrittore (subscriber) |
MQPSRegOpts |
Anon |
sì7 |
Local |
sì5 |
||
NewPubsOnly |
sì |
||
PubOnReqOnly |
sì |
||
InclStreamName |
no3 |
||
InformIfRet |
sì |
||
Tutte le risposte |
MQPSCompCode |
|
aggiunti nuovi valori6 |
MQPSReason |
|
aggiunti nuovi valori6 |
|
MQPSReasonText |
|
aggiunti nuovi valori6 |
|
MQPSCommand |
|
comando a cui questa è |