From 2f0658f0cfb464677156fcb912fc8395f95540c1 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 23 Sep 2019 06:18:54 +0000 Subject: [PATCH] [WSO2-Release] [Release 3.0.0] update documentation for release 3.0.0 --- README.md | 6 +- docs/api/3.0.0.md | 221 +++++++++++++++++++++++++++++++++++++++++++++ docs/api/latest.md | 71 ++++++++------- docs/index.md | 6 +- mkdocs.yml | 29 +++--- 5 files changed, 281 insertions(+), 52 deletions(-) create mode 100644 docs/api/3.0.0.md diff --git a/README.md b/README.md index 85d6fc4..6ef81b9 100644 --- a/README.md +++ b/README.md @@ -18,12 +18,12 @@ For information on Siddhi and i ## Latest API Docs -Latest API Docs is 2.0.0. +Latest API Docs is 3.0.0. ## Features -* mqtt *(Sink)*

The MQTT sink publishes the events to an MQTT broker

-* mqtt *(Source)*

The MQTT source receives the events from an MQTT broker

+* mqtt *(Sink)*

The MQTT sink publishes the events to an MQTT broker

+* mqtt *(Source)*

The MQTT source receives the events from an MQTT broker

## Dependencies diff --git a/docs/api/3.0.0.md b/docs/api/3.0.0.md new file mode 100644 index 0000000..97cdc99 --- /dev/null +++ b/docs/api/3.0.0.md @@ -0,0 +1,221 @@ +# API Docs - v3.0.0 + +!!! Info "Tested Siddhi Core version: *5.1.2*" + It could also support other Siddhi Core minor versions. + +## Sink + +### mqtt *(Sink)* +

+

The MQTT sink publishes the events to an MQTT broker

+

+Syntax + +``` +@sink(type="mqtt", url="", username="", password="", client.id="", topic="", quality.of.service="", clean.session="", message.retain="", keep.alive="", connection.timeout="", @map(...))) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
url

The URL of the MQTT broker. It is used to connect to the MQTT broker It is required to specify a valid URL here.

STRINGNoNo
username

The username to be provided when the MQTT client is authenticated by the broker.

nullSTRINGYesNo
password

The password to be provided when the MQTT client is authenticated by the broker.

emptySTRINGYesNo
client.id

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.

generated by the systemSTRINGYesNo
topic

The topic to which the events processed by WSO2 SP are published via MQTT. This is a mandatory parameter.

STRINGNoYes
quality.of.service

The quality of service provided by the MQTT client. The possible values are as follows.0: 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.1: 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.2: 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.

1STRINGYesYes
clean.session

This is an optional paramater. If this parameter is set to true, 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.
If this parameter is set to false, 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.
The default value is true.

trueBOOLYesNo
message.retain

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.

falseSTRINGYesYes
keep.alive

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.

60INTYesNo
connection.timeout

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.

30INTYesNo
+ +Examples +EXAMPLE 1 +``` +@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); +``` +

+

This query publishes events to a stream named BarStream via the MQTT transport. The events are published to a topic named mqtt_topic located at tcp://localhost:1883.

+

+## Source + +### mqtt *(Source)* +

+

The MQTT source receives the events from an MQTT broker

+

+Syntax + +``` +@source(type="mqtt", url="", username="", password="", client.id="", topic="", quality.of.service="", clean.session="", keep.alive="", connection.timeout="", @map(...))) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
url

The URL of the MQTT broker. It is used to connect to the MQTT broker. It is required to specify a valid URL here.

STRINGNoNo
username

The username to be provided when the MQTT client is authenticated by the broker.

nullSTRINGYesNo
password

The password to be provided when the MQTT client is authenticated by the broker.

emptySTRINGYesNo
client.id

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.

STRINGNoNo
topic

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.

STRINGNoNo
quality.of.service

The quality of service provided by the MQTT client. The possible values are as follows.0: 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.1: 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.2: 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.

