【发布时间】:2020-12-13 02:48:11
【问题描述】:
我有一个本地 mosquitto 代理,我想将它连接到 Google Cloud pubsub 队列。 我查看了 Google Cloud IOT 核心,但运气不好,我似乎无法连接到它
这是我的 mosquitto 配置
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.example
pid_file /var/run/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/
# Goolge IoT Core Configuration
connection bridge-to-gcp
address mqtt.googleapis.com:8883
bridge_attempt_unsubscribe false
bridge_certfile /Downloads/rsa_cert.pem
bridge_keyfile /Downloads/rsa_private.pem
bridge_cafile /Downloads/roots.pem
bridge_protocol_version mqttv311
bridge_insecure false
tls_version tlsv1.2
try_private true
start_type automatic
cleansession true
notifications false
local_clientid local-to-remote-gcp-bridge
remote_clientid projects/toolsense-dev/locations/europe-west1/registries/test-registry/devices/test-device
topic # both
有没有办法将从边缘设备收到的所有消息转发到 Google Cloud Pubsub?
【问题讨论】:
-
Edit 显示它尝试连接的日志输出的问题。
-
嘿,Ahmed Etefy,cloud.google.com/iot/docs/how-tos/mqtt-bridge 是您遵循的教程吗?您从最终看到什么样的错误?您介意更新您的问题吗?
标签: mqtt google-cloud-pubsub mosquitto google-cloud-iot