Fuse Message Broker logs warning that broker named "localhost" is not started

Solution Verified - Updated -

Environment

  • Fuse Message Broker 5.5.1

Issue

  • Why is the broker named "localhost" not started

  • WARN BrokerRegistry - Broker localhost not started so using OTHER_BROKER_NAME instead

Resolution

To avoid this warning message, ensure your VM transport connection(s) URL uses the configured broker name. The broker name is configured in your broker's configuration file (in .../conf/activemq.xml by default).

Root Cause

On broker startup the broker name is added to the local broker registory. The default configuration uses broker name "localhost". When a client uses the VM transport to connect to a collocated broker (in same JVM) it must specify the broker name. The default VM connection URL is:


vm://localhost

However if the broker name is changed in the configuration, the VM connection URL must also be changed accordingly e.g. changing broker name to "brokerone" will change the VM connect URL to:


vm://brokerone

If the client connection specifies "localhost" in the VM transport connection URL but the "localhost" name is not found in the broker registory, it will use the first available broker found for the VM connection . This result in the warning message:


WARN BrokerRegistry - Broker localhost not started so using OTHER_BROKER_NAME* instead *where OTHER_BROKER_NAME above will be replaced with the configured broker name.

NOTE: This behavior is specific to using "localhost" in the VM connection URL. If the client specifies another broker name in the VM connection URL that is not "localhost" and that name cannot be found in the broker registory; activemq will try to start a new broker, giving the new broker that name.

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