public class TopicSettings<T extends Serializable> extends Object
creating
a Topic. Allows the topic creator to
control the message queue size and the message deduplication policy.Modifier and Type | Class and Description |
---|---|
static class |
TopicSettings.Builder<T extends Serializable> |
Modifier and Type | Field and Description |
---|---|
static int |
QUEUE_SIZE_DEFAULT |
Modifier and Type | Method and Description |
---|---|
static <T extends Serializable> |
builder(Class<T> messageType) |
Optional<Class<T>> |
getMessageType() |
int |
getQueueSize()
If the rate at which messages are published on the topic (temporarily) exceeds the rate at which the messages
are consumed, pending messages will be stored on the topic's message queue.
|
boolean |
isDedupePendingMessages()
Whether identical
messages that haven't been dispatched yet should be
deduplicated. |
public static final int QUEUE_SIZE_DEFAULT
@Nonnull public static <T extends Serializable> TopicSettings.Builder<T> builder(@Nullable Class<T> messageType)
@Nonnull public Optional<Class<T>> getMessageType()
message
that will be sent to the topic, or
Optional.empty()
if none has been providedpublic int getQueueSize()
QUEUE_SIZE_DEFAULT
indicates that the default queue size will be used.public boolean isDedupePendingMessages()
messages
that haven't been dispatched yet should be
deduplicated. Enabling this prevents the message queue from filling up with identical messages. The deduplication
only applies to pending messages and does not take into account any messages that have been dispatched to the
TopicListener
in the past. Enabling this option is not appropriate for listeners
that care about timestamp
on the message, since deduplication only retains
the oldest (identical) message in the queue. Deduplication is performed by using the
equals
method on the message
.Copyright © 2022 Atlassian. All rights reserved.