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

Messages with exceptions are not being acknowledged. #37

Open
ryanwi opened this issue Mar 21, 2015 · 2 comments
Open

Messages with exceptions are not being acknowledged. #37

ryanwi opened this issue Mar 21, 2015 · 2 comments

Comments

@ryanwi
Copy link
Contributor

ryanwi commented Mar 21, 2015

Repro:

  • Consumer method raises an exception
  • Error routes through handle_error and notifies configured handlers
  • Message remains in the Unacked state
  • When service is stopped, message returns to the ready queue

Expected:
Consumer exception would be handled and notified, then the message would be acknowledged.

Findings:
Appears to be an issue with the break here:

https://github.com/teamsnap/pipe-ruby/blob/534ca366cfdf1d4dd6a60b2fe39949a0f233b9ad/lib/pipe/reducer.rb#L18

which prevents emque-consuming from reaching the RabbitMQ ack here:

https://github.com/teamsnap/emque-consuming/blob/3b7112eb43bd7c1e1dc9dddc71a3c70409629df0/lib/emque/consuming/adapters/rabbit_mq/worker.rb#L70

@ryanwi
Copy link
Contributor Author

ryanwi commented Mar 21, 2015

@kyleries this may be a clue for the lack of shutdown notification, could be a similar issue with a break in a pipe array preventing the callback to the shutdown handler. Just a hunch at this point now, but similar symptoms in that code is not being reached.

It also explains why we had to purge messages during the Dozer outage last Sunday.

@semmons99 this is probably why we had trouble firing up Dozer initially, since it will just re-process messages that cause errors.

@dmvt what do you think about the break in the reducer rescue? Can we allow the pipe to handle the error and then continue processing.

@ryanwi
Copy link
Contributor Author

ryanwi commented Mar 21, 2015

Ok, it's not the break that's stopping it, it's the handle error.

https://github.com/teamsnap/pipe-ruby/blob/534ca366cfdf1d4dd6a60b2fe39949a0f233b9ad/lib/pipe/reducer.rb#L35

So, I will change the raise on error config and give that a shot.

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

1 participant