MQTT binding spec
To setup MQTT binding create a component of type . See this guide on how to create and apply a binding configuration.
Warning
The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described here.
Consuming a shared topic
When consuming a shared topic, each consumer must have a unique identifier. By default, the application Id is used to uniquely identify each consumer and publisher. In self-hosted mode, running each Dapr run with a different application Id is sufficient to have them consume from the same shared topic. However on Kubernetes, a pod with multiple application instances shares the same application Id, prohibiting all instances from consuming the same topic. To overcome this, configure the component’s ConsumerID
metadata with a {uuid}
tag, making each instance to have a randomly generated ConsumerID
value on start up. For example:
Warning
The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described .
This component supports output binding with the following operations:
create