High CPU utilization when using an ActiveMQ failover url with priorityBackup=true

Solution Unverified - Updated -

Environment

  • JBoss A-MQ 6.0

Issue

When JMS clients are configured to use the failover transport in conjunction with priorityBackup=true the CPU utilization goes up immediately.
Removing priorityBackup from the failover url resumes cpu utilization back to normal.

Resolution

In the particular case where this problem had occurred it was caused by the client using the nio:// transport in the failover url.
So a url similar to this was used:

failover:(nio://localhost:61616,nio://remotehost:61616)?priorityBackup=true

The use of the nio transport is only for configuring the broker's transport connector. Its a server side transport only. Its not meant to be used by JMS client applications.
Changing the url to use tcp instead of nio

failover:(tcp://localhost:61616,tcp://remotehost:61616)?priorityBackup=true

resolved the problem.

Root Cause

The nio transport should not be used by JMS client applications. The high cpu utilization may not be observed on every system when combining nio and priorityBackup=true in the failover url.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments