You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've successfully been able to integrate rumqttc with AWS IoT core, for which I might also create a use-case example for. So far it's all been working flawlessly.
I do have however an issue when I try to sen messages from an AWS Lambda function, which is the FaaS equivalent. Specifically, if I understand correctly, sending messages requires polling on the event loop since otherwise I don't see any outgoing messages.
First question: Am I right that I need to poll the event loop even when only transmitting to the MQTT broker or did I understand something wrong?
Second question: How do I know when to stop polling? I'd like to avoid doing this by timeout / message counting and am looking for an idiomatic way if there is one.
If this becomes too big of an issue, an alternative would be running a container that lives long (probably ECS / Fargate) that contains a stable long-term connection and takes messages from a queue and processes the event loop continuously. But since that'd cost more than the entire rest of the stack combined I'd like to avoid it for now.
Any way help is much appreciated!
PS: Rough architecture for people familiar with AWS:
Agent mqtt -> publish to IoT Core topic -> Topic rule into SNS -> SQS -> Invokes Lambda function -> does stuff brrrr brrrr processing -> Publish response message (if needed) to topic
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I've successfully been able to integrate rumqttc with AWS IoT core, for which I might also create a use-case example for. So far it's all been working flawlessly.
I do have however an issue when I try to sen messages from an AWS Lambda function, which is the FaaS equivalent. Specifically, if I understand correctly, sending messages requires polling on the event loop since otherwise I don't see any outgoing messages.
First question: Am I right that I need to poll the event loop even when only transmitting to the MQTT broker or did I understand something wrong?
Second question: How do I know when to stop polling? I'd like to avoid doing this by timeout / message counting and am looking for an idiomatic way if there is one.
If this becomes too big of an issue, an alternative would be running a container that lives long (probably ECS / Fargate) that contains a stable long-term connection and takes messages from a queue and processes the event loop continuously. But since that'd cost more than the entire rest of the stack combined I'd like to avoid it for now.
Any way help is much appreciated!
PS: Rough architecture for people familiar with AWS:
Agent mqtt -> publish to IoT Core topic -> Topic rule into SNS -> SQS -> Invokes Lambda function -> does stuff brrrr brrrr processing -> Publish response message (if needed) to topic
Beta Was this translation helpful? Give feedback.
All reactions