Package org.redisson.api
Interface RReliableFanoutAsync<V>
- Type Parameters:
V
- The type of message payload
- All Superinterfaces:
RExpirableAsync
,RObjectAsync
- All Known Subinterfaces:
RReliableFanout<V>
Reliable fanout implementation that ensures message delivery to subscribed queues.
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionReturns amount of subscribers to this fanout.Returns a list of the names of all subscribers to this fanout.isSubscribedAsync
(String name) Checks if a queue with the specified name is subscribed to this fanout.publishAsync
(FanoutPublishArgs<V> args) Publishes a message to all subscribed queues based on the provided arguments.publishManyAsync
(FanoutPublishArgs<V> args) Publishes multiple messages to all subscribed queues based on the provided arguments.removeFilterAsync
(String name) Removes a filter for the specified queue name .setFilterAsync
(String name, MessageFilter<V> filter) Sets a filter that is applied to all messages published to the queue through this fanout.subscribeQueueAsync
(String name) Subscribes a queue with the specified name to this fanout.subscribeQueueAsync
(String name, MessageFilter<V> filter) Subscribes a queue with the specified name to this fanout with a filter.unsubscribeAsync
(String name) Unsubscribes a queue with the specified name from this fanout.Methods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, expireIfGreaterAsync, expireIfGreaterAsync, expireIfLessAsync, expireIfLessAsync, expireIfNotSetAsync, expireIfNotSetAsync, expireIfSetAsync, expireIfSetAsync, getExpireTimeAsync, remainTimeToLiveAsync
Methods inherited from interface org.redisson.api.RObjectAsync
addListenerAsync, copyAndReplaceAsync, copyAndReplaceAsync, copyAsync, copyAsync, copyAsync, deleteAsync, dumpAsync, getAccessFrequencyAsync, getIdleTimeAsync, getInternalEncodingAsync, getReferenceCountAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
-
Method Details
-
publishAsync
Publishes a message to all subscribed queues based on the provided arguments.- Parameters:
args
- arguments defining the message and publishing parameters- Returns:
- The published message, or null if the message hasn't been added to all subscribed queues. The message may not be added to a subscribed queue if the queue has size limit and is full, if message size exceeds defined queue message size limit or message rejected due to deduplication.
-
publishManyAsync
Publishes multiple messages to all subscribed queues based on the provided arguments.- Parameters:
args
- arguments defining the messages and publishing parameters- Returns:
- A list containing only messages that were added to at least a single subscribed queue. Messages may not be added to a subscribed queue if the queue has size limit and is full, if message size exceeds defined queue message size limit or message rejected due to deduplication.
-
removeFilterAsync
Removes a filter for the specified queue name .- Parameters:
name
- the queue name
-
setFilterAsync
Sets a filter that is applied to all messages published to the queue through this fanout.The FanoutFilter object is replicated among all ReliableFanout objects and applied on each of them during message publishing.
- Parameters:
name
- the queue namefilter
- applied to messages
-
isSubscribedAsync
Checks if a queue with the specified name is subscribed to this fanout.- Parameters:
name
- the queue name- Returns:
true
if the queue is subscribed,false
otherwise
-
subscribeQueueAsync
Subscribes a queue with the specified name to this fanout.- Parameters:
name
- the queue name- Returns:
true
if the queue was subscribed,false
if queue is already subscribed
-
subscribeQueueAsync
Subscribes a queue with the specified name to this fanout with a filter.- Parameters:
name
- the queue namefilter
- the filter that is applied to all messages published through this fanout- Returns:
true
if the queue was subscribed,false
if queue is already subscribed
-
unsubscribeAsync
Unsubscribes a queue with the specified name from this fanout.- Parameters:
name
- the queue name- Returns:
true
if the queue was unsubscribed,false
if the queue isn't subscribed
-
getSubscribersAsync
Returns a list of the names of all subscribers to this fanout.- Returns:
- subscriber names
-
countSubscribersAsync
Returns amount of subscribers to this fanout.- Returns:
- amount of subscribers
-