ibm-messaging / mq-jms-spring

Components to assist MQ JMS integration with Spring frameworks
Apache License 2.0
186 stars 102 forks source link

How to define IBM MQ connection details when using spring config server #73

Closed akhettar closed 2 years ago

akhettar commented 2 years ago

Hell0 there, this is not an issue rather a question. Apologies, I did not know where to post such a question.

I am using spring cloud config server to define application property in a centralized config server - see https://spring.io/guides/gs/centralized-configuration/

I was wondering how to define these properties when using the centralized config serer

ibm.mq.queueManager=QM1
ibm.mq.channel=SYSTEM.DEF.SVRCONN
ibm.mq.connName=localhost(1414)

Bear in mind the way properties are defined when using the config server is as follow:

config-service-oner:

  region: emea
  awsRegion: eu-west-1

  property-1: value1
  ibm:
    mq:
      queueManager: QM1
      channel: SYSTEM.DEF.SVRCONN
      connName: localhost(1414)

JMSTemalate expects the IBM connection details to be at the root of the property file. Is there a way of creating a connection factory for the JMSTemplate dynamically?

Thanks in advance

akhettar commented 2 years ago

Sorry the prefix of the config file is not needed in the property file, hence the IBM properties can be at the root.