Below is the function am using to get messages from producer.py
def callback(ch, method, properties, body):
result = body.decode()
resp = JSONEncoder().encode(result)
json_resp = json.loads(resp)
print(json_resp)
ch.basic_ack(delivery_tag = method.delivery_tag)
channel.stop_consuming()
This prints out the expected the result, but what am looking for is to get variable json_resp outside of callback function for further processing