You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,12 @@
1
1
# Change Log
2
2
3
+
## 19.0.0
4
+
- I am not aware of any breaking changes in this release, but emitting error events asynchronously could have subtle side effects, hence the major release
5
+
- Deprecate session 'cancelled' event in favour of 'cancel' (both will work)
6
+
- Refactor reconnection and resubscription code
7
+
- Emit errors asynchronously to prevent them being caught by the amqplib main accept loop
8
+
- Fix bug which throw an exception in the error handler when a close event was emitted with no error argument
9
+
3
10
## 18.0.1
4
11
5
12
- Removed console.log when the channel pool destroyed a channel
Copy file name to clipboardExpand all lines: README.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -130,7 +130,9 @@ The reason Rascal nacks the message is because the alternatives are to leave the
130
130
131
131
## Very Important Section About Event Handling
132
132
133
-
[amqplib](https://www.npmjs.com/package/amqplib) emits error events when a connection or channel encounters a problem. Rascal will listen for these and provided you use the default configuration will attempt automatic recovery (reconnection etc), however these events can indicate errors in your code, so it's also important to bring them to your attention. Rascal does this by re-emitting the error event, which means if you don't handle them, they will bubble up to the uncaught error handler and crash your application. There are four places where you should do this
133
+
[amqplib](https://www.npmjs.com/package/amqplib) emits error events when a connection or channel encounters a problem. Rascal will listen for these and provided you use the default configuration will attempt automatic recovery (reconnection etc), however these events can indicate errors in your code, so it's also important to bring them to your attention. Rascal does this by re-emitting the error event, which means if you don't handle them, they will bubble up to the uncaught error handler and crash your application. It is insufficient to register a global uncaughtException handler - doing so without registering individual handlers will prevent your application from crashing, but also prevent Rascal from recovering.
134
+
135
+
There are four places where you need to register error handlers.
134
136
135
137
1. Immediately after obtaining a broker instance
136
138
@@ -1358,7 +1360,7 @@ If the message has not been auto-acknowledged you should ackOrNack it. **If you
1358
1360
1359
1361
The RabbitMQ broker may [cancel](https://www.rabbitmq.com/consumer-cancel.html) the consumer if the queue is deleted or the node on which the queue is located fails. [amqplib](https://www.squaremobius.net/amqp.node/channel_api.html#channel_consume) handles this by delivering a `null` message. When Rascal receives the null message it will
1360
1362
1361
-
1. Emit a `cancelled` event from the subscription.
1363
+
1. Emit a `cancel` event from the subscription.
1362
1364
1. Emit an `error` event from the subscription if the `cancel` event was not handled
1363
1365
1. Optionally attempt to resubscribe as per normal retry configuration. If the queue was deleted rather than being failed over, the queue will not automatically be re-created and retry attempts will fail indefinitely.
0 commit comments