How to get ActiveMQ dynamic discovery working in Docker Containers?

Solution Verified - Updated -

Issue

Trying to ActiveMQ dynamic discovery working in Docker Containers is not working. I believe the issue is with the AddressStrategy advertising the Hostname of the ActiveMQ instance instead of the IP address. As the hostname is not resolvable due to it being dynamically generated, the nodes cannot connect.

Please see below for activemq.xml interesting parts:

    <networkConnectors>
            <networkConnector uri="multicast://default"/>
    </networkConnectors>

    <!--
        The transport connectors expose ActiveMQ over a given protocol to
        clients and other brokers. For more information, see:

        http://activemq.apache.org/configuring-transports.html
    -->
    <transportConnectors>
        <!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB -->
        <transportConnector name="openwire"
            uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"
            discoveryUri="multicast://default" />
        <transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
        <transportConnector name="stomp" uri="stomp://0.0.0.0:61613?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
        <transportConnector name="mqtt" uri="mqtt://0.0.0.0:1883?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
        <transportConnector name="ws" uri="ws://0.0.0.0:61614?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
    </transportConnectors>

Please see below for log output:

Could not start network bridge between: vm://197490b7a218?async=false&create=false and: tcp://3aa0b58b9ffa:61616 due to: 3aa0b58b9ffa

I have found some details around how to tell the instance to use IP ADDRESS as the published address strategy, but I cannot seem to get this working

publishedAddressStrategy="ipaddr

How can I change the address publishing strategy to use IP address instead of hostname?

Environment

  • Red Hat JBoss A-MQ 6.3.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content