- Newest
- Most votes
- Most comments
For future reference, looks like the policy should be attached directly to the thing instead of a thing group in order to receive notify-next updates.
When working with AWS IoT Jobs, there are specific conditions under which notifications are published to the jobs/notify and jobs/notify-next topics.
Based on your description, there are a few potential reasons why you're not receiving a notification on the $aws/things/MyThing/jobs/notify-next topic:
-
The
notify-nexttopic only receives a message when the status of the first job execution in the list changes. If you're updating a job to "Succeeded" but it wasn't the next job in the queue (or if there are no other jobs in the queue), you won't receive a notification on thenotify-nexttopic. -
When a job completes (status changes to "Succeeded"), a notification is published to the
jobs/notifytopic, but a notification is only published to thejobs/notify-nexttopic if the next job in the queue has changed as a result. -
If the queue is empty after your job completes, a
NextNotificationshould be published to thejobs/notify-nexttopic with an empty message.
Since you mentioned that you can see the messages when using the MQTT test client from the AWS dashboard but not from the LocalDebugConsole component, this suggests a potential issue with your Greengrass component's subscription or message handling:
- Verify that your Greengrass component has the correct permissions to subscribe to these topics
- Check that you're using QoS level 1 for your subscriptions
- Ensure that your component is correctly processing the messages it receives
Also, note that response messages from the AWS IoT Jobs service don't pass through the message broker and can't be subscribed to by other clients or rules. To receive job activity-related messages, you need to use the notify and notify-next topics and ensure that jobs events are enabled.
Sources
Jobs notifications - AWS IoT Core
Jobs events - AWS IoT Core
AWS IoT Device Not Starting Remote Job | AWS re:Post
Relevant content
asked 3 years ago
asked 2 years ago
- AWS OFFICIALUpdated 5 years ago
