queueing functionality in greengrass core

0

Hello,

I am in need of some queue-ing that will persist in-between reboots, and have the ability to have multiple messages stored in the queue until they are removed from the queue.

Seeing the the greengrass-core already has implemented a local mqtt broker, I was wondering if there was something in greengrass-core that handles queueing with persistence.

if this is available i am looking for the name of this so i can search

if it isn't what is usually used ? should I use 0mq or another message queuing system. I know this is very individual, so previous experience with a preference would be highly appreciated.

clogwog
asked 2 years ago468 views
5 Answers
0
Accepted Answer

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

answered 2 years ago
0

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

answered 2 years ago
0

@zhengangataws thank you ! I'm looking into this option right now.

clogwog
answered 2 years ago
0

@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' ?

clogwog
answered 2 years ago
0

I have a follow up question about the actual implementation of the suggested solution (see previous comment)

clogwog
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions