Open topic with navigation

TIBCO Rendezvous® 8.7.0

# CMListener

Constructor

## Visual Basic

    Overloads Public Sub New(
     ByVal queue As Queue,
     ByVal messageReceivedEventHandler As MessageReceivedEventHandler,
     ByVal cmTransport As CMTransport,
     ByVal subject As String,
     ByVal closure As Object )
    Overloads Public Sub New(
     ByVal queue As Queue,
     ByVal cmTransport As CMTransport,
     ByVal subject As String,
     ByVal closure As Object )

## C#

    public CMListener(
        Queue queue,
        MessageReceivedEventHandler messageReceivedEventHandler,
        CMTransport cmTransport,
        string subject,
        object closure );
    public CMListener(
        Queue queue,
        CMTransport cmTransport,
        string subject,
        object closure );

## Purpose

Listen for messages that match the subject, and request certified delivery when available.

Parameter | Description
`queue` | For each inbound message, place the listener event on this event queue.
`messageReceivedEventHandler` | On dispatch, process the event with this delegate. Every listener requires a handler delegate. For convenience, supply the delegate to the constructor through this parameter. (It also possible to omit this parameter, and add the handler to the MessageReceived event later, using a .NET call.)
`cmTransport` | Listen for inbound messages on this certified delivery transport.
`subject` | Listen for inbound messages with subjects that match this specification. Wildcard subjects are permitted. The empty string is not a legal subject name.
`closure` | Store this closure data in the event object.

## Activation and Dispatch

Details of CM listener event semantics are identical to those for ordinary listeners; see Activation and Dispatch.

## Inbox Listener

To receive unicast (point-to-point) messages, listen to a unique inbox subject name. First call Transport.CreateInbox to create the unique inbox name; then call CMListener to begin listening. Remember that other programs have no information about an inbox until the listening program uses it as a reply subject in an outbound message.

## See Also

CMListener

CMTransport.Destroy

Transport.CreateInbox

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO Rendezvous®

Copyright © 1997-2023. Cloud Software Group, Inc. All Rights Reserved.