Skip to content

3.0.0

Choose a tag to compare

@Havret Havret released this 27 Apr 20:26
· 49 commits to master since this release

✨ Overview

This release introduces a breaking change to the IConsumer API in order to better align the client behavior with the AMQP protocol and the broker expectations.

The change makes message handling more explicit and correct, splitting the old overloaded Reject method into two separate methods: Modify and Reject.


⚠️ Breaking Changes

1. IConsumer.Reject Method Refactor

The previous method:

void Reject(Message message, bool undeliverableHere = false);

has been replaced with two new methods:

void Modify(Message message, bool deliveryFailed, bool undeliverableHere);
void Reject(Message message);
Aspect 2.16.0 3.0.0
Method Reject(Message message, bool undeliverableHere = false) Modify(...) and Reject(...)
Behavior Always sent a Modified disposition internally Explicitly send Modified or Rejected based on method
Redelivery Controlled by undeliverableHere parameter Controlled by deliveryFailed and undeliverableHere in Modify

🛠 Migration Guide

If you previously had code like:

consumer.Reject(message); // default undeliverableHere = false

✅ Update it to:

consumer.Modify(message, deliveryFailed: true, undeliverableHere: false);

If you had:

consumer.Reject(message, undeliverableHere: true);

✅ Update it to:

consumer.Modify(message, deliveryFailed: true, undeliverableHere: true);

If you truly intend to reject the message (e.g., invalid message, poison message):

✅ Use:

consumer.Reject(message);

Please review your consumers before upgrading to 3.0.0!


New Contributors

Full Changelog: v2.16.0...v3.0.0