I am trying to publish a message to another url on the RabbitMQ in the publish/subscribe model.In MassTransit 2.10.0, I can use IBus to publish a message to another uri with a correlationId._bus.SendRequest(AnotherUri_B, correlationId, message);But in MassTransit 3.4, I don't see how to use IBusControl to publish message to AnotherUri_B together with a correlationId. However I can publish to myself to the Uri (originalUri_A) that is originally created with the bus.Could you give me some suggestions or point me to some sample code?Thank you so much,
--
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/1436b5c5-915a-49ef-9406-aecf1982f5d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
So, you want to send a message to a given endpoint with a specific correlationId. the correlation id is set on the message payload itself so you should just be able to do _bus.GetSendEndpoint(new Uri("rabbitmq://")).Result.Send(new Message { CorrelationId = NewId.New });Although to be clear, if you are using a send endpoint you are, by definition, not doing a "publish" in the classic terminology.
On Mon, Dec 19, 2016 at 3:31 PM, tianyingwang <tianyi...@gmail.com> wrote:
I am trying to publish a message to another url on the RabbitMQ in the publish/subscribe model.In MassTransit 2.10.0, I can use IBus to publish a message to another uri with a correlationId._bus.SendRequest(AnotherUri_B, correlationId, message);But in MassTransit 3.4, I don't see how to use IBusControl to publish message to AnotherUri_B together with a correlationId. However I can publish to myself to the Uri (originalUri_A) that is originally created with the bus.Could you give me some suggestions or point me to some sample code?Thank you so much,
--
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 masstrans...@googlegroups.com.
public async Task Consume(ConsumeContext<MyMessage> context) { var ep = await context.GetSendEndpoint(new Uri("rabbitmq://somewhere")); var message = new Commands.MyOtherMessage(1, 2, 3); await ep.Send(message, c => c.Headers.Set("CorrelationId", Guid.NewGuid().ToString())); }
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsubscribe...@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/1436b5c5-915a-49ef-9406-aecf1982f5d9%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/10e88edf-9d48-441e-9b7c-6930c64d51fe%40googlegroups.com.
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 masstrans...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/1436b5c5-915a-49ef-9406-aecf1982f5d9%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 masstrans...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/a3cbf5e5-c9c0-43a5-ba33-0130f22effa2%40googlegroups.com.