Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-3256

Detect and warn of XA client misconfiguration

XMLWordPrintable

      The broker is frequently used in transactions from the Wildfly/EAP app server, acting as an XAResource manager to the app server's Transaction Manager. In distributed environments, multiple app server instances can be communicating to the same broker.

      It is common for these app servers to be incorrectly configured, using a shared default nodeId, when this value is required to be unique for safe operation. App server instances don't necessarily communicate peer to peer, so can't detect this situation. The broker, however, sees nodeId values from all its app server clients, so can detect this.

      At present such misconfiguration can lead to data corruption in transactions, as the app servers mis-identify tx ownership when nodeId values are shared. The broker does not consider these situations errors, so generates no ERROR/WARN logs in most production configurations.

      To help users detect and fix such dangerously broken deployments, it would be helpful to have the broker identify and warn of suspicions configurations, such as where multiple tx clients (differing by IPAddr or such) utilize the same nodeId in their Xid values, particularly where that value the default ("1"). This is also true for clients acting on transactions they did not originate. Although there are recovery situations in which another client can legitimately e.g. rollback a tx it did not begin, it's much more likely such a situation represents a misconfiguration.

      so, for example:

      void xaRollback(clientId, xid) {
        if( clientId != getOriginatingClientId(xid) ) {
          log.warn(...)
        }
      }
      

              dbruscin Domenico Francesco Bruscino
              rhn-engineering-jhallida Jonathan Halliday
              Roman Vais Roman Vais (Inactive)
              Emmanuel Hugonnet
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: