Open topic with navigation

TIBCO Rendezvous® 8.7.0

# TibrvMsgCallback.onMsg()

Method

## Declaration

    void onMsg(
        TibrvListener listener,
        TibrvMsg msg)

## Purpose

Process inbound messages (listener events).

Parameter | Description
`listener` | This parameter receives the listener event.
`msg` | This parameter receives the inbound message.

## Remarks

Implement this method to process inbound messages.

If your application requires a more complex processing arrangement, it can detach individual messages, and pass them to other threads for processing. To detach a message, use the copy constructor to make an independent copy of it. In the JNI implementation, you must detach a copy in order to use the message outside the scope of the callback. (If your program detaches a message, then you must also ensure that no references to the copy remain; such references could interfere with garbage collection. Furthermore, when using the TIBCO Rendezvous JNI preferred library, we recommend that programs call TibrvMsg.dispose() to explicitly release the copy’s storage within the native C environment.)

## CM Label Information

The callback method for certified delivery messages can use certified delivery (CM) label information to discriminate these situations:

| • | If TibrvCmMsg.getSender() returns `null`, then the message uses the reliable protocol (that is, it was sent from an ordinary transport).

| • | If TibrvCmMsg.getSender() returns a valid sender name, then the message uses the certified delivery protocol (that is, it is a labeled message, sent from a CM transport).

## See Also

TibrvCmListener()

TibrvCmMsg.getSender()

TibrvCmMsg.getSequence()

TibrvCmMsg.getTimeLimit()

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.