faststream-stomp


Namefaststream-stomp JSON
Version 1.2.4 PyPI version JSON
download
home_pageNone
SummaryFastStream STOMP broker
upload_time2025-07-18 18:44:08
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseMIT
keywords activemq artemis faststream jms messaging stomp
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # FastStream STOMP broker

## How To Use

Install the package:

```sh
uv add faststream-stomp
poetry add faststream-stomp
```

Basic usage:

```python
import asyncio

import faststream
import faststream_stomp
import stompman

server = stompman.ConnectionParameters(host="127.0.0.1", port=61616, login="admin", passcode="password")
broker = faststream_stomp.StompBroker(stompman.Client([server]))


@broker.subscriber("first")
@broker.publisher("second")
def _(message: str) -> str:
    print(message)  # this will print message from startup
    return "Hi from first handler!"


@broker.subscriber("second")
def _(message: str) -> None:
    print(message)  # this will print message from first handler


app = faststream.FastStream(broker)


@app.after_startup
async def send_first_message() -> None:
    await broker.connect()
    await broker.publish("Hi from startup!", "first")


if __name__ == "__main__":
    asyncio.run(app.run())
```

Also there are `StompRouter` and `TestStompBroker` for testing. It works similarly to built-in brokers from FastStream, I recommend to read the original [FastStream documentation](https://faststream.airt.ai/latest/getting-started).

### Caveats

- When exception is raised in consumer handler, the message will be nacked (FastStream doesn't do this by default)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "faststream-stomp",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "activemq, artemis, faststream, jms, messaging, stomp",
    "author": null,
    "author_email": "Lev Vereshchagin <mail@vrslev.com>",
    "download_url": "https://files.pythonhosted.org/packages/47/d8/25ce6cf08f31470c285f4a875aa5359b24f6634d7c05dbbf51b459d7272d/faststream_stomp-1.2.4.tar.gz",
    "platform": null,
    "description": "# FastStream STOMP broker\n\n## How To Use\n\nInstall the package:\n\n```sh\nuv add faststream-stomp\npoetry add faststream-stomp\n```\n\nBasic usage:\n\n```python\nimport asyncio\n\nimport faststream\nimport faststream_stomp\nimport stompman\n\nserver = stompman.ConnectionParameters(host=\"127.0.0.1\", port=61616, login=\"admin\", passcode=\"password\")\nbroker = faststream_stomp.StompBroker(stompman.Client([server]))\n\n\n@broker.subscriber(\"first\")\n@broker.publisher(\"second\")\ndef _(message: str) -> str:\n    print(message)  # this will print message from startup\n    return \"Hi from first handler!\"\n\n\n@broker.subscriber(\"second\")\ndef _(message: str) -> None:\n    print(message)  # this will print message from first handler\n\n\napp = faststream.FastStream(broker)\n\n\n@app.after_startup\nasync def send_first_message() -> None:\n    await broker.connect()\n    await broker.publish(\"Hi from startup!\", \"first\")\n\n\nif __name__ == \"__main__\":\n    asyncio.run(app.run())\n```\n\nAlso there are `StompRouter` and `TestStompBroker` for testing. It works similarly to built-in brokers from FastStream, I recommend to read the original [FastStream documentation](https://faststream.airt.ai/latest/getting-started).\n\n### Caveats\n\n- When exception is raised in consumer handler, the message will be nacked (FastStream doesn't do this by default)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "FastStream STOMP broker",
    "version": "1.2.4",
    "project_urls": {
        "repository": "https://github.com/community-of-python/stompman"
    },
    "split_keywords": [
        "activemq",
        " artemis",
        " faststream",
        " jms",
        " messaging",
        " stomp"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "de5c24e7015f59b906c6f79371a80d6d73fe27156ce7b7489489f52a6bb6b1a2",
                "md5": "3b57980188b6a4ad647e4bfe14e5a118",
                "sha256": "b652276b6185a5ac2df35e0a1512e8b9a04d918d389fd904de321c3de6cc6c7e"
            },
            "downloads": -1,
            "filename": "faststream_stomp-1.2.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3b57980188b6a4ad647e4bfe14e5a118",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 13010,
            "upload_time": "2025-07-18T18:44:07",
            "upload_time_iso_8601": "2025-07-18T18:44:07.678303Z",
            "url": "https://files.pythonhosted.org/packages/de/5c/24e7015f59b906c6f79371a80d6d73fe27156ce7b7489489f52a6bb6b1a2/faststream_stomp-1.2.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "47d825ce6cf08f31470c285f4a875aa5359b24f6634d7c05dbbf51b459d7272d",
                "md5": "1b11545a55f7eff17ad9f34253386b32",
                "sha256": "58331d41e560bda25749a8ff7e56eede0c4d03fed7f1dba31f0dbc8f1a1ebeea"
            },
            "downloads": -1,
            "filename": "faststream_stomp-1.2.4.tar.gz",
            "has_sig": false,
            "md5_digest": "1b11545a55f7eff17ad9f34253386b32",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 7860,
            "upload_time": "2025-07-18T18:44:08",
            "upload_time_iso_8601": "2025-07-18T18:44:08.518984Z",
            "url": "https://files.pythonhosted.org/packages/47/d8/25ce6cf08f31470c285f4a875aa5359b24f6634d7c05dbbf51b459d7272d/faststream_stomp-1.2.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-18 18:44:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "community-of-python",
    "github_project": "stompman",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "faststream-stomp"
}
        
Elapsed time: 1.07215s