@ProviderType public interface MessagingService extends Connectable, AsyncConnectable, Manageable, ErrorMonitoring, UpdatableConfiguration
Modifier and Type | Interface and Description |
---|---|
static interface |
MessagingService.ReconnectionAttemptListener
A callback listener for TCP level attempted reconnection.
|
static interface |
MessagingService.ReconnectionListener
A callback listener for TCP-level successful reconnection notifications.
|
static interface |
MessagingService.RequestReplyMessagingService
An interface for request-reply behavior.
|
static interface |
MessagingService.ServiceEvent
An event interface for a messaging service for which applications can listen.
|
static interface |
MessagingService.ServiceInterruptionListener
A callback listener for notifications about non-recoverable service interruptions.
|
Manageable.ApiInfo, Manageable.ApiMetrics
Modifier and Type | Method and Description |
---|---|
static MessagingServiceClientBuilder |
builder(ConfigurationProfile activeProfile)
The entry point to create a service builder.
|
MessagingService |
connect()
Connects synchronously with a PubSub+ event broker.
|
<MessagingService> |
connectAsync()
Connects asynchronously with a PubSub+ event broker.
|
<MessagingService> |
connectAsync(CompletionListener<MessagingService> connectionListener)
Connects asynchronously with a PubSub+ event broker with a callback.
|
DirectMessagePublisherBuilder |
createDirectMessagePublisherBuilder()
Creates a new instance of
DirectMessagePublisherBuilder , that is used to configure
direct message publisher instances. |
DirectMessageReceiverBuilder |
createDirectMessageReceiverBuilder()
Creates a new instance of
DirectMessageReceiverBuilder , that is used to configure
direct message receiver instances. |
MessageQueueBrowserBuilder |
createMessageQueueBrowserBuilder()
Creates a new instance of
MessageQueueBrowserBuilder , that is used to configure persistent
message queue browser instances. |
PersistentMessagePublisherBuilder |
createPersistentMessagePublisherBuilder()
Creates a new instance of
PersistentMessagePublisherBuilder , that is used to configure
persistent message publisher instances. |
PersistentMessageReceiverBuilder |
createPersistentMessageReceiverBuilder()
Creates a new instance of
PersistentMessageReceiverBuilder , that is used to configure
persistent message receiver instances. |
String |
getApplicationId()
Gets the application identifier.
|
String |
getClientName()
Gets the client name identifier.
|
OutboundMessageBuilder |
messageBuilder()
Creates an instance of
OutboundMessageBuilder that inherits configuration profile
defaults from this instance. |
MessagingService.RequestReplyMessagingService |
requestReply()
Creates
MessagingService.RequestReplyMessagingService that inherits entire configuration from this *
instance. |
void |
updateProperty(String property,
Object value)
Sets a modifiable service property once the service has been created.
|
addReconnectionAttemptListener, addReconnectionListener, disconnect, isConnected, removeReconnectionAttemptListener, removeReconnectionListener
disconnectAsync, disconnectAsync
info, metrics
addServiceInterruptionListener, removeServiceInterruptionListener
static MessagingServiceClientBuilder builder(ConfigurationProfile activeProfile)
This method is thread-safe.
activeProfile
- the active-versioned configuration profile to be appliedServiceBuilder
MessagingService connect() throws PubSubPlusClientException
Connectable
This method is idempotent when no other connect/disconnect operation is ongoing.
connect
in interface Connectable
PubSubPlusClientException
- if the messaging service can't be put in service<MessagingService> CompletableFuture<MessagingService> connectAsync() throws PubSubPlusClientException
AsyncConnectable
connectAsync
in interface AsyncConnectable
PubSubPlusClientException
- if the messaging service cannot be connected<MessagingService> void connectAsync(CompletionListener<MessagingService> connectionListener) throws PubSubPlusClientException
AsyncConnectable
connectAsync
in interface AsyncConnectable
connectionListener
- the callback for future notifications about completion state of the
connection processPubSubPlusClientException
- if the messaging service cannot be connectedDirectMessagePublisherBuilder createDirectMessagePublisherBuilder()
DirectMessagePublisherBuilder
, that is used to configure
direct message publisher instances.DirectMessagePublisherBuilder
DirectMessageReceiverBuilder createDirectMessageReceiverBuilder()
DirectMessageReceiverBuilder
, that is used to configure
direct message receiver instances.DirectMessageReceiverBuilder
MessageQueueBrowserBuilder createMessageQueueBrowserBuilder()
MessageQueueBrowserBuilder
, that is used to configure persistent
message queue browser instances.MessageQueueBrowserBuilder
PersistentMessagePublisherBuilder createPersistentMessagePublisherBuilder()
PersistentMessagePublisherBuilder
, that is used to configure
persistent message publisher instances.PersistentMessagePublisherBuilder
PersistentMessageReceiverBuilder createPersistentMessageReceiverBuilder()
PersistentMessageReceiverBuilder
, that is used to configure
persistent message receiver instances.PersistentMessageReceiverBuilder
String getApplicationId()
String getClientName()
OutboundMessageBuilder messageBuilder()
OutboundMessageBuilder
that inherits configuration profile
defaults from this instance.
Each instance can be used concurrently to produce similarly
configured messages using variety of build
methods.
OutboundMessageBuilder
MessagingService.RequestReplyMessagingService requestReply()
MessagingService.RequestReplyMessagingService
that inherits entire configuration from this *
instance.MessagingService.RequestReplyMessagingService
void updateProperty(String property, Object value) throws PubSubPlusClientException
Modifiable properties include:
SolaceProperties.AuthenticationProperties.SCHEME_OAUTH2_ACCESS_TOKEN
to update expiring access tokenSolaceProperties.AuthenticationProperties.SCHEME_OAUTH2_OIDC_ID_TOKEN
to update expiring id tokenModification of a service property may or may not occur instantly or may occur during the next session reconnection. Modification of a service property during ongoing session reconnection may apply to the next reconnection attempt.
updateProperty
in interface UpdatableConfiguration
property
- The name of the property to modify.value
- The new value of the property. null values should be avoided.IllegalStateException
- If the specified property cannot be modified in the current
service stateIllegalArgumentException
- If the specified property value is invalid or the property is
not modifiable propertyPubSubPlusClientException
- If other transport or communication related errors occurCopyright 2019-2024 Solace Corporation. All rights reserved.