Resendt property not assigned
ErHaWi opened this issue · comments
Issue
We're attempting to implement a retry mechanic if some message processing fails, a simple mechanic for requeueing messages when they fail on the first attempt.
I'm expecting the Resendt property of a message to be true when responding with NackWithRequeue(). This does not seem to be the case as the code snippet below ends with the handler requeueing a message infinitely.
Steps to reproduce
...
FiksIOClient client = new FiksIOClient(config);
await client.Send(new MeldingRequest(client.KontoId, client.KontoId, "Test"));
bool success = false;
client.NewSubscription((_, args) =>
{
if (success)
{
Console.WriteLine("Successfull");
args.SvarSender.Ack();
}
else if (args.Melding.Resendt)
{
Console.WriteLine("Failed after Retry");
args.SvarSender.Nack();
}
else
{
Console.WriteLine("Failed, attempting retry");
args.SvarSender.NackWithRequeue();
}
});
Closing this issue since it should be fixed with the latest version of the nuget-package (2.0.2). Thank you for registering the issue @ErHaWi 👍