Skip to content

Commit c8d4286

Browse files
committed
Fix readme
1 parent 506525c commit c8d4286

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ async def handle_message_from_dlq(message_frame: stompman.MessageFrame) -> None:
6767
print(message_frame.body)
6868

6969

70-
await client.subscribe("DLQ", handle_message_from_dlq)
70+
await client.subscribe("DLQ", handle_message_from_dlq, on_suppressed_exception=print)
7171
```
7272

7373
Entered `stompman.Client` will block forever waiting for messages if there are any active subscriptions.
7474

7575
Sometimes it's useful to avoid that:
7676

7777
```python
78-
dlq_subscription = await client.subscribe("DLQ", handle_message_from_dlq)
78+
dlq_subscription = await client.subscribe("DLQ", handle_message_from_dlq, on_suppressed_exception=print)
7979
await dlq_subscription.unsubscribe()
8080
```
8181

@@ -93,10 +93,10 @@ You can change the ack mode used by specifying the `ack` parameter:
9393

9494
```python
9595
# Server will assume that all messages sent to the subscription before the ACK'ed message are received and processed:
96-
await client.subscribe("DLQ", handle_message_from_dlq, ack="client")
96+
await client.subscribe("DLQ", handle_message_from_dlq, ack="client", on_suppressed_exception=print)
9797

9898
# Server will assume that messages are received as soon as it send them to client:
99-
await client.subscribe("DLQ", handle_message_from_dlq, ack="auto")
99+
await client.subscribe("DLQ", handle_message_from_dlq, ack="auto", on_suppressed_exception=print)
100100
```
101101

102102
### Cleaning Up

0 commit comments

Comments
 (0)