RabbitMQ

Warning

The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described .

Backoff retry strategy can instruct the dapr sidecar how to resend the message. By default, the retry strategy is turned off, which means that the sidecar will send a message to the service once. When the service returns a result, the message will be marked as consumption regardless of whether it is correct or not. The above is based on the condition of autoAck and requeueInFailure is setting to false(if requeueInFailure is set to true, the message will get a second chance).

But in some cases, you may want dapr to retry pushing message with an (exponential or constant) backoff strategy until the message is processed normally or the number of retries is exhausted. This maybe useful when your service breaks down abnormally but the sidecar is not stopped together. Adding backoff policy will retry the message pushing during the service downtime, instead of marking these message as consumed.

You can run a RabbitMQ server locally using Docker:

The easiest way to install RabbitMQ on Kubernetes is by using the :

Look at the chart output and get the username and password.

This will install RabbitMQ into the default namespace. To interact with RabbitMQ, find the service with: kubectl get svc rabbitmq.

For example, if installing using the example above, the RabbitMQ server client address would be:

Setting exchangeKind to "topic" uses the topic exchanges, which are commonly used for the multicast routing of messages. Messages with a routing key will be routed to one or many queues based on the routing key defined in the metadata when subscribing. The routing key is defined by the routingKey metadata. For example, if an app is configured with a routing key keyA:

It will receive messages with routing key keyA, and messages with other routing keys are not received.

For more information see rabbitmq exchanges.

  • in the Related links section
  • Read this guide for instructions on configuring pub/sub components