---
title: c Paho MQTT and Paho MQTT5
description: Available connectors
documentId: ipaas-paho-paho5
locale: en-US
---

## Paho MQTT

The [**Paho**](https://camel.apache.org/components/4.10.x/paho-component.html) component enables integration of applications with the MQTT protocol, facilitating communication between devices and systems in Internet of Things (IoT) environments.

**Important notes:**
- Supports connection to external MQTT brokers to publish messages and subscribe to topics.
- Integrations **cannot** be used as an MQTT broker (only as a client).
- Compatible with MQTT protocol versions 3.1.1 and 3.1.

**URI Syntax**: `paho:topic`

### Main Fields

*Path parameters*

| **Name** | **Description** | **Default** | **Type** |
|----------|---------------|------------|----------|
| `topic` (common) | (required) Topic name. | —  | String |


*Query parameters*

| **Name** | **Description** | **Default** | **Type** |
|----------|---------------|------------|----------|
| `brokerUrl` (common) | The MQTT broker URL. | tcp://localhost:1883 | String |

### Example

The following flow publishes a message to a topic on an external broker without authentication and without using TLS through Integrations. The published message will be the payload sent to a REST endpoint.

<Steps>
<Step>
The flow starts with a POST request to the `/mqtt-01` endpoint with content in the body.
</Step>
<Step>
Then, it publishes to the MQTT broker:
 - Topic: `sensedia-01`
 - Broker: `test.mosquitto.org` on port `1883` (TCP protocol without encryption)
 - No authentication (public test broker)
 - The body content is published as a message to the topic.
</Step>
</Steps>

```yaml
 - from:
          uri: rest:post:/mqtt-01
          steps:
          - to:
              uri: "paho:sensedia-01"
              parameters:
                brokerUrl: tcp://test.mosquitto.org:1883 
```

![](https://creative-ball-51b3fc85c0.media.strapiapp.com/paho_connector_359860753b.png)

#### cURL

```
curl --location 'https://mqtt-01.a1b2c3d4e5.integrations-tst.sensedia-eng.com/mqtt-01' \
--header 'Content-Type: text/plain' \
--data 'Hello World'

```

#### Result

![](https://creative-ball-51b3fc85c0.media.strapiapp.com/paho_connector_result_abb698553b.png)

## Paho MQTT5

The [**Paho MQTT5**](https://camel.apache.org/components/4.10.x/paho-mqtt5-component.html) component enables integration of applications with MQTT protocol (version 5), offering advanced messaging features such as persistent sessions and flow control.

**URI Syntax**: `paho-mqtt5:topic`

### Main fields

*Path parameters*

| **Name** | **Description** | **Default** | **Type** |
|----------|---------------|------------|----------|
| `topic` (common) | (required) Topic name. | —  | String |


*Query parameters*

| **Name** | **Description** | **Default** | **Type** |
|----------|---------------|------------|----------|
| `brokerUrl` (common) | The MQTT broker URL. | tcp://localhost:1883 | String |


### Example

- The flow is identical to the flow described for the **Paho** component, with the difference that this one uses version 5 of the MQTT protocol.

```yaml
      - from:
          uri: rest:post:/mqtt-01
          steps:
          - to:
              uri: "paho-mqtt5:sensedia-01"
              parameters:
                brokerUrl: tcp://test.mosquitto.org:1883  
```

![](https://creative-ball-51b3fc85c0.media.strapiapp.com/paho5_connector_e2e3bdc332.png)

#### cURL

```
curl --location 'https://mqtt-01.a1b2c3d4e5.integrations-tst.sensedia-eng.com/mqtt-01' \
--header 'Content-Type: text/plain' \
--data 'Hello World'
```

#### Result

![](https://creative-ball-51b3fc85c0.media.strapiapp.com/paho5_connector_result_4bc7f9caae.png)
