Broker 10.5 | webMethods Broker Documentation | webMethods Broker Client C API Programmer's Guide | API Reference | awPublish | awPublishRequestAndWait
 
awPublishRequestAndWait
BrokerError awPublishRequestAndWait(
BrokerClient client,
BrokerEvent event,
int msecs,
int *n,
BrokerEvent **reply_events);
client
The Broker client that is sending the event.
event
The request event to be published.
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.
reply_events
The array of reply events that are returned.
Publishes the single event 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 awMakeTag function. This function blocks until the replies are received or until the requested time-out interval expires.
You are responsible for calling awDeleteEvent on each event that is returned. You are also responsible for calling free on the array itself.
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.
Possible BrokerError major codes
Meaning
AW_ERROR_BAD_STATE
This function was called from a callback function.
AW_ERROR_INVALID_CLIENT
The client has been destroyed or disconnected.
AW_ERROR_INVALID_EVENT
The event is invalid.
AW_ERROR_NO_PERMISSION
The client does not have permission to publish the event type.
AW_ERROR_NULL_PARAM
The parameter n or reply_events is NULL.
AW_ERROR_UNKNOWN_EVENT_TYPE
The event type does not exist on the Broker.
See also: