Skip to content

Commit

Permalink
[WSO2-Release] [Release 3.0.2] update documentation for release 3.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
wso2-jenkins-bot committed Feb 23, 2022
1 parent 51c372e commit fc4092e
Show file tree
Hide file tree
Showing 5 changed files with 230 additions and 8 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ For information on <a target="_blank" href="https://siddhi.io/">Siddhi</a> and i

## Latest API Docs

Latest API Docs is <a target="_blank" href="https://siddhi-io.github.io/siddhi-io-mqtt/api/3.0.1">3.0.1</a>.
Latest API Docs is <a target="_blank" href="https://siddhi-io.github.io/siddhi-io-mqtt/api/3.0.2">3.0.2</a>.

## Features

* <a target="_blank" href="https://siddhi-io.github.io/siddhi-io-mqtt/api/3.0.1/#mqtt-sink">mqtt</a> *(<a target="_blank" href="http://siddhi.io/en/v5.1/docs/query-guide/#sink">Sink</a>)*<br> <div style="padding-left: 1em;"><p><p style="word-wrap: break-word;margin: 0;">The MQTT sink publishes the events to an MQTT broker </p></p></div>
* <a target="_blank" href="https://siddhi-io.github.io/siddhi-io-mqtt/api/3.0.1/#mqtt-source">mqtt</a> *(<a target="_blank" href="http://siddhi.io/en/v5.1/docs/query-guide/#source">Source</a>)*<br> <div style="padding-left: 1em;"><p><p style="word-wrap: break-word;margin: 0;">The MQTT source receives the events from an MQTT broker </p></p></div>
* <a target="_blank" href="https://siddhi-io.github.io/siddhi-io-mqtt/api/3.0.2/#mqtt-sink">mqtt</a> *(<a target="_blank" href="http://siddhi.io/en/v5.1/docs/query-guide/#sink">Sink</a>)*<br> <div style="padding-left: 1em;"><p><p style="word-wrap: break-word;margin: 0;">The MQTT sink publishes the events to an MQTT broker </p></p></div>
* <a target="_blank" href="https://siddhi-io.github.io/siddhi-io-mqtt/api/3.0.2/#mqtt-source">mqtt</a> *(<a target="_blank" href="http://siddhi.io/en/v5.1/docs/query-guide/#source">Source</a>)*<br> <div style="padding-left: 1em;"><p><p style="word-wrap: break-word;margin: 0;">The MQTT source receives the events from an MQTT broker </p></p></div>

## Dependencies

Expand Down
221 changes: 221 additions & 0 deletions docs/api/3.0.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@
# API Docs - v3.0.2

!!! Info "Tested Siddhi Core version: *<a target="_blank" href="http://siddhi.io/en/v5.1/docs/query-guide/">5.1.21</a>*"
It could also support other Siddhi Core minor versions.

## Sink

### mqtt *<a target="_blank" href="http://siddhi.io/en/v5.1/docs/query-guide/#sink">(Sink)</a>*
<p></p>
<p style="word-wrap: break-word;margin: 0;">The MQTT sink publishes the events to an MQTT broker </p>
<p></p>
<span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span>

```
@sink(type="mqtt", url="<STRING>", username="<STRING>", password="<STRING>", client.id="<STRING>", topic="<STRING>", quality.of.service="<STRING>", clean.session="<BOOL>", message.retain="<STRING>", keep.alive="<INT>", connection.timeout="<INT>", @map(...)))
```

