I tried this
public class LMSQFaultMessageConsumer : IConsumer<Fault<IEnvelope>>
{
public Task Consume(ConsumeContext<Fault<IEnvelope>> context)
{
var se = new SystemEnvelope(context);
return context.Publish<ISystemEnvelope>(se);
}
}
My consumer is
public class LMSQClientConsumer : LMSQEnvelopeConsumer { public override void MessageConsumeAsync(ConsumeContext<IEnvelope> context) { //try //{ var msg = new Envelope(context.Message); Console.WriteLine(msg); throw new Exception("testing 1..... 2........"); //} //catch (Exception ex) //{ // throw ex; //} } } }
It seem that I have an infinite loop on my return context.Publish<ISystemEnvelope>(se);
My goal is to have a Windows Service that monitor fault for IEnvelope messages... Can I publish from a Consumer ?
Thanks!
André