Loading repository data…
Loading repository data…
jasonrbriggs / repository
“stomp.py” is a Python client library for accessing messaging servers (such as ActiveMQ or RabbitMQ) using the STOMP protocol (versions 1.0, 1.1 and 1.2). It can also be run as a standalone, command-line client for testing.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
NOTE: MOVING TO CODEBERG - new repo: https://codeberg.org/jasonrbriggs/stomp.py
"stomp.py" is a Python client library for accessing messaging servers (such as ActiveMQ Classic, ActiveMQ Artemis or RabbitMQ) using the STOMP protocol (STOMP v1.0, STOMP v1.1 and STOMP v1.2). It can also be run as a standalone, command-line client for testing. NOTE: Stomp.py has officially ended support for Python2.x. See python3statement.org for more information.
You can connect to a message broker running on the local machine, and send a message using the following example.
import stomp
conn = stomp.Connection()
conn.connect('admin', 'password', wait=True)
conn.send(body=' '.join(sys.argv[1:]), destination='/queue/test')
conn.disconnect()
The current version of stomp.py supports:
There is also legacy 3.1.7 version using the old 3-series code (see 3.1.7 on PyPi. This is no longer supported, but (at least as of 2018) there were still a couple of reports of this version still being used in the wild.
Note: stomp.py now follows semantic versioning:
stomp.py has been perfunctorily tested on:
For testing locally, you'll need to install docker (or podman). Once installed:
#. Install dependencies:
poetry install
#. Create the docker (or podman) image:
make docker-image (or make podman-image)
#. Run the container:
make run-docker (or make run-podman)
#. Run stomp.py unit tests:
make test
#. Cleanup the container afterwards if you don't need it any more:
make remove-docker (or make remove-podman)
If you want to connect to the test services locally (other than from the included tests), you'll want to add test domain names to your hosts file like so:
172.17.0.2 my.example.com
172.17.0.2 my.example.org
172.17.0.2 my.example.net
If you're using podman and you want to access services via their private IP addresses, you'll want to run your commands with::
podman unshare --rootless-netns <command>
so that has access to the private container network. Service ports are also exposed to the host and can be accessed directly.