Broker 10.5 | webMethods Broker Documentation | webMethods Broker Client C API Programmer's Guide | API Reference | awDeliver | awDeliverRequestAndWait
 
awDeliverRequestAndWait
BrokerError awDeliverRequestAndWait(
BrokerClient client,
char *dest_id,
BrokerEvent event,
int msecs,
int *n,
BrokerEvent **reply_events);
client
The Broker client that is sending the event.
dest_id
The identifier of the Broker client to which the event is to be delivered.
event
The request event to be delivered.
msecs
The number of milliseconds to block awaiting a reply. If set to AW_INFINITE, this function will block indefinitely.
n
The number of reply events returned in the events array. This parameter is used for output.
reply_events
The array of reply events that are returned. This parameter is used for output.
Sends the event to the Broker to be delivered to the Broker client specified by dest_id and then waits for all replies to be received. The last reply event is detected when an event is received with the envelope fields appSeqn and appLastSeqn being equal.
This function creates a value for the tag envelope field using the awMakeTag function. This function blocks until the replies are received or until the requested time-out interval expires.
You are responsible for deleting each event returned in reply_events, using the awDeleteEvent function, and for freeing the array itself, using free.
See Using Request-Reply for more information on using the request-reply model.
Note:
You must register a general callback object, using the awRegisterCallback function, before calling this function. Also note that an error will not be returned if the recipient, represented by dest_id, no longer exists.
Possible BrokerError major codes
Meaning
AW_ERROR_BAD_STATE
This function was called from a callback function.
AW_ERROR_INVALID_CLIENT
The Broker client, represented by the client parameter, has been destroyed or disconnected.
AW_ERROR_INVALID_EVENT
The event is invalid or does not match its type definition.
AW_ERROR_NO_PERMISSION
The client does not have permission to publish the event type.
AW_ERROR_NULL_PARAM
The parameter dest_id, n, or reply_events is NULL.
AW_ERROR_UNKNOWN_EVENT_TYPE
The event type for event does not exist on the Broker.
See also: