Skip to content

Instantly share code, notes, and snippets.

@pzfreo
Last active February 10, 2017 14:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save pzfreo/9703155 to your computer and use it in GitHub Desktop.
Save pzfreo/9703155 to your computer and use it in GitHub Desktop.
Simple WSO2 ESB config to demonstrate HTTP POST -> MQTT
<?xml version="1.0" encoding="UTF-8"?>
<api xmlns="http://ws.apache.org/ns/synapse"
name="mqttP2"
context="/mqttqos">
<resource methods="POST" uri-template="/{qos}">
<inSequence>
<log/>
<property name="OUT_ONLY" value="true"/>
<property name="FORCE_SC_ACCEPTED" value="true" scope="axis2" type="STRING"/>
<property name="messageType" value="application/json" scope="axis2"/>
<send>
<endpoint>
<address uri="mqtt:/StockDetailInterface?mqtt.server.host.name=mqtt-broker&amp;mqtt.server.port=1883&amp;mqtt.client.id=esb.test.sender&amp;mqtt.topic.name=TopicA&amp;mqtt.subscription.qos=0&amp;mqtt.blocking.sender=true"/>
</endpoint>
</send>
</inSequence>
<outSequence>
</outSequence>
</resource>
</api>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment