void FirstCommandConsumer(IConsumeContext <FirstCommand> context, FirstCommand message) { ThreadUtil.Sleep(10.Milliseconds()); var response = new FirstResponse(message.CorrelationId); context.Respond(response); }
Action <FirstCommand> FirstCommandConsumer(FirstCommand message) { return(command => { ThreadUtil.Sleep(10.Milliseconds()); var response = new FirstResponse(command.CorrelationId); LocalBus.Context().Respond(response); }); }
private static Action <FirstCommand> FirstCommandConsumer(FirstCommand message) { return(command => { ThreadUtil.Sleep(10.Milliseconds()); var response = new FirstResponse(command.CorrelationId); CurrentMessage.Respond(response); }); }
public async Task <IHttpActionResult> ReceiveMessageA(FirstResponseInbound message) { _logger.Info($"Received message (a): {JsonConvert.SerializeObject(message)}"); var mapped = new FirstResponse { Balance = message.Balance, Id = Guid.Parse(message.SomeIdentifier) }; const string queue = QueueNames.Inbound; _logger.Info($"Publishing notification to queue '{queue}'"); await _subscriptionManager.Publish(queue, mapped); return(Ok()); }
public async Task HandleMessageA(FirstResponse message) { _logger.Info($"Forwarding request (type: {message.GetType().Name})"); await _subscriptionManager.Publish(QueueNames.InternalA, message); }