File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 1
1
# Migrating to RabbitMQ .NET Client 7.x
2
2
3
+ This document makes note of major changes in the API of this library for
4
+ version 7. In addition to this document, please refer to the comprehensive
5
+ integration test suites
6
+ [ here] ( https://github.com/rabbitmq/rabbitmq-dotnet-client/tree/main/projects/Test/Integration )
7
+ and
8
+ [ here] ( https://github.com/rabbitmq/rabbitmq-dotnet-client/tree/main/projects/Test/SequentialIntegration )
9
+ that demonstrate these changes.
10
+
11
+ If you have questions about version 7 of this library, please start a new discussion here:
12
+
13
+ https://github.com/rabbitmq/rabbitmq-dotnet-client/discussions
14
+
3
15
## ` async ` / ` await `
4
16
5
17
The entire public API and internals of this library have been modified to use
@@ -11,3 +23,18 @@ All TAP methods end with an `Async` suffix, and can be `await`-ed.
11
23
12
24
* ` IModel ` has been renamed to ` IChannel `
13
25
26
+ ## Consuming messages
27
+
28
+ When a message is delivered to your code via the
29
+ ` AsyncEventingBasicConsumer.Received ` event or by sub-classing
30
+ ` DefaultAsyncConsumer ` , please note that the ` ReadOnlyMemory<byte> ` that
31
+ represents the message body is owned by this library, and that memory is only
32
+ valid for application use within the context of the executing ` Received ` event
33
+ or ` HandleBasicDeliver ` method.
34
+
35
+ If you wish to use this data _ outside_ of these methods, you ** MUST** copy the
36
+ data for your use:
37
+
38
+ ```
39
+ byte[] myMessageBody = eventArgs.Body.ToArray();
40
+ ```
You can’t perform that action at this time.
0 commit comments