Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

| Parameter | Type | Description | |--------------------|:--------------------:|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| | queue | String | Name of the queue to register the Consumer to. | | consumerProperties | ConsumerProperties | A ConsumerProperties instance for the consumer. | | messageType | Message.MessageType | The type of message this consumer is supposed to listen to. Can be Message.MessageType.DIRECT or Message.MessageType.BROADCAST. See Message Types. | | onMessageDelivery | Predicate<Message> | The function to execute when a message is received. Returns true if the message is successfully consumed, false otherwise. |

Producers

Configuration

| Property | Type | Default | Description | |-------------------------------|:--------:|:-------:|--------------------------------------------------------------------------------------------------| | producer.threads | Integer | 5 | Number of threads available for producers to send asyncMessages. | | producer.sendMessageTimeout | Duration | 30s | Maximum time to wait to get a confirmation that a message has been successfully sent. | | producer.retry.retries | Integer | 5 | Maximum number of times to try to send a message. | | producer.retry.delay | Duration | 1s | Time to wait before retrying. The time is multiplied by the number of retries to backoff between executions. |

Example

messageQueue:
  producer:
    sendMessageTimeout: 10000
    threads: 10
    retry:
      retries: 10
      delay: 10000

This configuration can be loaded by injecting the ProducerProperties instance: