---
title: "Client.reconnect() | Grafana k6 documentation"
description: "Reconnect to the MQTT broker"
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# Client.reconnect()

Attempts to reconnect to the MQTT broker using the same connection parameters as the last successful connection.

## Signature

JavaScript ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```javascript
client.reconnect()
```
