Skip to content

Releases: vrslev/stompman

1.4.0

29 Aug 13:17
3400138
Compare
Choose a tag to compare

What's Changed

Essentially, all that changed is that ConnectionParameters.from_pydantic_multihost_hosts() now accepts hosts from multi-host url that has one credentials pair, like this: ArtemisDsn("tcp://lev:pass@host1:61616,host2:61617,host3:61618").hosts(). Previously you had to specify credentials for each host: ArtemisDsn("tcp://user1:pass1@host1:61616,user2:pass2@host2:61617,user3:pass@host3:61618").hosts().


  • Expect only one username-password pair in ConnectionParameters.from_pydantic_multihost_hosts() by @vrslev in #72
  • Rename ConnectionParameters.from_pydantic_multihost_hosts() to ConnectionParameters.from_pydantic_multihosturl_hosts() by @vrslev in #73
  • Fix tests by @vrslev in #74
  • Revert recent change by @vrslev in #75
  • Allow to set-credentials to all hosts (old style) by @vrslev in #76

Full Changelog: 1.3.1...1.4.0

1.3.1

27 Aug 14:05
927c6ba
Compare
Choose a tag to compare

What's Changed

Full Changelog: 1.3.0...1.3.1

1.3.0

25 Aug 15:12
3bce385
Compare
Choose a tag to compare

What's Changed

Maintenance

Full Changelog: 1.2.0...1.3.0

1.2.0

23 Aug 19:26
d06cd07
Compare
Choose a tag to compare

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

Full Changelog: 1.1.0...1.2.0

1.1.0

12 Aug 13:28
369f100
Compare
Choose a tag to compare

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 to FailedAllWriteAttemptsError
    • Merge ConnectionConfirmationTimeoutError, UnsupportedProtocolVersionError into FailedAllConnectAttemptsError,
    • and change how FailedAllConnectAttemptsError and FailedAllWriteAttemptsError 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.

  • Refactor client modules by @vrslev in #55

    Also: removed internal symbols from stompman/__init__.py, and added dump_frame and FrameParser.

Full Changelog: 1.0.3...1.1.0

1.0.3

05 Aug 10:16
c8d5e56
Compare
Choose a tag to compare

What's Changed

  • Remove stompman.Client(on_unhandled_message_frame=) by @vrslev in #49
  • Fix hanging forever in Client.__aexit__() by @vrslev in #50
  • Remove frozen=True and slots=True from exceptions to avoid triggering context manager traceback issue by @vrslev in #51

Full Changelog: 1.0.2...1.0.3

1.0.2

01 Aug 09:24
4418211
Compare
Choose a tag to compare

What's Changed

  • Return bytes in frame.body instead of bytearray by @vrslev in #48

Full Changelog: 1.0.1...1.0.2

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