示例#1
0
 public void SetProperties(MessageProperties properties)
 {
     Properties = properties;
 }
 protected virtual void Publish(RoutedEventMessage message, RaiseScope raiseScope = null)
 {
     using (IPublishChannel channel = MessageBus.OpenPublishChannel())
     {
         var messageProperties = new MessageProperties()
         {
             DeliveryMode = 2
         };
         var body = Serializer.MessageToBytes(message);
         channel.Publish(RoutedEventExchange, GetRoutingKey(raiseScope), messageProperties, body);
     }
 }
示例#3
0
 public Message(T body)
 {
     Properties = new MessageProperties();
     Body       = body;
 }