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

Original payload lost on reqeue #6

Open
utopos opened this issue Aug 18, 2024 · 2 comments
Open

Original payload lost on reqeue #6

utopos opened this issue Aug 18, 2024 · 2 comments

Comments

@utopos
Copy link

utopos commented Aug 18, 2024

Processing failure requeues the message with the last updated payload:

  @impl Broadway.Acknowledger
  def ack(ack_ref, _successful, failed) do
    ack_options = :persistent_term.get(ack_ref)
    requeue? = ack_options[:on_failure] == :requeue

    requeue =
      failed
      |> Enum.filter(&ack?(&1, requeue?))
      |> Enum.map(& &1.data)

    Buffer.push(ack_options.buffer, requeue)

    :ok
  end

Expected behavior would to be requeue with initial payload.

@elliotekj
Copy link
Owner

Thanks for reporting! I don't have much spare time at the moment but I should be able to get a fix in this week.

@utopos
Copy link
Author

utopos commented Aug 19, 2024

Hey, I wrote a quick fix to it. Please have a look: 7e4cc89

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