1STRINGYesNo
clean.session

This is an optional paramater. If this parameter is set to true, 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.
If this parameter is set to false, 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.
The default value is true.

trueBOOLYesNo
keep.alive

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.

60INTYesNo
connection.timeout

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.

30INTYesNo
+ +Examples +EXAMPLE 1 +``` +@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); +``` +

+

This query receives events from the mqtt_topic topic via MQTT,and processes them to the BarStream stream.

+

diff --git a/docs/api/latest.md b/docs/api/latest.md index c5895ba..97cdc99 100644 --- a/docs/api/latest.md +++ b/docs/api/latest.md @@ -1,12 +1,16 @@ -# API Docs - v2.0.0 +# API Docs - v3.0.0 -## Sink - -### mqtt *(Sink)* +!!! Info "Tested Siddhi Core version: *5.1.2*" + It could also support other Siddhi Core minor versions. -

The MQTT sink publishes the events to an MQTT broker

+## Sink +### mqtt *(Sink)* +

+

The MQTT sink publishes the events to an MQTT broker

+

Syntax + ``` @sink(type="mqtt", url="", username="", password="", client.id="", topic="", quality.of.service="", clean.session="", message.retain="", keep.alive="", connection.timeout="", @map(...))) ``` @@ -23,7 +27,7 @@ url - The URL of the MQTT broker. It is used to connect to the MQTT broker It is required to specify a valid URL here. +

The URL of the MQTT broker. It is used to connect to the MQTT broker It is required to specify a valid URL here.

STRING No @@ -31,7 +35,7 @@ username - The username to be provided when the MQTT client is authenticated by the broker. +

The username to be provided when the MQTT client is authenticated by the broker.

null STRING Yes @@ -39,7 +43,7 @@ password - The password to be provided when the MQTT client is authenticated by the broker. +

The password to be provided when the MQTT client is authenticated by the broker.

empty STRING Yes @@ -47,7 +51,7 @@ client.id - 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. +

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.

generated by the system STRING Yes @@ -55,7 +59,7 @@ topic - The topic to which the events processed by WSO2 SP are published via MQTT. This is a mandatory parameter. +

The topic to which the events processed by WSO2 SP are published via MQTT. This is a mandatory parameter.

STRING No @@ -63,7 +67,7 @@ quality.of.service - The quality of service provided by the MQTT client. The possible values are as follows.0: 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.1: 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.2: 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. +

The quality of service provided by the MQTT client. The possible values are as follows.0: 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.1: 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.2: 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.

1 STRING Yes @@ -71,7 +75,7 @@ clean.session - This is an optional paramater. If this parameter is set to true, 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.
If this parameter is set to false, 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.
The default value is true. +

This is an optional paramater. If this parameter is set to true, 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.
If this parameter is set to false, 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.
The default value is true.

true BOOL Yes @@ -79,7 +83,7 @@ message.retain - 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. +

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.

false STRING Yes @@ -87,7 +91,7 @@ keep.alive - 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. +

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.

60 INT Yes @@ -95,7 +99,7 @@ connection.timeout - 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. +

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.

30 INT Yes @@ -108,15 +112,17 @@ ``` @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); ``` -

This query publishes events to a stream named BarStream via the MQTT transport. The events are published to a topic named mqtt_topic located at tcp://localhost:1883.

- +

+

This query publishes events to a stream named BarStream via the MQTT transport. The events are published to a topic named mqtt_topic located at tcp://localhost:1883.

+

## Source -### mqtt *(Source)* - -

The MQTT source receives the events from an MQTT broker

- +### mqtt *(Source)* +

+

The MQTT source receives the events from an MQTT broker

+

Syntax + ``` @source(type="mqtt", url="", username="", password="", client.id="", topic="", quality.of.service="", clean.session="", keep.alive="", connection.timeout="", @map(...))) ``` @@ -133,7 +139,7 @@ url - The URL of the MQTT broker. It is used to connect to the MQTT broker. It is required to specify a valid URL here. +

