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 Extensibility of RepublishMessageRecovererWithConfirms by supporting SpEL expressions #2590

Closed
DiogoPDias opened this issue Dec 19, 2023 · 1 comment
Labels
ideal-for-user-contribution An issue that would ideal for a user to get started with contributing. in: rabbitmq type: enhancement
Milestone

Comments

@DiogoPDias
Copy link

DiogoPDias commented Dec 19, 2023

Expected Behavior

It would be great if we could configure the errorExchange and the errorRoutingKey on RepublishMessageRecovererWithConfirms like it was done in RepublishMessageRecoverer by supporting SpEL expressions for those parameters.

Current Behavior

Right now, RepublishMessageRecovererWithConfirms does not support SpEL expressions on errorExchange and the errorRoutingKey, we can only pass the exchange and the routingKey at initiation, limiting the possibility of changing those values at runtime.

Context

Has it was done in this #1527 to support SpEL expressions for the class RepublishMessageRecoverer, we would like to use the RepublishMessageRecovererWithConfirms but with SpEL expression to define the errorRoutingKey dynamically.
We use one RepublishMessageRecovererWithConfirms for multiple listeners, and with SpEL expressions, it would be possible to define different errorRoutingKeys for different queues.

@artembilan
Copy link
Member

Sounds good.
That one has a respective ctor:

public RepublishMessageRecoverer(AmqpTemplate errorTemplate, @Nullable Expression errorExchange,
			@Nullable Expression errorRoutingKey) {

it will be very easy to expose that on the RepublishMessageRecovererWithConfirms extension.

Feel free to contribute the fix: https://github.com/spring-projects/spring-amqp/blob/main/CONTRIBUTING.adoc !

@artembilan artembilan added the ideal-for-user-contribution An issue that would ideal for a user to get started with contributing. label Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ideal-for-user-contribution An issue that would ideal for a user to get started with contributing. in: rabbitmq type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants