Hello everyone,
currently we are trying to connect a MQTT subscriber with Event Mesh but run into a problem.
When the MQTT client is connecting and subscribing to our queue topic, the connection is directly closed by EOF and the following error ist given: “MQTT connection lost. Reason: web socket: close 1006 (abnormal closure): unexpected EOF”
Since we want to use events, we would like to take MQTT via web socket.
The library used in our go application is the go paho MQTT library.
At the moment, the application is developed and tested on a local machine. The bearer token is received from the token endpoint by clientId and -secret successfully.
Options are:
Event Mesh Service Descriptor:
{
"resources": {
"units": "<units>"
},
"options": {
"management": true,
"messagingrest": true,
"messaging": true
},
"rules": {
"topicRules": {
"publishFilter": [
"${namespace}/*"
],
"subscribeFilter": [
"${namespace}/*"
]
},
"queueRules": {
"publishFilter": [
"${namespace}/*"
],
"subscribeFilter": [
"${namespace}/*"
]
}
},
"version": "1.1.0",
"emname": "<emname>",
"namespace": "<namespace>"
}
MQTT client options:
clientId=”test”, // Using clientId of Service Key didn't work either
protocolVersion=4, // Meaning MQTT 3.1.1,
broker="<wss broker uri from service key>",
Http header: "Authentication: Bearer <oAuth2-token>",
MQTT client subscription options:
topic=<namespace>/<queueName>,
qos=1,
Any help on the following points would be much appreciated:
Thank you in advance
Matthias