2
使用Mule和MQTT我無法訂閱多個主題的客戶端。Mule ESB和MQTT連接器:訂閱多個主題
我配置配置全局元素以這樣的方式
<mqtt:config name="mqttSubscriber" doc:name="MQTT" brokerServerUri="${mqtt.url}" clientId="#['[email protected]'+server.host]" password="${mqtt.username}" username="${mqtt.password}">
<mqtt:connection-pooling-profile initialisationPolicy="INITIALISE_ONE" exhaustedAction="WHEN_EXHAUSTED_WAIT" maxActive="1" maxIdle="1" maxWait="1"/>
</mqtt:config>
在流量使用:
<mqtt:subscribe config-ref="mqttSubscriber" doc:name="MQTTSubscriber1" topicFilter="a" qos="ONLY_ONCE"/>
而在另一個流:
<mqtt:subscribe config-ref="mqttSubscriber" doc:name="MQTTSubscriber2" topicFilter="b" qos="ONLY_ONCE"/>
應用程序啓動時,它只訂閱了一個主題。
我的配置有什麼問題?也許我必須創建不同的客戶端?
非常感謝。