Skip to content

Releases: community-of-python/stompman

1.0.1

01 Aug 07:21
cbace92
Compare
Choose a tag to compare

What's Changed

  • Add disconnect confirmation timeout by @vrslev in #46
  • Force keyword arguments in some cases to avoid ambiguity by @vrslev in #47

Full Changelog: 1.0.0...1.0.1

Changed API, reconnects

31 Jul 17:38
Compare
Choose a tag to compare

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"})
  • Change API for subscribing and listening by @vrslev in #43
  1. 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.
  2. To handle ERROR frames and heart-beats, pass handlers to Client().
  3. To subscribe to destinations: subscription = await Client.subscribe(destination, handler) (note that it is not a context manager anymore). To unsubscribe: await subscription.unsubscribe().
  4. 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)

  • Implement reconnects on writing and reading frames by @vrslev in #45

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 also stompman.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

New Contributors

Full Changelog: 0.8.0...1.0.0

0.8.0

19 Jul 09:16
5fc893f
Compare
Choose a tag to compare

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

Full Changelog: 0.7.1...0.8.0

0.7.1

21 Jun 09:24
fc2d7e3
Compare
Choose a tag to compare

What's Changed

  • Avoid raising ConnectionLostError in ack/nack by @vrslev in #31

Full Changelog: 0.7.0...0.7.1

0.7.0

21 Jun 09:04
4a701eb
Compare
Choose a tag to compare

What's Changed

  • Avoid sending cleanup frames if ConnectionLostError was raised, also avoid raising it in ack/nack by @vrslev in #30

Full Changelog: 0.6.8...0.7.0

0.6.8

20 Jun 07:16
4120df9
Compare
Choose a tag to compare

What's Changed

  • Suppress ConnectionLostError in shutdown to avoid dirty tracebacks that sometime include ExceptionGroups by @vrslev in #29

Full Changelog: 0.6.7...0.6.8

0.6.7

19 Jun 12:29
42839fc
Compare
Choose a tag to compare

What's Changed

  • Reraise ConnectionLostError on uvloop caused RuntimeError when writing heartbeat by @vrslev in #28

Full Changelog: 0.6.6...0.6.7

0.6.6

17 Jun 16:38
7c58157
Compare
Choose a tag to compare

What's Changed

Full Changelog: 0.6.5...0.6.6

0.6.5

17 Jun 16:04
db05208
Compare
Choose a tag to compare

What's Changed

Full Changelog: 0.6.4...0.6.5

0.6.4

15 Jun 07:51
65735e1
Compare
Choose a tag to compare

What's Changed

  • Test with uvloop by @vrslev in #22
  • Fix parsing stream chunks that do not contain frames by @vrslev in #23

Full Changelog: 0.6.3...0.6.4