Interface RReliableFanoutAsync<V>

Type Parameters:
V - The type of message payload
All Superinterfaces:
RExpirableAsync, RObjectAsync
All Known Subinterfaces:
RReliableFanout<V>

public interface RReliableFanoutAsync<V> extends RExpirableAsync
Reliable fanout implementation that ensures message delivery to subscribed queues.
Author:
Nikita Koksharov
  • Method Details

    • publishAsync

      RFuture<Message<V>> publishAsync(FanoutPublishArgs<V> args)
      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

      RFuture<List<Message<V>>> publishManyAsync(FanoutPublishArgs<V> args)
      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

      RFuture<Void> removeFilterAsync(String name)
      Removes a filter for the specified queue name .
      Parameters:
      name - the queue name
    • setFilterAsync

      RFuture<Void> setFilterAsync(String name, MessageFilter<V> filter)
      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 name
      filter - applied to messages
    • isSubscribedAsync

      RFuture<Boolean> isSubscribedAsync(String name)
      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

      RFuture<Boolean> subscribeQueueAsync(String name)
      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

      RFuture<Boolean> subscribeQueueAsync(String name, MessageFilter<V> filter)
      Subscribes a queue with the specified name to this fanout with a filter.
      Parameters:
      name - the queue name
      filter - 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

      RFuture<Boolean> unsubscribeAsync(String name)
      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

      RFuture<List<String>> getSubscribersAsync()
      Returns a list of the names of all subscribers to this fanout.
      Returns:
      subscriber names
    • countSubscribersAsync

      RFuture<Integer> countSubscribersAsync()
      Returns amount of subscribers to this fanout.
      Returns:
      amount of subscribers