NServiceBus icon indicating copy to clipboard operation
NServiceBus copied to clipboard

DataBus should not be using serializer for `byte[]` properties

Open ramonsmits opened this issue 3 years ago • 0 comments

The databus uses the serializer for byte[] properties which is inefficient. Byte arrays should be directly written/read from the databus BLOB persister.

In v8 serialization is managed via the NServiceBus.DataBusConfig.ContentType header but for byte[] this value should be ignored if the type info is byte[].

This would be a wire compatibility breaking change.

In most cases though when users are dealing with byte[] they should likely be using NServiceBus.Attachments (currently a community project by @SimonCropp ).

ramonsmits avatar Sep 02 '22 09:09 ramonsmits