> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Native MQTT device topics

> Mount a device telemetry intake and command publisher using MQTT 5 topic presets.

Import `iotMqttReceiver` and `iotMqttTopics` from `@bijectionhq/app-streams`. Use the [native MQTT mounting pattern](https://docs.bijection.com/integrations/native-mqtt.md), and call `source.initialize({ mode: "iot" })`. The preset gives one exact telemetry intake topic and command publication topic for a named device.

```ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
import { iotMqttTopics } from "@bijectionhq/app-streams";

const selectors = iotMqttTopics("pump-7");
// topic = devices/pump-7/telemetry
// publishTopic = devices/pump-7/commands
```

Include these selectors in the sealed MQTT credential with `username`, `password`, a dedicated persistent `clientId`, and the installed `epoch`. Producers supply a unique `bijection-id` for every telemetry event. The cursor keeps the last landed event for QoS 1 acknowledgement after commit. The mount retains each payload as a File of up to 24 KiB at the app's `data` label. Acknowledgement and later telemetry leave the earlier Files intact.

Queue a command on `<mount>.socket.outgoing.publish` with a unique `id`, canonical base64 `data` and `key: null`. The topic preset routes it to that device's command topic. The broker's PUBACK is transport evidence. Device application requires separate device evidence.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.