Replies: 2 comments 2 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Hi @DavidwWoo Here is an exmaple to create a rule with mqtt source session enabled, note that the clientid must be given
PUT /metadata/sources/mqtt/confKeys/mqtt2
{
"qos":1,
"server": "tcp://127.0.0.1:1883",
"protocolVersion": "3.1",
"clientid": "id2",
"enableClientSession": true,
}
POST /streams
{
"id": "rule1",
"sql": "select a from demo2",
"options": {
"sendSingle": false
},
"actions": [
{
"log":{
},
"mqtt":{
"qos":1,
"server": "tcp://127.0.0.1:1883",
"topic": "/yisa/data22"
}
}
]
}
POST /rules/rule1/stop
POST /rules/rule/start |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment



Uh oh!
There was an error while loading. Please reload this page.
-
eKuiper MQTT Persistent Session: Subscriptions Not Maintained After Reconnection to EMQX Broker
I'm running eKuiper with Docker Compose and have configured persistent session using
MQTT_SOURCE__DEFAULT__ENABLECLIENTSESSION: "true". However, I'm experiencing an issue where subscriptions are not restored after reconnecting to the EMQX broker.Docker Compose Configuration:
Issue Description:
Despite setting
MQTT_SOURCE__DEFAULT__ENABLECLIENTSESSION: "true", I've confirmed that subscriptions are not restored when eKuiper reconnects to EMQX after a connection loss.When checking in EMQX (5.8.7) > Monitor > Clients, I can see that other MQTT clients that successfully receive queued messages during disconnection periods maintain their subscriptions in the broker's client information even when disconnected. However, with eKuiper, the subscriptions disappear.
Questions:
Primary Question: Are there additional settings required to maintain subscriptions? How should I configure eKuiper so that subscriptions are maintained in EMQX even when the connection is lost?
Secondary Question: Is eKuiper-manager version 1.9.5-plus the latest version?
Additional Information:
EMQX is configured to buffer data properly. When testing with MQTTX client, I can confirm that both the session and subscriptions are maintained even after disconnecting MQTTX.
For eKuiper's MQTT source configuration, I've set the protocol version to 3.1.1 and QoS to 1.
Environment:
Any guidance on resolving this persistent session subscription issue would be greatly appreciated.
Thank you :)
Beta Was this translation helpful? Give feedback.
All reactions