Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resendt property not assigned #52

Closed
ErHaWi opened this issue Jul 29, 2021 · 1 comment
Closed

Resendt property not assigned #52

ErHaWi opened this issue Jul 29, 2021 · 1 comment

Comments

@ErHaWi
Copy link
Contributor

ErHaWi commented Jul 29, 2021

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();
  }
});
@jarleborsheim
Copy link
Contributor

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 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants