Connecting to ActiveMQ Artemis Docker Container with Core API
<p>I am attempting to use the ActiveMQ Artemis Core API to connect to ActiveMQ Artemis running in a docker container.</p>

<p>I am using the following code to attempt the connection.</p>

<pre><code>Map&lt;String,Object&gt; connectionParams = new HashMap&lt;String, Object&gt;();
connectionParams.put(TransportConstants.PORT_PROP_NAME, "61616");
connectionParams.put(TransportConstants.HOST_PROP_NAME, "localhost");


TransportConfiguration tc = new TransportConfiguration(NettyConnectorFactory.class.getName(),connectionParams);

ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(tc);

ClientSessionFactory queueFactory = locator.createSessionFactory();
</code></pre>

<p>Upon running I get the following error when I attempt to create the session factory.</p>

<p><code>ActiveMQNotConnectedException[errorType=NOT_CONNECTED message=AMQ119007: Cannot connect to server(s). Tried with all available servers.]</code></p>

<p>It seems to be that I am missing a critical configuration step when trying to connect to the ActiveMQ Artemis broker. Is there an XML file I need to place somewhere in my Java client application or can I set the proper settings in code?</p>

<p>The Docker image for AtiveMQ Artemis I am using:</p>

<p><a href="https://github.com/vromero/activemq-artemis-docker" rel="nofollow">https://github.com/vromero/activemq-artemis-docker</a></p>