Exemple #1
0
 public async Task PublishAsync <TMessage>(TMessage message, string @namespace = null) where TMessage : class
 {
     await _client.PublishAsync(message, ctx =>
                                ctx.UseMessageContext(new CorrelationContext()).UsePublishConfiguration(p => p.WithRoutingKey(GetRoutingKey(@message, @namespace))));
 }
Exemple #2
0
 public Task PublishAsync <TMessage>(TMessage message, string @namespace = null) where TMessage : class
 {
     return(_client.PublishAsync(message, ctx =>
                                 ctx.UseMessageContext(CorrelationContext.Empty)
                                 .UsePublishConfiguration(p => p.WithRoutingKey(GetRoutingKey(message, @namespace)))));
 }