- Newest
- Most votes
- Most comments
Greengrass Pubsub module is not a MQTT compliant message broker, so it means it doesn't support MQTT 'persistent session' specs.
So we will need to use greengrass moquette MQTT broker for persistent session feature. In terms of client, any MQTT 3.1.1 compliant client can be used for connect to broker, but it needs to have device certificate for secure connection. You can refer to AWS IoT device SDK for the example of using MQTT client connecting to Greengrass core.
https://github.com/aws/aws-iot-device-sdk-java-v2/blob/main/samples/Greengrass/src/main/java/greengrass/BasicDiscovery.java
Hi clogwog@,
Although MQTT is not a message queue by definition, its protocol does support queueing messages for clients, which is feature called 'persistent session'.
Greengrass MQTT broker is a fork of open source moquette project with added condiments. It supports 'persistent session' feature that you can give it a shot.
Here are some simple references:
https://www.hivemq.com/blog/mqtt-essentials-part-7-persistent-session-queuing-messages/
https://github.com/moquette-io/moquette/issues/494
Edited by: zhengangataws on Dec 8, 2021 10:06 AM
@zhengangataws with this answer can i subscribe to the greengrass core's local topic using
https://docs.aws.amazon.com/greengrass/v2/developerguide/ipc-publish-subscribe.html#ipc-operation-subscribetotopic
I'm asking because i can't see a 'session' in setting up subscription here..
or doest the ipcClient keep a session ?
Or were you suggesting that i install the moquette greengrass component ? If so, then what should I use as a client to subscribe to the 'queue' ?
I have a follow up question about the actual implementation of the suggested solution (see previous comment)
Relevant content
- Accepted Answerasked 2 years ago
- asked 2 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated a year ago