I have a long running PDF generation as part of a SAGA, so I read about the Turnout and I am trying to use it. However I have a complex consumer - several calls to DB, dependency on 3rd party service for generating the PDF and etc. I have troubles finding a good example how exactly I should use the Turnout endpoint.
My current usage is:
c.TurnoutEndpoint<PdfGenerationCommand>(host, "pdf-generation-TURNOUT", e =>
{
e.SuperviseInterval = TimeSpan.FromSeconds(30);
e.SetJobFactory(async context =>
{
var consumer = container.GetInstance<PdfGenerationCommandConsumer>();
var sw = new Stopwatch();
sw.Start();
Console.WriteLine($"{DateTime.Now} - [PdfGenerationCommand] Job started!");
await consumer.Consume(context.Command).ConfigureAwait(false);
sw.Stop();
Console.WriteLine($"{DateTime.Now} - [PdfGenerationCommand] Job finished in {sw.ElapsedMilliseconds}!");
});
});
However, the messages end up in the _skipped queue. I am doing something wrong and I cannot see it