Open topic with navigation

TIBCO Rendezvous® 8.8.0

# TibrvTransport::sendRequest()

Method

## Declaration

    virtual TibrvStatus sendRequest (
        const TibrvMsg& message,
        TibrvMsg& reply,
        tibrv_f64 timeout);

## Purpose

Send a request message and wait for a reply.

## Blocking can Stall Event Dispatch

Warning | This call blocks all other activity on its program thread. If appropriate, programmers must ensure that other threads continue dispatching events on its queues.

Parameter | Description
`message` | Send this message.
`reply` | The program supplies a variable, and the method stores the inbound reply in that variable. The program owns the reply message, and must call its destructor to reclaim storage.
`timeout` | Maximum time (in seconds) that this call can block while waiting for a reply. `TIBRV_WAIT_FOREVER` (-1) indicates no timeout (wait without limit for a reply).

## Remarks

The status code TIBRV_TIMEOUT indicates that the specified time expired before receiving a reply.

Programs that receive and process the request message cannot determine that the sender has blocked until a reply arrives.

The request message must have a valid destination subject; see TibrvMsg::setSendSubject().

## Operation

This method operates in several synchronous steps:

Procedure

| 1. | Create an inbox name, and an event that listens to it. Overwrite any existing reply subject of `message` with the inbox name.

| 2. | Send the outbound `message`.

| 3. | Block until the listener receives a reply; if the time limit expires before a reply arrives, then return TIBRV_TIMEOUT. (The reply circumvents the event queue mechanism, so it is not necessary to explicitly call dispatch methods in the program.)

| 4. | Store the reply in the variable specified as the `reply` parameter.

| 5. | Return.

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-2025. Cloud Software Group, Inc. All Rights Reserved.