# How to set up MQTT Connector in an MSK environment

**URL:** https://ask.lenses.io/t/how-to-set-up-mqtt-connector-in-an-msk-environment/369
**Category:** Apache Kafka Connectors
**Tags:** kafka-connect
**Created:** [May 12, 2025, 1:51am UTC](https://ask.lenses.io/t/how-to-set-up-mqtt-connector-in-an-msk-environment/369 "2025-05-12T01:51:03Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Benjamin\_Baek](https://dub1.discourse-cdn.com/flex017/user_avatar/ask.lenses.io/benjamin_baek/32/176_2.png) [@Benjamin\_Baek](https://ask.lenses.io/u/Benjamin_Baek)
#### Post date: [May 12, 2025, 1:51am UTC](https://ask.lenses.io/t/how-to-set-up-mqtt-connector-in-an-msk-environment/369/1 "2025-05-12T01:51:03Z")

</div>

Hello.

When setting up the MQTT connector in my MSK environment, for some reason my setup is consistently failing to deploy.  
I must be missing something, but I don’t know what it is.

I need the ability to:

1. configure a Lenses mqtt connector to MSK
2. monitor via the Lenses UI installed on ECS or EC2.

I am currently having trouble progressing on #1.  
Below is the setup I have configured, and it hasn’t deployed for 30 minutes now without any errors.

```auto
{
  "connector.class": "io.lenses.streamreactor.connect.mqtt.source.MqttSourceConnector",
  "connect.mqtt.username": "tester",
  "tasks.max": "1",
  "name": "mqtt-source",
  "connect.mqtt.kcql": "INSERT INTO mqtt SELECT * FROM /mjson WITHCONVERTER=`io.lenses.streamreactor.connect.converters.source.JsonSimpleConverter`",
  "connect.mqtt.password": "my_password",
  "connect.mqtt.service.quality": "1",
  "connect.mqtt.client.id": "msk_source_id",
  "connect.mqtt.hosts": "tcp://my_external_test_host:1883"
}

```

For the MQTT server, deployment and access were verified as normal on the local and development servers.

---

<div class="post-metadata">

### Author: ![noeltoms](https://avatars.discourse-cdn.com/v4/letter/n/f19dbf/32.png) [@noeltoms](https://ask.lenses.io/u/noeltoms)
#### Post date: [May 11, 2026, 5:11pm UTC](https://ask.lenses.io/t/how-to-set-up-mqtt-connector-in-an-msk-environment/369/2 "2026-05-11T17:11:49Z")

</div>

If it isnt deployed yet, you may want to check the formatting of the Connector Config YAML file. If it has any of these errors, it wont even get deployed.
