Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: remove developer name in doc

Table of Contents

...

Download the following client libraries to <ESB_HOME>/repository/components/lib directory.

  • axis2-transport-mqtt-1.0.0.jar
  • mqtt-client-0.4.0.jar

Enable the transport receiver and sender in <ESB_HOME>/repository/conf/axis2

Code Block
languagexml
titleTransport Receiver and Sender
<transportreceiver class="org.apache.axis2.transport.mqtt.MqttListener" name="mqtt">
        <parameter locked="false" name="mqttConFactory">
                <parameter locked="false" name="mqtt.server.host.name">localhost</parameter>
                            <parameter name="mqtt.connection.factory">mqttConFactory</parameter>
                <parameter locked="false" name="mqtt.server.port">1883</parameter>
                <parameter locked="false" name="mqtt.client.id">elilmatha>client-id.1430394313438</parameter>
                <parameter locked="false" name="mqtt.topic.name">esb.test2</parameter>
        </parameter>
    </transportreceiver>


<transportsender class="org.apache.axis2.transport.mqtt.MqttSender" name="mqtt">
</transportsender>

...

Code Block
languagexml
titleInsequence
<?xml version="1.0" encoding="UTF-8"?>
<inboundEndpoint xmlns="http://ws.apache.org/ns/synapse"
                 name="test"
                 sequence="TestIn"
                 onError="TestIn"
                 protocol="mqtt"
                 suspend="false">
   <parameters>
      <parameter name="sequential">true</parameter>
      <parameter name="mqtt.connection.factory">mqttFactory</parameter>
      <parameter name="mqtt.server.host.name">localhost</parameter>
      <parameter name="mqtt.server.port">1883</parameter>
      <parameter name="mqtt.topic.name">esb.test2</parameter>
      <parameter name="mqtt.subscription.qos">2</parameter>
      <parameter name="mqtt.client.id">elilmatha>client-id.143094112027</parameter>
      <parameter name="content.type">application/xml</parameter>
      <parameter name="mqtt.session.clean">false</parameter>
      <parameter name="mqtt.ssl.enable">false</parameter>
      <parameter name="mqtt.subscription.username">elil1</parameter>
      <parameter name="mqtt.subscription.password">e13</parameter>
      <parameter name="mqtt.temporary.store.directory">my</parameter>
      <parameter name="mqtt.blocking.sender">false</parameter>
   </parameters>
</inboundEndpoint>

...

Code Block
languagexml
titleLocal Entry
<?xml version="1.0" encoding="UTF-8"?>
<localEntry xmlns="http://ws.apache.org/ns/synapse" key="xxx">
   <mqtt.init>
      <hostName>localhost</hostName>
      <port>1883</port>
      <sslEnable>false</sslEnable>
      <asyncClientEnable>true</asyncClientEnable>
      <username>elilmatha<<username>admin</username>
      <password>0777</password>
      <lwMessage>lwMSG</lwMessage>
   </mqtt.init>
   <description/>
</localEntry>

...