in src/backend/app.py [0:0]
def subscribe_to_core(socket_io_app):
ipc_client = awsiot.greengrasscoreipc.connect()
subscribe_operation = ipc_client.new_subscribe_to_iot_core(
stream_handler=SubscribeTopicHandler(socket_io_app)
)
subscribe_operation.activate(
request=model.SubscribeToIoTCoreRequest(
topic_name="{}/subscribe".format(os.environ["AWS_IOT_THING_NAME"]),
qos=model.QOS.AT_LEAST_ONCE,
)
)