Giter Site home page Giter Site logo

imavis / stomp.py Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jasonrbriggs/stomp.py

0.0 0.0 0.0 1.41 MB

“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.

License: Apache License 2.0

Shell 0.03% Python 96.82% Makefile 2.11% Dockerfile 1.03%

stomp.py's Introduction

stomp.py

PyPI version

"stomp.py" is a Python client library for accessing messaging servers (such as 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:

  • Python 3.x (Python2 support ended as of Jan 2020)
  • STOMP version 1.0, 1.1 and 1.2

There is also legacy 3.1.7 version using the old 3-series code (see 3.1.7 on PyPi and 3.1.7 on GitHub). 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:

  • MAJOR version for incompatible API changes,
  • MINOR version for functionality added in a backwards compatible manner, and
  • PATCH version for backwards compatible bug fixes.

stomp.py has been perfunctorily tested on:

For testing locally, you'll need to install docker (or podman). Once installed:

  1. Install dependencies:
    poetry install
  2. Create the docker (or podman) image:
    make docker-image (or make podman-image)
  3. Run the container:
    make run-docker (or make run-podman)
  4. Run stomp.py unit tests:
    make test
  5. 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 <command> has access to the private container network. Service ports are also exposed to the host and can be accessed directly.

stomp.py's People

Contributors

jasonrbriggs avatar scop avatar jvantuyl avatar nigelsim avatar mikebonnet avatar anthchirp avatar wordlesstruth avatar hwiese1980 avatar vlcinsky avatar christopherjameshoward avatar aragaer avatar willianantunes avatar raghavtan avatar rafaduran avatar mfmarche avatar giz avatar spitfire1900 avatar tirkarthi avatar grundleborg avatar cygnusb avatar cg2v avatar aarondmarasco avatar snyk-bot avatar ozeebee avatar bradleynull avatar permanentstudy avatar geckon avatar percentcer avatar rnixx avatar mikael-vandmo-wcar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.