pardahlman / RawRabbit

A modern .NET framework for communication over RabbitMq
MIT License
746 stars 144 forks source link

Set header properties when publishing #308

Closed fgieseke closed 6 years ago

fgieseke commented 6 years ago

Is there a way to set header properties when publishing a message?

I want to support argument bindings as depicted here: bindwitharguments

fgieseke commented 6 years ago

Oh, I found it: Client.PublishAsync( message, guid, config => config.WithExchange(e => e .WithName(exchangeName).WithType(ExchangeType.Topic).AssumeInitialized()) .WithProperties(p => p.Headers = messageProperties) .WithRoutingKey(routingKey));