MQTT
要安装MQTT pubsub,请创建一个类型为的组件。 See this guide on how to create and apply a pubsub configuration
要配置使用 TLS 通信,需配置并确保mosquitto broker支持凭证。 前提条件包括certficate authority certificate
、ca issued client certificate
、client private key
。 参见下面的示例。
消费共享主题
Warning
以上示例将密钥明文存储, It is recommended to use a secret store for the secrets as described .
你可以使用Docker:
你可以使用下面的yaml在kubernetes中运行一个MQTT broker:
然后你可以通过tcp://mqtt-broker.default.svc.cluster.local:1883
与服务器交互。
- Dapr组件的基本格式
- Read for instructions on configuring pub/sub components