@ProviderType
public interface Requestor
Requestor instance from
JCSMPSession.createRequestor().| Modifier and Type | Method and Description |
|---|---|
BytesXMLMessage |
request(XMLMessage request,
long timeoutMillis,
Destination sendDestination)
Performs a request to the specified destination.
|
BytesXMLMessage request(XMLMessage request, long timeoutMillis, Destination sendDestination) throws JCSMPException
If request has no ReplyTo destination or ReplyToSuffix set, the session's default ReplyTo destination is set on
the message.
timeoutMillis parameter controls whether this call
should operate in a blocking fashion.
If >0, the call blocks for up to the number of
milliseconds specified by timeoutMillis while the
Requestor waits for a reply. If none is received during this
time, a JCSMPRequestTimeoutException is thrown.
If 0, the call returns null after the request
message has been sent. The application should then examine incoming
messages on a XMLMessageConsumer or its
XMLMessageListener for a reply, which will be sent to the
Destination specified in the request's ReplyTo header field. To correlate
replies to sent requests, an application can use the
CorrelationId field on
outgoing requests.
DeliveryMode.PERSISTENT or DeliveryMode.NON_PERSISTENT).request - The request message to send.timeoutMillis - The amount of time to allow for a reply to come in.sendDestination - The Destination the request should be addressed to. Currently,
Topics are supported.IllegalArgumentException - If the Topic is invalid in the current session mode.JCSMPRequestTimeoutException - If a blocking request times out.JCSMPException - If there is an error sending the request, or any other JCSMP
error.Copyright 2004-2025 Solace Corporation. All rights reserved.