public static FillRabbitMqProperties ( TransportMessage message, DeliveryOptions options, IBasicProperties properties ) : void | ||
message | TransportMessage | |
options | DeliveryOptions | |
properties | IBasicProperties | |
return | void |
public void Send(TransportMessage message, Address address) { UnitOfWork.Add(channel => { var properties = RabbitMqTransportMessageExtensions.FillRabbitMqProperties(message, channel.CreateBasicProperties()); RoutingTopology.Send(channel, address, message, properties); }); }
void SendMessage(TransportMessage message, SendOptions sendOptions, IModel channel) { var destination = DetermineDestination(sendOptions); var properties = channel.CreateBasicProperties(); RabbitMqTransportMessageExtensions.FillRabbitMqProperties(message, sendOptions, properties); routingTopology.Send(channel, destination, message, properties); }
void PublishMessage(TransportMessage message, PublishOptions publishOptions, IModel channel) { var eventType = publishOptions.EventType; var properties = channel.CreateBasicProperties(); RabbitMqTransportMessageExtensions.FillRabbitMqProperties(message, publishOptions, properties); RoutingTopology.Publish(channel, eventType, message, properties); }
public bool Publish(TransportMessage message, IEnumerable <Type> eventTypes) { var eventType = eventTypes.First();//we route on the first event for now UnitOfWork.Add(channel => { var properties = RabbitMqTransportMessageExtensions.FillRabbitMqProperties(message, channel.CreateBasicProperties()); RoutingTopology.Publish(channel, eventType, message, properties); }); //we don't know if there was a subscriber so we just return true return(true); }