in src/main.py [0:0]
def mqtt_service_topic_router(self, message_id, reqres, command, message):
'''
Route MQTT IoT Core PubSub messages to this components MQTT IoT Core Service topic.
Here you can route messages to this or an external module based on the
increasingly specific detail provided in the request/response
and command message fields as prescribed in this AWS Greengrass SDK
(see pubsub_message.py).
In this example we just route to a message processor based on request/response type.
'''
if reqres == 'request':
self.mqtt_service_topic_request(message_id, command, message)
elif reqres == 'response':
self.mqtt_service_topic_response(message_id, command, message)