<span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span>
<table>
<tr>
<th>Name</th>
<th style="min-width: 20em">Description</th>
<th>Default Value</th>
<th>Possible Data Types</th>
<th>Optional</th>
<th>Dynamic</th>
</tr>
<tr>
<td style="vertical-align: top">url</td>
<td style="vertical-align: top; word-wrap: break-word"><p style="word-wrap: break-word;margin: 0;">The URL of the MQTT broker. It is used to connect to the MQTT broker It is required to specify a valid URL here.</p></td>
<td style="vertical-align: top"></td>
<td style="vertical-align: top">STRING</td>
<td style="vertical-align: top">No</td>
<td style="vertical-align: top">No</td>
</tr>
<tr>
<td style="vertical-align: top">username</td>
<td style="vertical-align: top; word-wrap: break-word"><p style="word-wrap: break-word;margin: 0;">The username to be provided when the MQTT client is authenticated by the broker.</p></td>
<td style="vertical-align: top">null</td>
<td style="vertical-align: top">STRING</td>
<td style="vertical-align: top">Yes</td>
<td style="vertical-align: top">No</td>
</tr>
<tr>
<td style="vertical-align: top">password</td>
<td style="vertical-align: top; word-wrap: break-word"><p style="word-wrap: break-word;margin: 0;">The password to be provided when the MQTT client is authenticated by the broker.</p></td>
<td style="vertical-align: top">empty</td>
<td style="vertical-align: top">STRING</td>
<td style="vertical-align: top">Yes</td>
<td style="vertical-align: top">No</td>
</tr>
<tr>
<td style="vertical-align: top">client.id</td>
<td style="vertical-align: top; word-wrap: break-word"><p style="word-wrap: break-word;margin: 0;">A unique ID for the MQTT client. The server uses this to identify the client when it reconnects. If you do not specify a client ID, the system automatically generates it. </p></td>
<td style="vertical-align: top">generated by the system</td>
<td style="vertical-align: top">STRING</td>
<td style="vertical-align: top">Yes</td>
<td style="vertical-align: top">No</td>
</tr>
<tr>
<td style="vertical-align: top">topic</td>
<td style="vertical-align: top; word-wrap: break-word"><p style="word-wrap: break-word;margin: 0;">The topic to which the events processed by WSO2 SP are published via MQTT. This is a mandatory parameter.</p></td>
<td style="vertical-align: top"></td>
<td style="vertical-align: top">STRING</td>
<td style="vertical-align: top">No</td>
<td style="vertical-align: top">Yes</td>
</tr>
<tr>
<td style="vertical-align: top">quality.of.service</td>
<td style="vertical-align: top; word-wrap: break-word"><p style="word-wrap: break-word;margin: 0;">The quality of service provided by the MQTT client. The possible values are as follows.<code>0</code>: The MQTT client sends each event only once. It does not receive an acknowledgement when an event is delivered, and the events are not stored. Events may get lost if the MQTT client is disconnected or if the server fails. This is the fastest method in which events are received via MQTT.<code>1</code>: The MQTT client sends each event at least once. If the MQTT client does not receive an acknowledgement to indicate that the event is delivered, it sends the event again.<code>2</code>: The MQTT client sends each event only once. The events are stored until the WSO2 SP receives them. This is the safest, but the slowest method of receiving events via MQTT.</p></td>
<td style="vertical-align: top">1</td>
<td style="vertical-align: top">STRING</td>
<td style="vertical-align: top">Yes</td>
<td style="vertical-align: top">Yes</td>
</tr>
<tr>
<td style="vertical-align: top">clean.session</td>
<td style="vertical-align: top; word-wrap: break-word"><p style="word-wrap: break-word;margin: 0;">This is an optional paramater. If this parameter is set to <code>true</code>, the subscriptions made by the MQTT client during a session expire when the session ends,and they need to be recreated for the next session.<br>If this parameter is set to <code>false</code>, all the information relating to the MQTT client's connection to the broker (e.g., the specific topics to which the client has subscribed) are saved after a session. Thus, when a session ends and restarts, the connection is re-established with the same information.<br>The default value is <code>true</code>.</p></td>
<td style="vertical-align: top">true</td>
<td style="vertical-align: top">BOOL</td>
<td style="vertical-align: top">Yes</td>
<td style="vertical-align: top">No</td>
</tr>
<tr>
<td style="vertical-align: top">message.retain</td>
<td style="vertical-align: top; word-wrap: break-word"><p style="word-wrap: break-word;margin: 0;">If this parameter is set to true, the last message sent from the topic to which WSO2 SP publishes events is retained until the next message is sent.</p></td>
<td style="vertical-align: top">false</td>
<td style="vertical-align: top">STRING</td>
<td style="vertical-align: top">Yes</td>
<td style="vertical-align: top">Yes</td>
</tr>
<tr>
<td style="vertical-align: top">keep.alive</td>
<td style="vertical-align: top; word-wrap: break-word"><p style="word-wrap: break-word;margin: 0;">The maximum number of seconds the connection between the MQTT client and the broker should be maintained without any events being transferred. Once this time interval elapses without any event transfers, the connection is dropped. The default value is 60.</p></td>
<td style="vertical-align: top">60</td>
<td style="vertical-align: top">INT</td>
<td style="vertical-align: top">Yes</td>
<td style="vertical-align: top">No</td>
</tr>
<tr>
<td style="vertical-align: top">connection.timeout</td>
<td style="vertical-align: top; word-wrap: break-word"><p style="word-wrap: break-word;margin: 0;">The maximum number of seconds that the MQTT client should spend attempting to connect to the MQTT broker. Once this time interval elapses, a timeout takes place.</p></td>
<td style="vertical-align: top">30</td>
<td style="vertical-align: top">INT</td>
<td style="vertical-align: top">Yes</td>
<td style="vertical-align: top">No</td>
</tr>
</table>

<span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span>
<span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span>
```
@sink(type='mqtt', url= 'tcp://localhost:1883', topic='mqtt_topic', clean.session='true', message.retain='false', quality.of.service= '1', keep.alive= '60',connection.timeout='30'@map(type='xml'))Define stream BarStream (symbol string, price float, volume long);
```
<p></p>
<p style="word-wrap: break-word;margin: 0;">This query publishes events to a stream named <code>BarStream</code> via the MQTT transport. The events are published to a topic named mqtt_topic located at tcp://localhost:1883.</p>
<p></p>
## Source

### mqtt *<a target="_blank" href="http://siddhi.io/en/v5.1/docs/query-guide/#source">(Source)</a>*
<p></p>
<p style="word-wrap: break-word;margin: 0;">The MQTT source receives the events from an MQTT broker </p>
<p></p>
<span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span>

```
@source(type="mqtt", url="<STRING>", username="<STRING>", password="<STRING>", client.id="<STRING>", topic="<STRING>", quality.of.service="<STRING>", clean.session="<BOOL>", keep.alive="<INT>", connection.timeout="<INT>", @map(...)))
```

<span id="query-parameters" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">QUERY PARAMETERS</span>
<table>
<tr>
<th>Name</th>
<th style="min-width: 20em">Description</th>
<th>Default Value</th>
<th>Possible Data Types</th>
<th>Optional</th>
<th>Dynamic</th>
</tr>
<tr>
<td style="vertical-align: top">url</td>
<td style="vertical-align: top; word-wrap: break-word"><p style="word-wrap: break-word;margin: 0;">The URL of the MQTT broker. It is used to connect to the MQTT broker. It is required to specify a valid URL here.</p></td>
<td style="vertical-align: top"></td>
<td style="vertical-align: top">STRING</td>
<td style="vertical-align: top">No</td>
<td style="vertical-align: top">No</td>
</tr>
<tr>
<td style="vertical-align: top">username</td>
<td style="vertical-align: top; word-wrap: break-word"><p style="word-wrap: break-word;margin: 0;">The username to be provided when the MQTT client is authenticated by the broker.</p></td>
<td style="vertical-align: top">null</td>
<td style="vertical-align: top">STRING</td>
<td style="vertical-align: top">Yes</td>
<td style="vertical-align: top">No</td>
</tr>
<tr>
<td style="vertical-align: top">password</td>
<td style="vertical-align: top; word-wrap: break-word"><p style="word-wrap: break-word;margin: 0;">The password to be provided when the MQTT client is authenticated by the broker.</p></td>
<td style="vertical-align: top">empty</td>
<td style="vertical-align: top">STRING</td>
<td style="vertical-align: top">Yes</td>
<td style="vertical-align: top">No</td>
</tr>
<tr>
<td style="vertical-align: top">client.id</td>
<td style="vertical-align: top; word-wrap: break-word"><p style="word-wrap: break-word;margin: 0;">A unique ID for the MQTT client. The server uses this to identify the client when it reconnects. If you do not specify a client ID, the system automatically generates it.</p></td>
<td style="vertical-align: top"></td>
<td style="vertical-align: top">STRING</td>
<td style="vertical-align: top">No</td>
<td style="vertical-align: top">No</td>
</tr>
<tr>
<td style="vertical-align: top">topic</td>
<td style="vertical-align: top; word-wrap: break-word"><p style="word-wrap: break-word;margin: 0;">The topic from which WSO2 SP receives events via MQTT. Multiple topics can be specified as a list of comma separated values.This is a mandatory parameter.</p></td>
<td style="vertical-align: top"></td>
<td style="vertical-align: top">STRING</td>
<td style="vertical-align: top">No</td>
<td style="vertical-align: top">No</td>
</tr>
<tr>
<td style="vertical-align: top">quality.of.service</td>
<td style="vertical-align: top; word-wrap: break-word"><p style="word-wrap: break-word;margin: 0;">The quality of service provided by the MQTT client. The possible values are as follows.<code>0</code>: The MQTT client sends each event to WSO2 SP only once. It does not receive an acknowledgement when an event is delivered, and the events are not stored.Events may get lost if the MQTT client is disconnected or if the server fails.This is the fastest method in which events are received via MQTT.<code>1</code>: The MQTT client sends each event to WSO2 SP at least once. If the MQTT client does not receive an acknowledgement to indicate that the event is delivered, it sends the event again.<code>2</code>: The MQTT client sends each event to WSO2 SP only once. The events are stored until the WSO2 SP receives them. This is the safest, but the slowest method of receiving events via MQTT.</p></td>
<td style="vertical-align: top">1</td>
<td style="vertical-align: top">STRING</td>
<td style="vertical-align: top">Yes</td>
<td style="vertical-align: top">No</td>
</tr>
<tr>
<td style="vertical-align: top">clean.session</td>
<td style="vertical-align: top; word-wrap: break-word"><p style="word-wrap: break-word;margin: 0;">This is an optional paramater. If this parameter is set to <code>true</code>, the subscriptions made by the MQTT client during a session expire when the session ends,and they need to be recreated for the next session.<br>If this parameter is set to <code>false</code>, all the information relating to the MQTT client's connection to the broker (e.g., the specific topics to which the client has subscribed) are saved after a session. Thus, when a session ends and restarts, the connection is re-established with the same information.<br>The default value is <code>true</code>.</p></td>
<td style="vertical-align: top">true</td>
<td style="vertical-align: top">BOOL</td>
<td style="vertical-align: top">Yes</td>
<td style="vertical-align: top">No</td>
</tr>
<tr>
<td style="vertical-align: top">keep.alive</td>
<td style="vertical-align: top; word-wrap: break-word"><p style="word-wrap: break-word;margin: 0;">The maximum number of seconds the connection between the MQTT client and the broker should be maintained without any events being transferred. Once this time interval elapses without any event transfers, the connection is dropped. The default value is 60.</p></td>
<td style="vertical-align: top">60</td>
<td style="vertical-align: top">INT</td>
<td style="vertical-align: top">Yes</td>
<td style="vertical-align: top">No</td>
</tr>
<tr>
<td style="vertical-align: top">connection.timeout</td>
<td style="vertical-align: top; word-wrap: break-word"><p style="word-wrap: break-word;margin: 0;">The maximum number of seconds that the MQTT client should spend attempting to connect to the MQTT broker. Once this time interval elapses, a timeout takes place.</p></td>
<td style="vertical-align: top">30</td>
<td style="vertical-align: top">INT</td>
<td style="vertical-align: top">Yes</td>
<td style="vertical-align: top">No</td>
</tr>
</table>

<span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span>
<span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span>
```
@source(type='mqtt', url= 'tcp://localhost:1883', topic='mqtt_topic', clean.session='true',quality.of.service= '1', keep.alive= '60',connection.timeout='30'@map(type='xml'))Define stream BarStream (symbol string, price float, volume long);
```
<p></p>
<p style="word-wrap: break-word;margin: 0;">This query receives events from the <code>mqtt_topic</code> topic via MQTT,and processes them to the BarStream stream.</p>
<p></p>
4 changes: 2 additions & 2 deletions docs/api/latest.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# API Docs - v3.0.1
# API Docs - v3.0.2

!!! Info "Tested Siddhi Core version: *<a target="_blank" href="http://siddhi.io/en/v5.1/docs/query-guide/">5.1.13</a>*"
!!! Info "Tested Siddhi Core version: *<a target="_blank" href="http://siddhi.io/en/v5.1/docs/query-guide/">5.1.21</a>*"
It could also support other Siddhi Core minor versions.

## Sink
Expand Down
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ For information on <a target="_blank" href="https://siddhi.io/">Siddhi</a> and i

## Latest API Docs

Latest API Docs is <a target="_blank" href="https://siddhi-io.github.io/siddhi-io-mqtt/api/3.0.1">3.0.1</a>.
Latest API Docs is <a target="_blank" href="https://siddhi-io.github.io/siddhi-io-mqtt/api/3.0.2">3.0.2</a>.

## Features

* <a target="_blank" href="https://siddhi-io.github.io/siddhi-io-mqtt/api/3.0.1/#mqtt-sink">mqtt</a> *(<a target="_blank" href="http://siddhi.io/en/v5.1/docs/query-guide/#sink">Sink</a>)*<br> <div style="padding-left: 1em;"><p><p style="word-wrap: break-word;margin: 0;">The MQTT sink publishes the events to an MQTT broker </p></p></div>
* <a target="_blank" href="https://siddhi-io.github.io/siddhi-io-mqtt/api/3.0.1/#mqtt-source">mqtt</a> *(<a target="_blank" href="http://siddhi.io/en/v5.1/docs/query-guide/#source">Source</a>)*<br> <div style="padding-left: 1em;"><p><p style="word-wrap: break-word;margin: 0;">The MQTT source receives the events from an MQTT broker </p></p></div>
* <a target="_blank" href="https://siddhi-io.github.io/siddhi-io-mqtt/api/3.0.2/#mqtt-sink">mqtt</a> *(<a target="_blank" href="http://siddhi.io/en/v5.1/docs/query-guide/#sink">Sink</a>)*<br> <div style="padding-left: 1em;"><p><p style="word-wrap: break-word;margin: 0;">The MQTT sink publishes the events to an MQTT broker </p></p></div>
* <a target="_blank" href="https://siddhi-io.github.io/siddhi-io-mqtt/api/3.0.2/#mqtt-source">mqtt</a> *(<a target="_blank" href="http://siddhi.io/en/v5.1/docs/query-guide/#source">Source</a>)*<br> <div style="padding-left: 1em;"><p><p style="word-wrap: break-word;margin: 0;">The MQTT source receives the events from an MQTT broker </p></p></div>

## Dependencies

Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ pages:
- Information: index.md
- API Docs:
- latest: api/latest.md
- 3.0.2: api/3.0.2.md
- 3.0.1: api/3.0.1.md
- 3.0.0: api/3.0.0.md
- 2.0.0: api/2.0.0.md
Expand Down

0 comments on commit fc4092e

Please sign in to comment.