MQTT
To setup MQTT pubsub create a component of type . See this guide on how to create and apply a pubsub configuration
To configure communication using TLS, ensure mosquitto broker is configured to support certificates. Pre-requisite includes , ca issued client certificate
, client private key
. Here is an example.
Consuming a shared topic
Warning
The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described .
You can run a MQTT broker :
You can run a MQTT broker in kubernetes using following yaml:
You can then interact with the server using the client port: tcp://mqtt-broker.default.svc.cluster.local:1883
- Basic schema for a Dapr component
- Read for instructions on configuring pub/sub components