Open topic with navigation

TIBCO Rendezvous® 8.7.0

# TibrvVectorCallback.onMsgs()

Method

## Declaration

    void onMsgs(
        TibrvMsg messages[])

## Purpose

Process inbound message vectors (vector listener events).

Parameter | Description
`messages` | This parameter receives an array of inbound messages.

## Remarks

Implement this method to process inbound message vectors.

In the simplest arrangement, your callback method processes the messages in the array. When the callback method returns, the Rendezvous library deallocates the array.

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.)

It is illegal to pass the message array to a different thread for processing, or to use it as dynamically-allocated storage.

Notice that in contrast to TibrvMsgCallback.onMsg(), this vector callback does not receive the listener event as an argument. You can use TibrvMsg.getEvent() to get it from the individual message objects.

## Restrictions

This interface method is available only in the JNI preferred implementation. It is not available in the JNI backward compatibility implementation, nor in the pure Java implementation.

## See Also

TibrvMsg()

TibrvMsg.dispose()

TibrvMsg.getEvent()

TibrvVectorListener()

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.