SimpleExample
A simple example of using stomp.py.
A simple example of using stomp.py is: import time |
► Sign in to add a comment
![]() |
Search
|
SimpleExample
A simple example of using stomp.py.
A simple example of using stomp.py is: import time |
nice!
I got error. I modified the code.
set_listener is in the newer release (for Python 3). add_listener is the older method (Python 2)
But this code will throw error when you run it on Python 3.x. You also need to change the print statement to use the bracket syntax. e.g.
to
For STOMP newbies like myself, if you want to reliably send a message you must use receipt. Check the on_receipt listener method.
In order to can compile and run the sample you must : 1. Add in import section : import logging 2. Before : conn = stomp.Connection() add line : logging.basicConfig()