class MyRequest : CorrelatedBy<Guid>
{
public Guid CorrelationId {get; set;}
}
// in the requester
var myCorrId = Guid.NewGuid();
var request = new MyRequest()
{
CorrelationId = myCorrId
};
sendEndpoint.Send(request);
...
public async Task Consume(ConsumeContext<MyResponse> context)
{
Console.Out.WriteLineAsync("Received message with correlation id: " + context.CorrelationId);
}
// on the other side
public async Task Consume(ConsumeContext<MyRequest> context)
{
var response = new MyResponse();
await context.RespondAsync(response);
}
public void Respond<T>(T message) where T : class { var task = RespondAsync(message);
_receiveContext.AddPendingTask(task); }
--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@googlegroups.com.
To post to this group, send email to masstransit-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/41c92418-89cf-4aed-9122-6f4444803642%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@googlegroups.com.
To post to this group, send email to masstransit-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/963E0AC3-8D99-47B7-B533-7420754D2D35%40gmail.com.
Request/response just waits to get a reply back as a usual message.
Is it possible to set headers for individual messages when sending from IBus?
--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/364c1b94-ac7f-4fe5-bcf5-83c7b23d03d5%40googlegroups.com.