CMTransport.RemoveListener
Method
Visual Basic
Public SubRemoveListener(
ByVal cmName As String,
ByVal subject As String )
C#
public voidRemoveListener(
string cmName,
string subject );
Purpose
Unregister a specific listener at a specific correspondent, and free associated storage in the sender’s ledger.
Remarks
This method cancels certified delivery of the specific subject to the correspondent with this name. The listening correspondent may subsequently re-register for certified delivery of the subject. (In contrast, CMTransport.DisallowListener cancels certified delivery of all subjects to the correspondent, and prohibits re-registration.)
Senders can call this method when the ledger item for a listening correspondent has grown very large. Such growth indicates that the listener is not confirming delivery, and may have terminated. Removing the listener reduces the ledger size by deleting messages stored for the listener.
When a sending program calls this method, certified delivery software in the sender behaves as if the listener had closed the endpoint for the subject. The sending program deletes from its ledger all information about delivery of the subject to the correspondent with this cmName. The sending program receives a REGISTRATION.CLOSED advisory, to trigger any operations in the callback method for the advisory.
If the listening correspondent is available (running and reachable), it receives a REGISTRATION.NOTE_CERTIFIED advisory, informing it that the sender no longer certifies delivery of the subject.
If the correspondent with this name does not receive certified delivery of the subject from this sender CMTransport, then CMTransport.RemoveListener throws an exception with the status code InvalidArgument.
|
Parameter |
Description |
|
Cancel certified delivery of the subject to listeners of this correspondent. |
|
Cancel certified delivery of this subject to the named listener. Wildcard subjects are illegal. |