Releases: community-of-python/stompman
1.3.1
1.3.0
1.2.0
What's Changed
- Allow passing headers to
client.subscribe()
by @vrslev in #64 - Use scripts in testing/ as usage examples by @vrslev in #63
Maintenance
- Update development dependencies by @vrslev in #56
- Refactor tests by @vrslev in #57
- Refactor tests (second part) by @vrslev in #58
- Revert tests refactoring by @vrslev in #59
- Allow overriding docker image by @vrslev in #60
Full Changelog: 1.1.0...1.2.0
1.1.0
What's Changed
- Avoid raising
RepeatedConnectionLostError
when listening frames by @vrslev in #52 - Refactor lifespan and errors by @vrslev in #53 & Fix weird retries by @vrslev in #54
- Add
write_retry_attempts
- Rename
RepeatedConnectionLostError
toFailedAllWriteAttemptsError
- Merge
ConnectionConfirmationTimeoutError
,UnsupportedProtocolVersionError
intoFailedAllConnectAttemptsError
, - and change how
FailedAllConnectAttemptsError
andFailedAllWriteAttemptsError
work (see the PR).
The most important things are clearer error messages, protocol connection errors (like connection confirmation lost error) included in retries, sane usage of
connect_retry_attempts
. - Add
- Refactor client modules by @vrslev in #55
Also: removed internal symbols from
stompman/__init__.py
, and addeddump_frame
andFrameParser
.
Full Changelog: 1.0.3...1.1.0
1.0.3
1.0.2
1.0.1
Changed API, reconnects
What's Changed
Before:
async with client.enter_transaction() as transaction: await client.send(body=b"hi there!", destination="DLQ", transaction=transaction, headers={"persistent": "true"})After:
async with client.begin() as transaction: await transaction.send(body=b"hi there!", destination="DLQ", headers={"persistent": "true"})
- Now, client starts listening to messages the moment you enter the async-with block (async with stompman.Client() as client). Previously it happened only when async for event in Client.listen(): ... was executed. Client.listen() and "events" are removed.
- To handle ERROR frames and heart-beats, pass handlers to Client().
- To subscribe to destinations: subscription = await Client.subscribe(destination, handler) (note that it is not a context manager anymore). To unsubscribe: await subscription.unsubscribe().
- Client will block at end of async-with block if there are any active subscriptions.
See the README.md for more.
Before:
async with asyncio.TaskGroup() as task_group, client.subscribe("DLQ"): async for event in client.listen(): match event: case stompman.MessageEvent(body=body): task_group.create_task(event.with_auto_ack(handle_message(body), on_suppressed_exception=print))After:
await client.subscribe("DLQ", handle_message)(and listening happens in background)
Before,
stompman.ConnectionLostError
was raised each time connection had lost. Now, client will attempt to reconnect, if it fails,stompman.FailedAllConnectAttemptsError
will be raised. There's alsostompman.RepeatedConnectionLostError
for case when connection gets lost when trying to do a single operation like send a frame.
I expect the client to have much more stable behavior after this change.
Maintenance
- Make use of uv run --frozen by @vrslev in #40
- Update README.md by @vrslev in #41
- Bump astral-sh/uv from 0.2.27 to 0.2.31 by @dependabot in #44
New Contributors
- @dependabot made their first contribution in #44
Full Changelog: 0.8.0...1.0.0
0.8.0
What's Changed
- Add property testing for and fix issues regarding ser-de by @vrslev in #27
- Refactor ser-de by @vrslev in #32
- Fixes authorization: Avoid escaping headers in CONNECT frame by @vrslev in #37
- Show received frames in ConnectionConfirmationTimeoutError by @vrslev in #38
- Maybe breaking: Set frozen, kw_only, slots to dataclasses when possible by @vrslev in #39
Maintenance
- Update ruff config by @vrslev in #33
- Use uv docker image by @vrslev in #34
- Unpin uv by @vrslev in #35
Full Changelog: 0.7.1...0.8.0