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

inject multiple jmstemplate connections in Spring boot #85

Closed
u742936 opened this issue Jul 25, 2022 · 2 comments
Closed

inject multiple jmstemplate connections in Spring boot #85

u742936 opened this issue Jul 25, 2022 · 2 comments

Comments

@u742936
Copy link

u742936 commented Jul 25, 2022

Using, java 8
spring boot 2.5.0
spring jms 5.3.7
ibm mq 8.0.0.5

using spring boot and application.yml file i have set ibm.mq.queueManager , ibm.mq.channel, ibm.mq.connName and using
@Autowired
JmsTemplate jmstemplate;
I am able to successfully connect to the MQ

but i have second Queuemanager, want to know how to instantiate jmstemplate2 with new set of values in application.yml which are named as ibm.mq2.queueManager , ibm.mq2.channel, ibm.mq2.connName

Is there a easier way to configure it, like below
@Autowired
@qualifier("ibm.mq")
JmsTemplate jmstemplate;

@Autowired
@qualifier("ibm.mq2")
JmsTemplate jmstemplate2;

or do i have to follow this approach https://stackoverflow.com/questions/49520412/spring-boot-multiple-jms-connections

can you pls guide me

@ibmmqmet
Copy link
Collaborator

See, for example, #7 and an article linked from there at https://dev.to/adzubla/using-multiple-jms-servers-with-spring-boot-3cbm

@ibmmqmet ibmmqmet closed this as completed Jan 4, 2023
@Supreja
Copy link

Supreja commented Mar 31, 2023

MqconnectionFactoryFactory is not working.

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

No branches or pull requests

3 participants