@ProviderType public interface MessageQueueBrowserBuilder extends ReceiverPropertyConfiguration
MessageQueueBrowser
to look at
persistent messages without consuming them. A client can selectively remove spooled persistent
messages while browsing a Queue. Removing browsed messages deletes them from the Queue, so that
they can no longer be delivered to consuming clients (or redelivered if they were already
delivered to consumers at some point. No confirmation is returned when a message is removed.
Further, no error is returned if you try to remove a non-existent message or a message that has
already been removed from a Queue.
This API expected to be thread safe.
Modifier and Type | Method and Description |
---|---|
MessageQueueBrowser |
build(Queue endpointToConsumeFrom)
Creates an instance of
MessageQueueBrowser . |
MessageQueueBrowserBuilder |
fromProperties(Properties configuration)
Enables property-based configuration.
|
MessageQueueBrowserBuilder |
withMessageSelector(String selectorQueryExpression)
Enables support for message selection for a queue browser based on message header parameter and
message properties values.
|
MessageQueueBrowserBuilder |
withQueueBrowserWindowSize(int windowSize)
Provides an option to configure a maximum number of messages that can be pre-fetched by the
Browser
|
MessageQueueBrowser build(Queue endpointToConsumeFrom) throws PubSubPlusClientException
MessageQueueBrowser
.endpointToConsumeFrom
- a queue for message browsing; use factory methods in Queue
interface to create Queue object that represents the target queue
on the broker. Queue to be browsed must exist on Broker as
MessageQueueBrowser does not support MissingResourcesCreationStrategy
to create a queue that does not previously exist.PubSubPlusClientException
- if the receiver instance cannot be built due to invalid
properties or invalid configurationMessageQueueBrowserBuilder fromProperties(Properties configuration)
fromProperties
in interface PropertyBasedConfiguration
fromProperties
in interface ReceiverPropertyConfiguration
configuration
- 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.QueueBrowserProperties
for the list of MessageQueueBrowser
properties configurable through this MessageQueueBrowserBuilder
IllegalArgumentException
- if invalid properties were specifiedMessageQueueBrowserBuilder withMessageSelector(String selectorQueryExpression)
Syntax of the expression is based on a subset of the SQL92 conditional expression syntax. For syntax https://docs.oracle.com/en/database/oracle/oracle-database/20/jajms/javax/jms/Message.html.
selectorQueryExpression
- uses JMS like syntax for message selector query expressionMessageQueueBrowserBuilder withQueueBrowserWindowSize(int windowSize) throws IllegalArgumentException
windowSize
- window size in messages. The valid range is 1-255. Default value is 255.IllegalArgumentException
- if window size is out of rangeCopyright 2019-2024 Solace Corporation. All rights reserved.