# MQTT

MQTT is an OASIS standard messaging protocol for the Internet of Things (IoT). It is designed as an extremely lightweight publish/subscribe messaging transport that is ideal for connecting remote devices with a small code footprint and minimal network bandwidth. MQTT today is used in a wide variety of industries, such as automotive, manufacturing, telecommunications, oil and gas, etc.

Apica Ascent can act as an MQTT broker to receive MQTT messages from IoT clients.&#x20;

### **PRE-REQUISITE**

**In order to enable this integration, Fluent Bit to MQTT must first be in place.**&#x20;

Follow this link to set up the Fluent Bit integration:&#x20;

* <https://docs.apica.io/integrations/list-of-integrations/fluent-bit/enabling-iot-mqtt-input-paas>

### Sending MQTT messages to Apica Ascent

Once the pre-requisite is in place, Apica Ascent uses the 1883 port to receive MQTT messages. Connectivity can be tested using the following mosquitto\_pub command:

```
mosquitto_pub -h endpoint.ascenthost.com -p 1883 -t temperature -m '{"device_version": "v11", "temp": 92}'
```

Apica Ascent uses the incoming topic name from the messages to partition the data by default. This behavior is customizable.

![](https://2948796384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LmzGprckLqwd5v6bs6m%2Fuploads%2FS7vxAdMfLiEOs5ukdZgq%2Fmqtt.png?alt=media\&token=3918cd85-334a-4649-b816-8dcdeb7d0e99)

![Using Apica Ascent advanced expressions to Search Data](https://2948796384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LmzGprckLqwd5v6bs6m%2Fuploads%2FnX6iuWrqc59T4vJj85ah%2Fmqtt1.png?alt=media\&token=2adfd09e-abb5-4227-b963-50e0a9a2e5cc)

![Generate reports on the data](https://2948796384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LmzGprckLqwd5v6bs6m%2Fuploads%2FSZq0lm1i2j5bsbpRzwz9%2Fmqtt2.png?alt=media\&token=884cce8d-75ce-4ad3-84ef-eb43ca04db8d)
