Class RabbitMQConnectorIncomingConfiguration

java.lang.Object
io.smallrye.reactive.messaging.rabbitmq.RabbitMQConnectorCommonConfiguration
io.smallrye.reactive.messaging.rabbitmq.RabbitMQConnectorIncomingConfiguration

public class RabbitMQConnectorIncomingConfiguration extends RabbitMQConnectorCommonConfiguration
Extract the incoming configuration for the smallrye-rabbitmq connector.
  • Constructor Details

    • RabbitMQConnectorIncomingConfiguration

      public RabbitMQConnectorIncomingConfiguration(org.eclipse.microprofile.config.Config config)
      Creates a new RabbitMQConnectorIncomingConfiguration.
  • Method Details

    • getQueueName

      public Optional<String> getQueueName()
      Gets the queue.name value from the configuration. Attribute Name: queue.name Description: The queue from which messages are consumed. If not set, the channel name is used.
      Returns:
      the queue.name
    • getQueueDurable

      public Boolean getQueueDurable()
      Gets the queue.durable value from the configuration. Attribute Name: queue.durable Description: Whether the queue is durable Default Value: true
      Returns:
      the queue.durable
    • getQueueExclusive

      public Boolean getQueueExclusive()
      Gets the queue.exclusive value from the configuration. Attribute Name: queue.exclusive Description: Whether the queue is for exclusive use Default Value: false
      Returns:
      the queue.exclusive
    • getQueueAutoDelete

      public Boolean getQueueAutoDelete()
      Gets the queue.auto-delete value from the configuration. Attribute Name: queue.auto-delete Description: Whether the queue should be deleted after use Default Value: false
      Returns:
      the queue.auto-delete
    • getQueueDeclare

      public Boolean getQueueDeclare()
      Gets the queue.declare value from the configuration. Attribute Name: queue.declare Description: Whether to declare the queue and binding; set to false if these are expected to be set up independently Default Value: true
      Returns:
      the queue.declare
    • getQueueTtl

      public Optional<Long> getQueueTtl()
      Gets the queue.ttl value from the configuration. Attribute Name: queue.ttl Description: If specified, the time (ms) for which a message can remain in the queue undelivered before it is dead
      Returns:
      the queue.ttl
    • getQueueSingleActiveConsumer

      public Optional<Boolean> getQueueSingleActiveConsumer()
      Gets the queue.single-active-consumer value from the configuration. Attribute Name: queue.single-active-consumer Description: If set to true, only one consumer can actively consume messages
      Returns:
      the queue.single-active-consumer
    • getQueueXQueueType

      public Optional<String> getQueueXQueueType()
      Gets the queue.x-queue-type value from the configuration. Attribute Name: queue.x-queue-type Description: If automatically declare queue, we can choose different types of queue [quorum, classic, stream]
      Returns:
      the queue.x-queue-type
    • getQueueXQueueMode

      public Optional<String> getQueueXQueueMode()
      Gets the queue.x-queue-mode value from the configuration. Attribute Name: queue.x-queue-mode Description: If automatically declare queue, we can choose different modes of queue [lazy, default]
      Returns:
      the queue.x-queue-mode
    • getMaxIncomingInternalQueueSize

      public Integer getMaxIncomingInternalQueueSize()
      Gets the max-incoming-internal-queue-size value from the configuration. Attribute Name: max-incoming-internal-queue-size Description: The maximum size of the incoming internal queue Default Value: 500000
      Returns:
      the max-incoming-internal-queue-size
    • getConnectionCount

      public Integer getConnectionCount()
      Gets the connection-count value from the configuration. Attribute Name: connection-count Description: The number of RabbitMQ connections to create for consuming from this queue. This might be necessary to consume from a sharded queue with a single client. Default Value: 1
      Returns:
      the connection-count
    • getQueueXMaxPriority

      public Optional<Integer> getQueueXMaxPriority()
      Gets the queue.x-max-priority value from the configuration. Attribute Name: queue.x-max-priority Description: Define priority level queue consumer
      Returns:
      the queue.x-max-priority
    • getQueueXDeliveryLimit

      public Optional<Long> getQueueXDeliveryLimit()
      Gets the queue.x-delivery-limit value from the configuration. Attribute Name: queue.x-delivery-limit Description: If queue.x-queue-type is quorum, when a message has been returned more times than the limit the message will be dropped or dead-lettered
      Returns:
      the queue.x-delivery-limit
    • getAutoBindDlq

      public Boolean getAutoBindDlq()
      Gets the auto-bind-dlq value from the configuration. Attribute Name: auto-bind-dlq Description: Whether to automatically declare the DLQ and bind it to the binder DLX Default Value: false
      Returns:
      the auto-bind-dlq
    • getDeadLetterQueueName

      public Optional<String> getDeadLetterQueueName()
      Gets the dead-letter-queue-name value from the configuration. Attribute Name: dead-letter-queue-name Description: The name of the DLQ; if not supplied will default to the queue name with '.dlq' appended
      Returns:
      the dead-letter-queue-name
    • getDeadLetterExchange

      public String getDeadLetterExchange()
      Gets the dead-letter-exchange value from the configuration. Attribute Name: dead-letter-exchange Description: A DLX to assign to the queue. Relevant only if auto-bind-dlq is true Default Value: DLX
      Returns:
      the dead-letter-exchange
    • getDeadLetterExchangeType

      public String getDeadLetterExchangeType()
      Gets the dead-letter-exchange-type value from the configuration. Attribute Name: dead-letter-exchange-type Description: The type of the DLX to assign to the queue. Relevant only if auto-bind-dlq is true Default Value: direct
      Returns:
      the dead-letter-exchange-type
    • getDeadLetterRoutingKey

      public Optional<String> getDeadLetterRoutingKey()
      Gets the dead-letter-routing-key value from the configuration. Attribute Name: dead-letter-routing-key Description: A dead letter routing key to assign to the queue; if not supplied will default to the queue name
      Returns:
      the dead-letter-routing-key
    • getDlxDeclare

      public Boolean getDlxDeclare()
      Gets the dlx.declare value from the configuration. Attribute Name: dlx.declare Description: Whether to declare the dead letter exchange binding. Relevant only if auto-bind-dlq is true; set to false if these are expected to be set up independently Default Value: false
      Returns:
      the dlx.declare
    • getDeadLetterQueueType

      public Optional<String> getDeadLetterQueueType()
      Gets the dead-letter-queue-type value from the configuration. Attribute Name: dead-letter-queue-type Description: If automatically declare DLQ, we can choose different types of DLQ [quorum, classic, stream]
      Returns:
      the dead-letter-queue-type
    • getDeadLetterQueueMode

      public Optional<String> getDeadLetterQueueMode()
      Gets the dead-letter-queue-mode value from the configuration. Attribute Name: dead-letter-queue-mode Description: If automatically declare DLQ, we can choose different modes of DLQ [lazy, default]
      Returns:
      the dead-letter-queue-mode
    • getDeadLetterTtl

      public Optional<Long> getDeadLetterTtl()
      Gets the dead-letter-ttl value from the configuration. Attribute Name: dead-letter-ttl Description: If specified, the time (ms) for which a message can remain in DLQ undelivered before it is dead. Relevant only if auto-bind-dlq is true
      Returns:
      the dead-letter-ttl
    • getDeadLetterDlx

      public Optional<String> getDeadLetterDlx()
      Gets the dead-letter-dlx value from the configuration. Attribute Name: dead-letter-dlx Description: If specified, a DLX to assign to the DLQ. Relevant only if auto-bind-dlq is true
      Returns:
      the dead-letter-dlx
    • getDeadLetterDlxRoutingKey

      public Optional<String> getDeadLetterDlxRoutingKey()
      Gets the dead-letter-dlx-routing-key value from the configuration. Attribute Name: dead-letter-dlx-routing-key Description: If specified, a dead letter routing key to assign to the DLQ. Relevant only if auto-bind-dlq is true
      Returns:
      the dead-letter-dlx-routing-key
    • getFailureStrategy

      public String getFailureStrategy()
      Gets the failure-strategy value from the configuration. Attribute Name: failure-strategy Description: The failure strategy to apply when a RabbitMQ message is nacked. Accepted values are `fail`, `accept`, `reject` (default), `requeue` or name of a bean Default Value: reject
      Returns:
      the failure-strategy
    • getBroadcast

      public Boolean getBroadcast()
      Gets the broadcast value from the configuration. Attribute Name: broadcast Description: Whether the received RabbitMQ messages must be dispatched to multiple _subscribers_ Default Value: false
      Returns:
      the broadcast
    • getAutoAcknowledgement

      public Boolean getAutoAcknowledgement()
      Gets the auto-acknowledgement value from the configuration. Attribute Name: auto-acknowledgement Description: Whether the received RabbitMQ messages must be acknowledged when received; if true then delivery constitutes acknowledgement Default Value: false
      Returns:
      the auto-acknowledgement
    • getKeepMostRecent

      public Boolean getKeepMostRecent()
      Gets the keep-most-recent value from the configuration. Attribute Name: keep-most-recent Description: Whether to discard old messages instead of recent ones Default Value: false
      Returns:
      the keep-most-recent
    • getRoutingKeys

      public String getRoutingKeys()
      Gets the routing-keys value from the configuration. Attribute Name: routing-keys Description: A comma-separated list of routing keys to bind the queue to the exchange. Relevant only if 'exchange.type' is topic or direct Default Value: #
      Returns:
      the routing-keys
    • getArguments

      public Optional<String> getArguments()
      Gets the arguments value from the configuration. Attribute Name: arguments Description: A comma-separated list of arguments [key1:value1,key2:value2,...] to bind the queue to the exchange. Relevant only if 'exchange.type' is headers
      Returns:
      the arguments
    • getContentTypeOverride

      public Optional<String> getContentTypeOverride()
      Gets the content-type-override value from the configuration. Attribute Name: content-type-override Description: Override the content_type attribute of the incoming message, should be a valid MINE type
      Returns:
      the content-type-override
    • getMaxOutstandingMessages

      public Optional<Integer> getMaxOutstandingMessages()
      Gets the max-outstanding-messages value from the configuration. Attribute Name: max-outstanding-messages Description: The maximum number of outstanding/unacknowledged messages being processed by the connector at a time; must be a positive number
      Returns:
      the max-outstanding-messages
    • validate

      public void validate()
      Overrides:
      validate in class RabbitMQConnectorCommonConfiguration