The URL of the MQTT broker. It is used to connect to the MQTT broker. It is required to specify a valid URL here.

STRING No @@ -141,7 +147,7 @@ username - The username to be provided when the MQTT client is authenticated by the broker. +

The username to be provided when the MQTT client is authenticated by the broker.

null STRING Yes @@ -149,7 +155,7 @@ password - The password to be provided when the MQTT client is authenticated by the broker. +

The password to be provided when the MQTT client is authenticated by the broker.

empty STRING Yes @@ -157,7 +163,7 @@ client.id - 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. +

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.

STRING No @@ -165,7 +171,7 @@ topic - 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. +

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.

STRING No @@ -173,7 +179,7 @@ quality.of.service - The quality of service provided by the MQTT client. The possible values are as follows.0: 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.1: 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.2: 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. +

The quality of service provided by the MQTT client. The possible values are as follows.0: 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.1: 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.2: 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.

1 STRING Yes @@ -181,7 +187,7 @@ clean.session - This is an optional paramater. If this parameter is set to true, 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.
If this parameter is set to false, 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.
The default value is true. +

This is an optional paramater. If this parameter is set to true, 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.
If this parameter is set to false, 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.
The default value is true.

true BOOL Yes @@ -189,7 +195,7 @@ keep.alive - 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. +

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.

60 INT Yes @@ -197,7 +203,7 @@ connection.timeout - 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. +

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.

30 INT Yes @@ -210,5 +216,6 @@ ``` @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); ``` -

This query receives events from the mqtt_topic topic via MQTT,and processes them to the BarStream stream.

- +

+

This query receives events from the mqtt_topic topic via MQTT,and processes them to the BarStream stream.

+

diff --git a/docs/index.md b/docs/index.md index 85d6fc4..6ef81b9 100644 --- a/docs/index.md +++ b/docs/index.md @@ -18,12 +18,12 @@ For information on Siddhi and i ## Latest API Docs -Latest API Docs is 2.0.0. +Latest API Docs is 3.0.0. ## Features -* mqtt *(Sink)*

The MQTT sink publishes the events to an MQTT broker

-* mqtt *(Source)*

The MQTT source receives the events from an MQTT broker

+* mqtt *(Sink)*

The MQTT sink publishes the events to an MQTT broker

+* mqtt *(Source)*

The MQTT source receives the events from an MQTT broker

## Dependencies diff --git a/mkdocs.yml b/mkdocs.yml index 96e7ba2..a906e12 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -12,27 +12,29 @@ theme: primary: teal accent: teal extra_css: - - assets/stylesheets/extra.css +- assets/stylesheets/extra.css extra_javascript: - - assets/javascripts/extra.js +- assets/javascripts/extra.js extra: social: - - type: github - link: https://github.com/siddhi-io/siddhi - - type: medium - link: https://medium.com/siddhi-io - - type: twitter - link: https://twitter.com/siddhi_io - - type: linkedin - link: https://www.linkedin.com/groups/13553064 + - type: github + link: https://github.com/siddhi-io/siddhi + - type: medium + link: https://medium.com/siddhi-io + - type: twitter + link: https://twitter.com/siddhi_io + - type: linkedin + link: https://www.linkedin.com/groups/13553064 google_analytics: - - UA-103065-28 - - auto +- UA-103065-28 +- auto markdown_extensions: - - markdown.extensions.admonition +- markdown.extensions.admonition pages: - Information: index.md - API Docs: + - latest: api/latest.md + - 3.0.0: api/3.0.0.md - 2.0.0: api/2.0.0.md - 1.1.1: api/1.1.1.md - 1.1.0: api/1.1.0.md @@ -51,5 +53,4 @@ pages: - 1.0.11: api/1.0.11.md - 1.0.10: api/1.0.10.md - 1.0.9: api/1.0.9.md - - latest: api/latest.md - License: license.md