Skip to content

Commit 04aef20

Browse files
authored
Merge pull request #123803 from udidahan/patch-2
Added considerations developers should take into account when deserializing message payloads with Azure Service Bus
2 parents 5a4e308 + b4ee398 commit 04aef20

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

articles/service-bus-messaging/service-bus-messages-payloads.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,16 @@ When you use the legacy SBMP protocol, those objects are then serialized with th
6767

6868
[!INCLUDE [service-bus-amqp-support-retirement](../../includes/service-bus-amqp-support-retirement.md)]
6969

70-
While this hidden serialization magic is convenient, applications should take explicit control of object serialization and turn their object graphs into streams before including them into a message, and do the reverse on the receiver side. This yields interoperable results. While AMQP has a powerful binary encoding model, it's tied to the AMQP messaging ecosystem, and HTTP clients will have trouble decoding such payloads.
70+
While this hidden serialization magic is convenient, applications should take explicit control of object serialization and turn their object graphs into streams before including them into a message, and do the reverse on the receiver side. This yields interoperable results. While AMQP has a powerful binary encoding model, it's tied to the AMQP messaging ecosystem, and HTTP clients will have trouble decoding such payloads.
7171

72-
The .NET Standard and Java API variants only accept byte arrays, which means that the application must handle object serialization control.
72+
The .NET Standard and Java API variants only accept byte arrays, which means that the application must handle object serialization control.
7373

74-
If the payload of a message can't be deserialized, then it's recommended to [dead-letter the message](./service-bus-dead-letter-queues.md?source=recommendations#application-level-dead-lettering).
74+
When handling object deserialization from the message payload, developers should take into consideration that messages may arrive from multiple sources using different serialization methods. This can also happen when evolving a single application, where old versions may continue to run alongside newer versions. In these cases, it is recommended to have additional deserialization methods to try if the first attempt at deserialization fails. One library that supports this is [NServiceBus](https://docs.particular.net/nservicebus/serialization/#specifying-additional-deserializers). If all deserialization methods fail, then it's recommended to [dead-letter the message](./service-bus-dead-letter-queues.md?source=recommendations#application-level-dead-lettering).
7575

7676
## Next steps
7777

7878
To learn more about Service Bus messaging, see the following topics:
7979

8080
* [Service Bus queues, topics, and subscriptions](service-bus-queues-topics-subscriptions.md)
8181
* [Get started with Service Bus queues](service-bus-dotnet-get-started-with-queues.md)
82-
* [How to use Service Bus topics and subscriptions](service-bus-dotnet-how-to-use-topics-subscriptions.md)
82+
* [How to use Service Bus topics and subscriptions](service-bus-dotnet-how-to-use-topics-subscriptions.md)

0 commit comments

Comments
 (0)