mq
  1. mq
  2. MQ-273

DirectConnection ignores duplicate client ID errors

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 5.0
    • Fix Version/s: None
    • Component/s: mq-ra
    • Labels:
      None

      Description

      If you create a JMSRA connection factory with clientId configured (e.g. using a @JMSConnectionFactoryDefinition annotation) and then call createConnection to create two connections from it, the first connection has the correct clientId set but the second does not.

      This is wrong. The second call to createConnection should throw an exception as it cannot create two connections with the same clientId. It is very misleading to return a connection but with clientID unset.

      A JMSServiceException is thrown internally, but it is caught in DirectConnection._setClientID and logged as a warning:

      WARNING: MQJMSRA_DC2001: connectionId=2641708964950071552:_setClientID():JMSService.setClientId():JMSServiceException=setClientId:
      set client ID failed. Connection ID: 2641708964950071552, Client ID: MyClientID, Shareable: false, nameSpace: null
      

      The JMSServiceException wraps a BrokerException with the message "conflict w/ clientID" (sic), but this is not reported in the log.

      This issue relates to direct mode (DirectConnection), but TCP mode should be checked as well/

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Nigel Deakin
            Reporter:
            Nigel Deakin
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: