title: bridging mqtt brokers hivemq and mosquitto
body: <p>I'm trying to bridge two MQTT brokers on the same system, <code>HiveMQ</code> and <code>Mosquitto</code>. <code>HiveMQ</code> is working on port <code>1884</code> and <code>Mosquitto</code> is running on <code>1883</code>. However when I use the <code>mosquitto_pub</code> command to publish to the <code>mosquitto</code> broker at port <code>1883</code>, it does not show up on port <code>1884</code> (Using <code>MQTT.fx</code> as a client subscribing to all topics on port <code>1884</code>)</p>
  
  <p>This is while I only configured the <code>mosquitto</code> broker with a bridge. 
  When I configured <code>HiveMQ</code> as well, it only shows an <code>unable to connect to Bridge1, disconnected</code> message on the <code>HiveMQ</code> command window. I've included the configurations below. Someone please help.</p>
  
  <p>In the <code>mosquitto.config</code> file I have done the following under <code>bridges</code>.</p>
  
  <pre><code>    connection hivemq
      address 127.0.0.1:1884 
      start_type automatic
      clientid clientno1
      notifications true
  </code></pre>
  
  <p>Meanwhile, I also editted the <code>HiveMQ bridges.xml</code> file to read</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;bridges xsi:noNamespaceSchemaLocation="http://www.hivemq.com/bridges/bridge.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
  
  &lt;bridge&gt;
      &lt;connectionName&gt;Bridge1&lt;/connectionName&gt;
      &lt;addresses&gt;
          &lt;address&gt;
              &lt;host&gt;localhost&lt;/host&gt;
              &lt;port&gt;1883&lt;/port&gt;
          &lt;/address&gt;
      &lt;/addresses&gt;
      &lt;clientId&gt;bridgeClient&lt;/clientId&gt;
      &lt;topicPatterns&gt;
          &lt;topicPattern&gt;
              &lt;topic&gt;#&lt;/topic&gt;
              &lt;qos&gt;1&lt;/qos&gt;
              &lt;direction&gt;both&lt;/direction&gt;
              &lt;localPrefix&gt;local/&lt;/localPrefix&gt;
              &lt;remotePrefix&gt;remote/&lt;/remotePrefix&gt;
          &lt;/topicPattern&gt;
      &lt;/topicPatterns&gt;
      &lt;cleanSession&gt;true&lt;/cleanSession&gt;
      &lt;idleTimeout&gt;10&lt;/idleTimeout&gt;
      &lt;notificationsEnabled&gt;true&lt;/notificationsEnabled&gt;
      &lt;tryPrivate&gt;true&lt;/tryPrivate&gt;
  
  &lt;/bridge&gt;
  </code></pre>
  
  <p></p>
  
  <p><img src="https://i.stack.imgur.com/EnTlE.png" alt="The image below is when I tried the same process on another system. Here, the brokers are bridged. Comparing this to what I was doing earlier, the only difference is that on my original system there is no statement saying opening ipv4 listen socket on 1883. Is this the problem?"></p>
  
  <p>The image shown is when I tried the same process on another system. Here, the brokers are bridged. Comparing this to what I was doing earlier, the only difference is that on my original system there is no statement saying opening ipv4 listen socket on 1883. Is this the problem?</p>