This is an automated email from the ASF dual-hosted git repository. orpiske pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit 1b13bfe4e36105b5061645b016bc3484f25e0903 Author: Otavio Rodolfo Piske <angusyo...@gmail.com> AuthorDate: Mon Feb 19 16:54:50 2024 +0100 CAMEL-20410: documentation fixes for camel-paho - Fixed samples - Fixed grammar and typos - Fixed punctuation - Added and/or fixed links --- .../camel-paho/src/main/docs/paho-component.adoc | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/components/camel-paho/src/main/docs/paho-component.adoc b/components/camel-paho/src/main/docs/paho-component.adoc index 08671f238e5..e0efda9ea26 100644 --- a/components/camel-paho/src/main/docs/paho-component.adoc +++ b/components/camel-paho/src/main/docs/paho-component.adoc @@ -14,9 +14,9 @@ *{component-header}* -Paho component provides connector for the MQTT messaging protocol using -the https://eclipse.org/paho/[Eclipse Paho] library. Paho is one of the -most popular MQTT libraries, so if you would like to integrate it with +Paho component provides a connector for the https://en.wikipedia.org/wiki/MQTT[MQTT] messaging protocol using +the https://eclipse.org/paho/[Eclipse Paho] library. +Paho is one of the most popular MQTT libraries, so if you would like to integrate it with your Java project - Camel Paho connector is a way to go. Maven users will need to add the following dependency to their `pom.xml` @@ -39,7 +39,7 @@ for this component: paho:topic[?options] ---- -Where *topic* is the name of the topic. +Where `topic` is the name of the topic. // component-configure options: START @@ -61,7 +61,7 @@ include::partial$component-endpoint-headers.adoc[] == Default payload type -By default, Camel Paho component operates on the binary payloads +By default, the Camel Paho component operates on the binary payloads extracted out of (or put into) the MQTT message: [source,java] @@ -74,10 +74,8 @@ byte[] payload = "message".getBytes(); producerTemplate.sendBody("paho:topic", payload); ---- -But of course Camel build-in xref:manual::type-converter.adoc[type conversion -API] can perform the automatic data type transformations for you. In the -example below Camel automatically converts binary payload into `String` -(and conversely): +Of course, Camel build-in xref:manual::type-converter.adoc[type conversion API] can perform the automatic data type transformations for you. +In the example below Camel automatically converts binary payload into `String` (and conversely): [source,java] ---- @@ -92,7 +90,7 @@ producerTemplate.sendBody("paho:topic", payload); == Samples -For example the following snippet reads messages from the MQTT broker +For example, the following snippet reads messages from the MQTT broker installed on the same host as the Camel router: [source,java] @@ -101,7 +99,7 @@ from("paho:some/queue") .to("mock:test"); ---- -While the snippet below sends message to the MQTT broker: +While the snippet below sends a message to the MQTT broker: [source,java] ---- @@ -109,7 +107,7 @@ from("direct:test") .to("paho:some/target/queue"); ---- -For example this is how to read messages from the remote MQTT broker: +For example, this is how to read messages from the remote MQTT broker: [source,java] ----