@ProviderType public interface DirectMessagePublisherBuilder extends MessagePublisherBuilder
DirectMessagePublisher to publish
direct messages.
This API expected to be thread safe.
| Modifier and Type | Method and Description |
|---|---|
DirectMessagePublisher |
build()
Builds a new instance of
DirectMessagePublisher based on the provided configuration. |
DirectMessagePublisherBuilder |
fromProperties(Properties configuration)
Enables property-based configuration.
|
DirectMessagePublisherBuilder |
onBackPressureElastic()
The configuration for back-pressure with an elastic, unlimited capacity buffer.
|
DirectMessagePublisherBuilder |
onBackPressureReject(int bufferCapacity)
The configuration for back-pressure with a specified number of buffered messages.
|
DirectMessagePublisherBuilder |
onBackPressureWait(int bufferCapacity)
The configuration for back-pressure with specified number of buffered messages.
|
DirectMessagePublisherBuilder fromProperties(Properties configuration) throws IllegalArgumentException
MessagePublisherBuilderfromProperties in interface MessagePublisherBuilderfromProperties in interface PropertyBasedConfigurationfromProperties in interface PublisherPropertyConfigurationconfiguration - the properties (key of type String and value of type String) for configuration and fine-tuning. Common properties can be found
in SolaceProperties and its sub-interfaces. Refer the SolaceProperties.PublisherProperties for the list of MessagePublisher properties
configurable through this MessagePublisherBuilderIllegalArgumentException - if invalid properties were specifiedDirectMessagePublisherBuilder onBackPressureReject(int bufferCapacity)
PublisherBackPressureConfigurationPubSubPlusClientException.PublisherOverflowException exception when the publishing capabilities of the API are
exceeded.onBackPressureReject in interface PublisherBackPressureConfigurationbufferCapacity - the maximum number of messages that can be buffered before the strategy
fails and messages can no longer be sent over the wire. Once this number
is exceeded, the publishing of new messages is no longer possible and
exceptions are thrown until the buffer has free capacity; value > 0 is expected.DirectMessagePublisherBuilder onBackPressureWait(int bufferCapacity)
PublisherBackPressureConfigurationbufferCapacity causes
the publisher thread to pause.onBackPressureWait in interface PublisherBackPressureConfigurationbufferCapacity - the maximum number of messages that can be buffered before the publishing
thread is pausedDirectMessagePublisherBuilder onBackPressureElastic()
PublisherBackPressureConfigurationonBackPressureElastic in interface PublisherBackPressureConfigurationDirectMessagePublisher build() throws PubSubPlusClientException
DirectMessagePublisher based on the provided configuration.PubSubPlusClientException - if a publisher for direct messages cannot be created due to
invalid properties or invalid configurationCopyright 2019-2025 Solace Corporation. All rights reserved.