public Task Send(RabbitMqSendContext <T> context, IPipe <RabbitMqSendContext <T> > next) { var routingKey = _routingKeyFormatter.FormatRoutingKey(context); context.RoutingKey = routingKey; return(next.Send(context)); }
public static void SetTransportHeader(this RabbitMqSendContext context, string key, object value) { if (context.BasicProperties.Headers == null) { context.BasicProperties.Headers = new Dictionary <string, object>(); } SetHeader(context.BasicProperties, key, value); }
public string FormatRoutingKey(RabbitMqSendContext <TMessage> context) { return(_formatter(context) ?? ""); }
string IRoutingKeyFormatter.FormatRoutingKey <T>(RabbitMqSendContext <T> context) { return(context.RoutingKey); }
public static void SetTransportHeader(this RabbitMqSendContext context, string key, object value) { SetHeader(context.BasicProperties, key, value); }