-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Add support for configuring non-standard JMS acknowledge modes #37576
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
Conversation
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
Thanks for the PR, @vpavic. I've rebased this on the latest change in @Test
void testJmsListenerContainerFactoryWithNonStandardAcknowledgeMode() {
this.contextRunner.withUserConfiguration(EnableJmsConfiguration.class)
.withPropertyValues("spring.jms.listener.session.acknowledge-mode=9")
.run((context) -> {
DefaultMessageListenerContainer container = getContainer(context, "jmsListenerContainerFactory");
assertThat(container.getSessionAcknowledgeMode()).isEqualTo(9);
});
} It fails:
Apologies if I have introduced the problem while rebasing but I don't think I have. It looks to me like further Framework changes are required to support this. |
After taking a quick look, it appears that this is caused by a regression in Spring Framework introduced in spring-projects/spring-framework@3b8dd0a. Prior to that commit, I'll open an issue against Framework shortly. |
Instead of an issue, I've opened spring-projects/spring-framework#31328 to address the regression on the Framework side. |
With spring-projects/spring-framework#31328 merged, I assume this is now unblocked? |
Not quite. We'll move to snapshots next week so it's blocked until then. |
Is this expected to target 3.2? I'm asking because there's no assigned milestone. |
Hopefully, yes, but we'll have to see what time permits. I'll assign it to 3.x for now and we can hopefully pull it forwards. |
Prior to this commit, `spring.jms.listener.session.acknowledge-mode` and `spring.jms.template.session.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 allows vendor-specific JMS acknowledge modes to be configured. See spring-projectsgh-37576
I've pushed my polishing: https://github.com/wilkinsona/spring-boot/tree/gh-37576. However, I think we may need to take a different approach for a couple of reasons:
I'd like to discuss this with the rest of the team. |
Prior to this commit, `spring.jms.listener.session.acknowledge-mode` and `spring.jms.template.session.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 allows vendor-specific JMS acknowledge modes to be configured. See gh-37576
Prior to this commit,
spring.jms.listener.acknowledge-mode
andspring.jms.template.acknowledge-mode
accepted only a predefined set ofvalues 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 #37447
Note that this PR depends on #37500 (which adds support for
spring.jms.template.acknowledge-mode
).This PR also wraps up efforts started in #37473 that aim to improve developer experience when working with JMS vendors such as SQS, which provides non-standard acknowledge modes and doesn't support transactions