Labeled Messages
A labeled message is like an ordinary Rendezvous message, except that it includes supplementary information, which CM transports can use for certified message delivery:
• | The correspondent name of the CM transport that sent the message. |
• | A sequence number assigned by the sending CM transport. |
• | A time limit, after which the sending program no longer expects its CM transport to certify delivery of the message. |
Sending a Labeled Message
Any CM transport can send a labeled message by using the sending calls in the certified message delivery library layer (see CM Send Calls).
C |
|
C++ |
|
Java |
|
.NET |
|
Receiving a Labeled Message
Two kinds of listening transport can receive labeled messages:
• | An ordinary transport listens by creating an ordinary listening event. |
• | A CM transport listens by creating a CM listening event. |
Ordinary Listener Transport
When an ordinary transport receives a labeled message, it presents it to the appropriate callback function as if it were an ordinary message. That is, it ignores the supplementary information that distinguishes a labeled message (the sender’s correspondent name and sequence number).
CM Listener Transport
When a CM transport receives a labeled message, its behavior depends on context:
• | If the CM listener transport is registered for certified delivery, it presents the supplementary information to the callback function. |
• | If a CM listener transport is not registered for certified delivery with the sending CM transport, it presents the sending transport’s correspondent name to the callback function, but omits the sequence number. |
In addition, if appropriate, the CM listener transport automatically requests that the sending transport register the listener for certified delivery. (See Discovery and Registration for Certified Delivery.)