# getTopicName API

Calculates the MQTT topic name for a message which should be sent.

---
Canonical: /handbook/api/variables/_purista_mqttbridge.getTopicName/
Source: mqttbridge/src/topic/getTopicName.impl.ts
Format: Markdown for agents
---

Calculates the MQTT topic name for a message which should be sent.

Package: `@purista/mqttbridge`

## Signature

```typescript
const getTopicName: GetTopicNameFn
```

## Notes

### param

the message to send

### returns

the MQTT topic
