CMListener.ConfirmMessage

Method

Visual Basic

Public Sub ConfirmMessage(
    ByVal message As Message);

C#

public void ConfirmMessage(
    Message message );

Purpose

Explicitly confirm delivery of a certified message.

Remarks

Use this method only in programs that override automatic confirmation (see CMListener.SetExplicitConfirmation). The default behavior of certified listeners is to automatically confirm delivery when the callback method returns.

Parameter

Description

message

Confirm receipt of this message.

Unregistered Message

When a CM listener receives a labeled message, its behavior depends on context:

If a CM listener is registered for certified delivery, it presents the supplementary information to the callback method. If the sequence number is present, then the receiving program can confirm delivery.
If a CM listener is not registered for certified delivery with the sender, it presents the sender’s name to the callback method, but omits the sequence number. In this case, the receiving program cannot confirm delivery; CMListener.ConfirmMessage throws an exception with the status code NotPermitted.

Notice that the first labeled message that a program receives on a subject might not be certified; that is, the sender has not registered a certified delivery agreement with the listener. If appropriate, the certified delivery library automatically requests that the sender register the listener for certified delivery. (See Discovery and Registration for Certified Delivery.)

A labeled but uncertified message can also result when the sender explicitly disallows or removes the listener.

See Also

CMListener

CMListener.SetExplicitConfirmation