Class AloRabbitMQReceiver<T>

  • Type Parameters:
    T - Inbound message deserialized body type

    public class AloRabbitMQReceiver<T>
    extends Object
    A reactive RabbitMQ receiver with at-least-once semantics for consuming messages from a queue in a RabbitMQ cluster.

    Note that AloDecorators applied via AloDecoratorConfig.DECORATOR_TYPES_CONFIG must be implementations of AloReceivedRabbitMQMessageDecorator.

    • Field Detail

      • CONFIG_PREFIX

        public static final String CONFIG_PREFIX
        Prefix used on all AloRabbitMQReceiver-specific configurations
        See Also:
        Constant Field Values
      • QOS_CONFIG

        public static final String QOS_CONFIG
        The maximum allowed number unacknowledged messages (per subscription)
        See Also:
        Constant Field Values
      • NACKNOWLEDGER_TYPE_CONFIG

        public static final String NACKNOWLEDGER_TYPE_CONFIG
        Configures the behavior of negatively acknowledging SQS Messages. Several simple types are available including "emit", where the associated error is emitted in to the pipeline, "requeue" which re-queues the associated message such that it is re-received in the future, and "discard" which causes the message to be dropped or routed to a dead-letter queue, if configured. Any other non-predefined value is treated as a qualified class name of an implementation of NacknowledgerFactory which allows more fine-grained control over what happens when a RabbitMQ Message is negatively acknowledged. Defaults to "emit".
        See Also:
        Constant Field Values
      • ERROR_EMISSION_TIMEOUT_CONFIG

        public static final String ERROR_EMISSION_TIMEOUT_CONFIG
        When negative acknowledgement results in emitting the corresponding error, this configures the timeout on successfully emitting that error.
        See Also:
        Constant Field Values
    • Method Detail

      • receiveAloBodies

        public io.atleon.core.AloFlux<T> receiveAloBodies​(String queue)
        Creates a Publisher of Alo items referencing deserialized RabbitMQ message bodies wrapped as an AloFlux.
        Parameters:
        queue - The queue to subscribe to
        Returns:
        A Publisher of Alo items referencing deserialized RabbitMQ message bodies
      • receiveAloMessages

        public io.atleon.core.AloFlux<ReceivedRabbitMQMessage<T>> receiveAloMessages​(String queue)
        Creates a Publisher of Alo items referencing ReceivedRabbitMQMessages wrapped as an AloFlux.
        Parameters:
        queue - The queue to subscribe to
        Returns:
        A Publisher of Alo items referencing ReceivedRabbitMQMessages