@ProviderType public interface RequestReplyMessagePublisher extends MessagePublisher
This API expected to be thread safe.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
RequestReplyMessagePublisher.ReplyMessageHandler
An interface to handle a reply message for the request-reply use case.
|
LifecycleControl.TerminationEvent, LifecycleControl.TerminationNotificationListenerPublisherHealthCheck.PublisherReadinessListenerManageablePublisher.DirectPublisherInfo, ManageablePublisher.PersistentPublisherInfo, ManageablePublisher.PublisherInfo| Modifier and Type | Method and Description |
|---|---|
void |
publish(OutboundMessage requestMessage,
Properties additionalMessageProperties,
RequestReplyMessagePublisher.ReplyMessageHandler replyMessageHandler,
Object userContext,
Topic requestDestination,
long replyTimeout)
Sends a request for reply message; nonblocking.
|
void |
publish(OutboundMessage requestMessage,
RequestReplyMessagePublisher.ReplyMessageHandler replyMessageHandler,
Object userContext,
Topic requestDestination,
long replyTimeout)
Sends a request for reply message; nonblocking.
|
void |
publish(OutboundMessage requestMessage,
RequestReplyMessagePublisher.ReplyMessageHandler replyMessageHandler,
Topic requestDestination,
long replyTimeout)
Sends a request for reply message; nonblocking.
|
InboundMessage |
publishAwaitResponse(OutboundMessage requestMessage,
Properties additionalMessageProperties,
Topic requestDestination,
long replyTimeout)
Sends a request message return response message that blocks until a response is received or a
timeout occurs.
|
InboundMessage |
publishAwaitResponse(OutboundMessage requestMessage,
Topic requestDestination,
long replyTimeout)
Sends a request message return response message that blocks until a response is received or a
timeout occurs.
|
RequestReplyMessagePublisher |
start()
Enables service regular duties.
|
<RequestReplyMessagePublisher> |
startAsync()
Asynchronously starts service for consuming/publishing operations.
|
<RequestReplyMessagePublisher> |
startAsync(CompletionListener<RequestReplyMessagePublisher> startListener)
Asynchronously starts service for consuming/publishing operations using a callback for
completion notification.
|
isRunning, isTerminated, isTerminating, setTerminationNotificationListener, terminateterminateAsync, terminateAsyncisReady, notifyWhenReady, setPublisherReadinessListenerpublisherInfoRequestReplyMessagePublisher start()
LifecycleControlstart in interface LifecycleControl<RequestReplyMessagePublisher> CompletableFuture<RequestReplyMessagePublisher> startAsync() throws PubSubPlusClientException
AsyncLifecycleControlThis method is an idempotent operation when no another connect/disconnect operation is ongoing.
startAsync in interface AsyncLifecycleControlPubSubPlusClientException - if the messaging service will not start in the future<RequestReplyMessagePublisher> void startAsync(CompletionListener<RequestReplyMessagePublisher> startListener) throws PubSubPlusClientException, IllegalStateException
AsyncLifecycleControlstartAsync in interface AsyncLifecycleControlRequestReplyMessagePublisher - the type of response returned on a successful start operationstartListener - the callback for future notifications about the completion of the start
processPubSubPlusClientException - if the messaging service will not start in the futureIllegalStateException - if the method has been invoked at an illegal or inappropriate
timevoid publish(OutboundMessage requestMessage, RequestReplyMessagePublisher.ReplyMessageHandler replyMessageHandler, Topic requestDestination, long replyTimeout)
The API handles correlation so no special correlation identifier is required.
requestMessage - the request message to sendreplyMessageHandler - the callback handler to process the reply message when it has
arrived or when a timeout has occurredrequestDestination - the destination for request messagesreplyTimeout - the maximum time to wait for a response message (in milliseconds)IllegalArgumentException - if the value of the specified replyTimeout is negative
valuevoid publish(OutboundMessage requestMessage, RequestReplyMessagePublisher.ReplyMessageHandler replyMessageHandler, Object userContext, Topic requestDestination, long replyTimeout)
Supports user-context propagation.
The API handles correlation so no special correlation identifier is required.
requestMessage - the request message to sendreplyMessageHandler - the callback handler to process the reply message when it has
arrived or when a timeout has occurreduserContext - the context that's available during response message processingrequestDestination - the destination for request messagesreplyTimeout - the maximum time to wait for a response message (in milliseconds)IllegalArgumentException - if the value of the specified replyTimeout is negative
valuevoid publish(OutboundMessage requestMessage, Properties additionalMessageProperties, RequestReplyMessagePublisher.ReplyMessageHandler replyMessageHandler, Object userContext, Topic requestDestination, long replyTimeout)
Supports user-context propagation.
The API handles correlation so no special correlation identifier is required.
requestMessage - the request message to sendadditionalMessageProperties - the additional properties (Key of type String and
Value of type String) to customize a particular
message where each key can be customer-provided, or it can
be a key from a SolaceProperties.MessageProperties
instancereplyMessageHandler - the callback handler to process the reply message when it
has arrived or when a timeout has occurreduserContext - the context that's available during response message
processingrequestDestination - the destination for request messagesreplyTimeout - the maximum time to wait for a response message (in
milliseconds)IllegalArgumentException - if the value of the specified replyTimeout is negative
valueInboundMessage publishAwaitResponse(OutboundMessage requestMessage, Topic requestDestination, long replyTimeout) throws PubSubPlusClientException.TimeoutException, PubSubPlusClientException.MessageRejectedByBrokerException, PubSubPlusClientException.PublisherOverflowException, PubSubPlusClientException, InterruptedException, IllegalArgumentException
requestMessage - the request message to sendrequestDestination - the destination for request messagesreplyTimeout - the maximum time to wait for a response message (in milliseconds)PubSubPlusClientException.TimeoutException - if the response from a replier does not come on timePubSubPlusClientException.MessageRejectedByBrokerException - if the broker rejects messages from a publisherPubSubPlusClientException.PublisherOverflowException - if the internal publishing capacities are exceededPubSubPlusClientException - if some internal error occursInterruptedException - if any thread has interrupted the current thread. The
interrupted status of the current thread is
cleared when this exception is thrown.IllegalArgumentException - if the value of the specified replyTimeout is
negative valueInboundMessage publishAwaitResponse(OutboundMessage requestMessage, Properties additionalMessageProperties, Topic requestDestination, long replyTimeout) throws PubSubPlusClientException.TimeoutException, PubSubPlusClientException.MessageRejectedByBrokerException, PubSubPlusClientException.PublisherOverflowException, PubSubPlusClientException, InterruptedException, IllegalArgumentException
requestMessage - the request message to sendadditionalMessageProperties - the additional properties (Key of type String and
Value of type String) to customize a particular
message where each key can be customer-provided, or it can
be a key from a SolaceProperties.MessageProperties
instancerequestDestination - the destination for request messagesreplyTimeout - the maximum time to wait for a response message (in
milliseconds)PubSubPlusClientException.TimeoutException - if the response from a replier does not come on timePubSubPlusClientException.MessageRejectedByBrokerException - if the broker rejects messages from a publisherPubSubPlusClientException.PublisherOverflowException - if the internal publishing capacities are exceededPubSubPlusClientException - if some internal error occursInterruptedException - if any thread has interrupted the current thread. The
interrupted status of the current thread is
cleared when this exception is thrown.IllegalArgumentException - if the value of the specified replyTimeout is
negative valueCopyright 2019-2025 Solace Corporation. All rights reserved.