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

Add support for configuring non-standard JMS acknowledge modes #37447

Closed
vpavic opened this issue Sep 18, 2023 · 2 comments
Closed

Add support for configuring non-standard JMS acknowledge modes #37447

vpavic opened this issue Sep 18, 2023 · 2 comments
Labels
status: superseded An issue that has been superseded by another type: enhancement A general enhancement

Comments

@vpavic
Copy link
Contributor

vpavic commented Sep 18, 2023

The spring.jms.listener.acknowledge-mode configuration property currently supports only (a subset of) standard acknowledge modes.

However, it's quite common to use a non-standard acknowledge modes, such as SQS's UNORDERED_ACKNOWLEDGE which is described as:

Non standard acknowledge mode. This is a variation of CLIENT_ACKNOWLEDGE where Clients need to remember to call acknowledge on message. Difference is that calling acknowledge on a message only acknowledge the message being called.

Instead of having to provide a DefaultJmsListenerContainerFactory bean in every project to overcome the limitation, it would be nice if there would be a way to configure the desired acknowledge mode using configuration properties. This is especially the case now that Spring Framework has made it a bit easier to work with non-standard acknowledge modes after spring-projects/spring-framework#30619.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Sep 18, 2023
@philwebb philwebb added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Sep 18, 2023
@philwebb philwebb added this to the 3.x milestone Sep 18, 2023
@vpavic
Copy link
Contributor Author

vpavic commented Sep 18, 2023

I can provide a PR to address this (seeing it's currently assigned to 3.x, with hope to see this land in 3.2), as I work quite frequently with SQS these days so this change would be a valuable improvement.

I'm just curious whether there's some precedent in handling a combination of well-known and arbitrary values in the same property? Or feedback whether such approach would be a no-go.

vpavic added a commit to vpavic/spring-boot that referenced this issue Sep 25, 2023
Prior to this commit, `spring.jms.listener.acknowledge-mode` and
`spring.jms.template.acknowledge-mode` accepted only a predefined set of
values representing standard JMS acknowledge modes.

This commit adds support for also using arbitrary integer values to
these configuration properties, which allow configuring vendor-specific
JMS acknowledge modes.

Closes spring-projectsgh-37447
@wilkinsona
Copy link
Member

Thanks, @vpavic. I'm not yet totally sure about the handling of well-known and arbitrary values but we can sort that out in #37576.

@wilkinsona wilkinsona closed this as not planned Won't fix, can't repro, duplicate, stale Sep 27, 2023
@wilkinsona wilkinsona added the status: superseded An issue that has been superseded by another label Sep 27, 2023
@wilkinsona wilkinsona removed this from the 3.x milestone Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: superseded An issue that has been superseded by another type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants