node-ts / bus

A typescript based enterprise service bus framework based on enterprise integration patterns
https://bus.node-ts.com/
MIT License
272 stars 25 forks source link

Fix: Memory queue fail deletes other messages #163

Closed adenhertog closed 2 years ago

adenhertog commented 2 years ago

Fix for #162

Because .fail() internally deletes the message, when the handler finishes it will also try to delete the message by its new index (-1). Because the delete operation is a splice from the array; any messages between -1 and 1 are deleted.

Other transports don't have this issue since the deletion is made using the receiptId/messageId