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

JMSCC0111 for simple application with two topic listener and without JMS cache #80

Open
bjpe opened this issue Feb 16, 2022 · 1 comment

Comments

@bjpe
Copy link

bjpe commented Feb 16, 2022

Hi everyone,

I have a Java application using Spring Boot 2.6.3 and mq-jms-spring-boot-starter in version 2.6.3 which subscribes to two durable topics using @JmsListener. When I disable the JMS cache, I get the following exception every 5 seconds:

Could not refresh JMS Connection for destination 'topic1' - retrying using FixedBackOff{interval=5000, currentAttempts=1, maxAttempts=unlimited}. Cause: JMSCC0111: IBM MQ classes for JMS attempted to set a pre-existing client ID on a Connection or JMSContext.

A minimal working example can be found at https://github.com/bjpe/jms-mq-jmscc0111, the application is running against a local MQ started in Docker via

docker run --env LICENSE=accept --env MQ_QMGR_NAME=QM1 --env MQ_APP_PASSWORD=passw0rd --publish 1414:1414 --publish 9443:9443 ibmcom/mq:9.1.5.0-r1

If I either enable com.ibm.mq.jms.SupportMQExtensions or spring.jms-cache, then the exception is not thrown.

Is this a bug or am I missing something here? I would be glad for any help.

Kind Regards,
Björn

@ibmmqmet
Copy link
Collaborator

The MQ documentation describes that property and how the clientid would normally need to be unique on connections for a standards-compliant program.

Your config yaml file contains a clientid, so that is going to be set on all connections - which breaks the JMS rules, but the MQExtensions property allows you to go ahead anyway. I don't know why turning on caching also gets round it but perhaps it's reduced the number of connections that are getting made.

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

2 participants