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

Improve usability in setups that require manual acknowledgement #32

Open
jfiedler-jaconi opened this issue Nov 30, 2023 · 0 comments · May be fixed by #58
Open

Improve usability in setups that require manual acknowledgement #32

jfiedler-jaconi opened this issue Nov 30, 2023 · 0 comments · May be fixed by #58

Comments

@jfiedler-jaconi
Copy link
Contributor

I want to use the retry lib functionality in a scenario where I have to perform Rabbit acknowledgement manually. This means that the Rabbit error handler that the lib currently uses is not in play. The only API available to me is to manually feed the error handler simulating the exceptions it would get in the auto-ack scenario. I then have to react to the exceptions thrown by the error handler (for the Rabbit container). See code sample below.

try {
	retryHandler.handleError(new ListenerExecutionFailedException(e.getMessage(), new RetryMessagesException(task.message())));
} catch (ImmediateAcknowledgeAmqpException ex) {
	ack(task);
} catch (AmqpRejectAndDontRequeueException ex) {
	nack(task, false);
}

I suggest to refactor the retry lib a bit such that the publishing of messages for retry becomes more accessible from the outside (if one cannot use the error handler).

jnodorp-jaconi added a commit that referenced this issue Sep 23, 2024
@jnodorp-jaconi jnodorp-jaconi linked a pull request Sep 23, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant