Skip to content

Auto-configure MessageConverter for JMS classes #4284

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

Closed
wants to merge 1 commit into from

Conversation

mdeinum
Copy link
Contributor

@mdeinum mdeinum commented Oct 23, 2015

This commit introduces automatic configuration of the messageConverter property for both the JmsTemplate and DefaultJmsListenerContainerFactory.

When a MessageConverter is configured it will be used to configure both classes.

Fixes: gh-4282

 This commit introduces automatic configuration of the `messageConverter` property for both the `JmsTemplate` and `DefaultJmsListenerContainerFactory`.

 When a `MessageConverter` is configured it will be used to configure both classes.

 Fixes: spring-projectsgh-4282
@mdeinum
Copy link
Contributor Author

mdeinum commented Oct 29, 2015

@snicoll any change this could go into the 1.3 release? Or would it be for the next maintenance release 1.3.1?

@snicoll
Copy link
Member

snicoll commented Oct 29, 2015

DestinationResolver is a good candidate because it definitely linked to your "whole" broker. Same thing for transaction management.

MessageConverter is a different beast. It may suit your use case but I wouldn't do this by default for two main reasons:

  1. Just because you have exposed a MessageConverter in your app means that you want the default to be associated with it. How would you not associate it if you don't want to? Create your own factory which seems quite a lot for only that
  2. I can perfectly see a scenario where multiple MessageConverter beans are defined. That will blow up if we merge this.

WDYT?

@mdeinum
Copy link
Contributor Author

mdeinum commented Oct 29, 2015

If you have multiple MessageConverter beans you are probably also not using the auto configuration setup as a MessageConverter on its own isn't doing much. But I can see this for the DefaultJmsListenerContainerFactory for the JmsTemplate however this would be a nice addition I guess.

@philwebb philwebb added the type: enhancement A general enhancement label Nov 5, 2015
@snicoll snicoll added this to the 1.4.0 milestone Dec 21, 2015
@snicoll snicoll self-assigned this Dec 21, 2015
@philwebb philwebb modified the milestones: 1.4.0.M1, 1.4.0 Jan 7, 2016
@snicoll
Copy link
Member

snicoll commented Jan 19, 2016

I want to roll this in once we have a fix for #2784

@snicoll
Copy link
Member

snicoll commented Feb 22, 2016

@mdeinum in 1.3.3 we will have a new service to easily configure a listener container factory, check JmsListenerContainerFactoryConfigurer - Until we merge this, I think it 's a good alternative in 1.3. Let me know if that works for you please!

@snicoll snicoll removed the type: enhancement A general enhancement label Feb 29, 2016
@snicoll snicoll removed this from the 1.4.0.M2 milestone Feb 29, 2016
@snicoll snicoll removed their assignment Feb 29, 2016
@snicoll
Copy link
Member

snicoll commented Feb 29, 2016

Thanks for the PR but the code has changed quite significantly since you opened this PR and I've decided to fix it in a slightly different way (see d13b9a9)

@snicoll snicoll closed this Feb 29, 2016
@mdeinum mdeinum deleted the gh4282 branch April 29, 2021 12:23
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 this pull request may close these issues.

3 participants