BusControl = Bus.Factory.CreateUsingRabbitMq(x =>
{
host = x.Host(new Uri(rabbihost), h =>
{
h.Username(User);
h.Password(pwd);
});
var endPointName = ConfigurationManager.AppSettings["EndPointName"];
x.ReceiveEndpoint(host, endPointName, e =>
{
e.UseRetry(Retry.Interval(4, 750));
OnRegisterConsumer(e);
e.Consumer<LMSQFaultMessageConsumer>();
});
});
The endPointName are the Name my Window Service listen to the Queue.
I have 3 window service start, all on there own Queue
Queue1, Queue2, Queue2
I publish 1 message, An I can see it In RabbitMQ in the 3 Queues.
When I Start My service for Queue1, I received the error message by email from LMSQFaultMessageConsumer.
Then in RabbitMQ I see 1 more message in Queue2 and Queue3, the new message is the Exception from Queue1.
How can my Consumer can publish a fault error in my other Queue ?
Thanks a lot!
André
Fault<T>
event. If the received message specified a FaultAddress
header, the fault is sent to that address. If a fault address is not found, and a ResponseAddress
is present, the fault is sent to the response address. If neither address is present, the fault is published."To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/0d2748b6-19d5-4a36-ad48-404c2d907a38%40googlegroups.com.--
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 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-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/0d2748b6-19d5-4a36-ad48-404c2d907a38%40googlegroups.com.
--
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/cbd50b99-5b1d-4736-a453-2c82b89c7cd0%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/0d2748b6-19d5-4a36-ad48-404c2d907a38%40googlegroups.com.
--
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-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/0d2748b6-19d5-4a36-ad48-404c2d907a38%40googlegroups.com.
--
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+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/cbd50b99-5b1d-4736-a453-2c82b89c7cd0%40googlegroups.com.
--
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/e12d393e-bd8b-4a0c-b0ef-20be29284e10%40googlegroups.com.
public void CreateBus() { BusControl = Bus.Factory.CreateUsingRabbitMq(cfg => { host = cfg.Host(new Uri(Rabbithost), h => { h.Username(User); h.Password(pwd); });
cfg.ReceiveEndpoint(host, EndPointName, e => { e.UseRetry(Retry.Interval(4, 750)); // e.Consumer<LMSQEnvelopeConsumer>();
e.Consumer<LMSQFaultMessageConsumer>(); }); }); }
private void OnRegisterConsumer(IRabbitMqReceiveEndpointConfigurator e) { RegisterConsumer?.Invoke(null, e); }
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/0d2748b6-19d5-4a36-ad48-404c2d907a38%40googlegroups.com.
--
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 view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/cbd50b99-5b1d-4736-a453-2c82b89c7cd0%40googlegroups.com.
--
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-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/0d2748b6-19d5-4a36-ad48-404c2d907a38%40googlegroups.com.
--
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+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/cbd50b99-5b1d-4736-a453-2c82b89c7cd0%40googlegroups.com.
--
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+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/e12d393e-bd8b-4a0c-b0ef-20be29284e10%40googlegroups.com.
--
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/61be311a-59e1-4e06-bd0a-33dfd46c886e%40googlegroups.com.
I have 9 receivers. So when I sent my LMSQEnvelope I don't know what receiving Queue will fail so I don't know what FaultAdress to give.
I'm sure I miss something basic.
public class LMSQFaultMessageConsumer : IConsumer<Fault<IEnvelope>> { public Task Consume(ConsumeContext<Fault<IEnvelope>> context) {
return Task.Run(() => {
// Source address must be the same has you are. To Send the Error. // When an exception is catch it is republish to all because our other service listen for the same message. // So if we do not do this validation, all other service will also publish again the error. if (context.SourceAddress.AbsolutePath.Contains(ClientLMSQ.EndPointName)) { SendEmailNotificationFault(context); } }); }
protected virtual void SendEmailNotificationFault(ConsumeContext<Fault<IEnvelope>> context) { ...... } }}