This document makes note of major changes in the API of this library for version 7. In addition to this document, please refer to the comprehensive integration test suites here and here that demonstrate these changes.
If you have questions about version 7 of this library, please start a new discussion here:
https://github.com/rabbitmq/rabbitmq-dotnet-client/discussions
The entire public API and internals of this library have been modified to use
the Task asynchronous programming model
(TAP).
All TAP methods end with an Async suffix, and can be await-ed.
IModelhas been renamed toIChannel
Just create a new instance of the BasicProperties class when publishing
messages. The CreateBasicProperties method on the old IModel interface has
been removed.
When a message is delivered to your code via the
AsyncEventingBasicConsumer.Received event or by sub-classing
DefaultAsyncConsumer, please note that the ReadOnlyMemory<byte> that
represents the message body is owned by this library, and that memory is only
valid for application use within the context of the executing Received event
or HandleBasicDeliver method.
If you wish to use this data outside of these methods, you MUST copy the data for your use:
byte[] myMessageBody = eventArgs.Body.ToArray();