Stomp.py how to return message from listener <p>I've already read this topic: <a href="http://stackoverflow.com/questions/9328863/stomp-py-return-message-from-listener">Stomp.py return message from listener</a></p> <p>But i still don't get how this works, and why there's no way to retrieve a message from the stomp object, or the listener directly?</p> <p>If i can send a message via the send method, and If i can receive a message with an on_message listener method, why can't I return that message to my original function, so I could return it to the frontend?</p> <p>So if i have:</p> <pre><code>class MyListener(object): def on_error(self, headers, message): print '&gt;&gt;&gt; ' + message def on_message(self, headers, message): print '&gt;&gt;&gt; ' + message </code></pre> <p>how could I return a message from the on_message method?</p> <p>or could I do it somehow after the conn.subscribe(...) ??</p>