You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you want to run Kafka Connect in distributed mode, you can do the following REST call without creating a property file (only possible when Connect is running):
56
+
We use Kafka Connect in distributed mode via REST call (only possible when Connect is running):
59
57
60
58
curl -s -X POST -H 'Content-Type: application/json' http://localhost:8083/connectors -d '{
61
59
"name" : "mqtt-source",
@@ -68,20 +66,6 @@ If you want to run Kafka Connect in distributed mode, you can do the following R
68
66
}
69
67
}'
70
68
71
-
curl -s -X POST -H 'Content-Type: application/json' http://localhost:8083/connectors -d '{
Check if connector is loaded and status is 'RUNNING':
86
70
87
71
[source,bash]
@@ -96,7 +80,9 @@ confluent status connectors
96
80
confluent status mqtt-source
97
81
----
98
82
99
-
Create a Kafka Topic for consuming the MQTT messages via the MQTT Connector (needs to be the same as in the Connector Config):
83
+
As alternative to a HTTP call, you could also configure a property file for standalone mode. However, as REST can also be used for one single instance (in distributed mode), I always use this option to configure Kafka Connect.
84
+
85
+
Next, create a Kafka Topic for consuming the MQTT messages via the MQTT Connector (needs to be the same as in the Connector Config):
100
86
101
87
TODO:
102
88
There was a bug in MQTT Connector. If topic `mqtt.temperature` does not receive any messages, the mapping does not work and always use the default value `mqtt.`. Then use `mqtt.` for topic creation AND the kafka-consumer below instead!
0 commit comments