Wire Serializer Usage

Component: Wire Serializer
NuGet Package NServiceBus.Wire (1.x)
This is a community run project
Target NServiceBus Version: 5.x

Configuring to use Wire

var busConfiguration = new BusConfiguration();
busConfiguration.EndpointName("Samples.Serialization.Wire");
busConfiguration.UseSerialization<WireSerializer>();

The message send

var message = new CreateOrder
{
    OrderId = 9,
    Date = DateTime.Now,
    CustomerId = 12,
    OrderItems = new List<OrderItem>
    {
        new OrderItem
        {
            ItemId = 6,
            Quantity = 2
        },
        new OrderItem
        {
            ItemId = 5,
            Quantity = 4
        },
    }
};
bus.SendLocal(message);

The Output

Since Wire is a binary format there is not much human readable in the message body.

Related Articles


Last modified