Skip to content

Commit 04daf77

Browse files
authored
Merge pull request #14 from Landoop/mqttSource
mqtt connector
2 parents e3c0300 + e100307 commit 04daf77

File tree

2 files changed

+172
-1
lines changed

2 files changed

+172
-1
lines changed

src/assets/icons/mqtt.png

18.9 KB
Loading

src/supported-connectors.js

Lines changed: 172 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2187,7 +2187,7 @@ var supportedConnectorsTemplates = [{
21872187
name: "jdbc",
21882188
icon: "jdbc.png",
21892189
class: "io.confluent.connect.jdbc.JdbcSourceConnector",
2190-
description: "The HDFS sink connector allows you to write data from a Kafka topic into HDFS",
2190+
description: "The jdbc source connector allows you to write data from a Kafka topic into HDFS",
21912191
type: "Source",
21922192
uiEnabled: true,
21932193
color: "#b1b1b1",
@@ -2268,6 +2268,177 @@ var supportedConnectorsTemplates = [{
22682268
}]
22692269
}] //end of sections
22702270
}]
2271+
},
2272+
{
2273+
name: "mqtt",
2274+
icon: "mqtt.png",
2275+
class: "com.datamountaineer.streamreactor.connect.mqtt.source.MqttSourceConnector",
2276+
description: "The MQTT source connector allows you to read from MQTT and stream data into a kafka topic",
2277+
type: "Source",
2278+
uiEnabled: true,
2279+
color: "#5B346C",
2280+
template: [{
2281+
step: "Basic Info",
2282+
id: "step1",
2283+
sections: [{
2284+
section: "Basic connector information",
2285+
elements: [{
2286+
key: 'name',
2287+
value: 'test-mqtt-source',
2288+
label: 'Connector Name',
2289+
tooltip: ' The (unique) connector name',
2290+
type: 'text',
2291+
placeholder: 'ie.test-mqtt-source',
2292+
required: true,
2293+
flex: "100",
2294+
errorMessage: "Connector Name is required field and must be unique"
2295+
}, {
2296+
key: 'connect.mqtt.hosts',
2297+
value: 'localhost:9595',
2298+
element: 'input',
2299+
label: 'Mqtt connection endpoints',
2300+
tooltip: 'Contains the MQTT connection end points',
2301+
type: 'text',
2302+
required: true,
2303+
errorMessage: "Must use a host",
2304+
flex: "50"
2305+
}, {
2306+
key: 'connect.mqtt.user',
2307+
value: 'Username',
2308+
element: 'input',
2309+
label: 'Username',
2310+
tooltip: 'Contains the Mqtt connection user name',
2311+
type: 'text',
2312+
placeholder: 'i.e.Username',
2313+
required: true,
2314+
flex: "50",
2315+
errorMessage: "You need to select a username"
2316+
}, {
2317+
key: 'connect.mqtt.password',
2318+
value: 'passwrod',
2319+
element: 'input',
2320+
label: 'Password',
2321+
tooltip: 'Contains the Mqtt connection password',
2322+
type: 'password',
2323+
placeholder: 'ie.password',
2324+
required: true,
2325+
flex: "50"
2326+
}, {
2327+
key: 'connect.mqtt.service.quality',
2328+
value: '0',
2329+
element: 'input',
2330+
label: 'Mqtt quality of service',
2331+
tooltip: 'The Quality of Service (QoS) level is an agreement between sender and receiver of a message regarding the guarantees of delivering a message. There are 3 QoS levels in MQTT: 0 = At most once; 1 = At least once; 2 = Exactly once',
2332+
type: 'text',
2333+
placeholder: 'ie.0,1,2',
2334+
required: true,
2335+
flex: "50"
2336+
}, {
2337+
key: 'tasks.max',
2338+
value: 1,
2339+
element: 'input',
2340+
label: 'Max Tasks',
2341+
tooltip: 'The number of tasks the connector is allowed to start (max is 5)',
2342+
type: 'number',
2343+
max: 5,
2344+
min: 1,
2345+
required: true,
2346+
flex: 50,
2347+
errorMessage: "Max 5 tasks"
2348+
}, {
2349+
key: 'connector.class',
2350+
value: "com.datamountaineer.streamreactor.connect.mqtt.source.MqttSourceConnector",
2351+
type: 'hidden',
2352+
required: true,
2353+
flex: "100"
2354+
}]
2355+
}] //end of sections
2356+
},
2357+
{
2358+
step: "Advanced Options",
2359+
id: "step2",
2360+
sections: [{
2361+
section: "Advanced Configuration",
2362+
elements: [{
2363+
key: 'connect.mqtt.client.id',
2364+
value: 'dm_source_id',
2365+
label: 'Client id',
2366+
tooltip: 'Contains the Mqtt session client id.',
2367+
type: 'text',
2368+
placeholder: 'dm_source_id',
2369+
required: true,
2370+
flex: "100"
2371+
}, {
2372+
key: 'connect.mqtt.connection.timeout',
2373+
value: '1000',
2374+
label: 'Connection timeout',
2375+
tooltip: 'Provides the time interval to establish the mqtt connection.',
2376+
type: 'text',
2377+
placeholder: '1000',
2378+
required: false,
2379+
flex: "50"
2380+
}, {
2381+
key: 'connect.mqtt.connection.clean',
2382+
value: 'true',
2383+
label: 'Clean session',
2384+
tooltip: 'true / false',
2385+
placeholder: 'true / false',
2386+
required: false,
2387+
flex: "50"
2388+
},
2389+
{
2390+
key: 'connect.mqtt.source.kcql',
2391+
value: '',
2392+
label: 'KCQL',
2393+
tooltip: 'Contains the Kafka Connect Query Language describing the sourced MQTT source and the target Kafka topics',
2394+
type: 'text',
2395+
placeholder: 'INSERT INTO position-reports SELECT * FROM /ais',
2396+
errorMessage: "KCQL required",
2397+
required: false,
2398+
flex: "100"
2399+
}, {
2400+
key: 'connect.mqtt.connection.keep.alive',
2401+
value: '',
2402+
label: 'Keep alive interval',
2403+
tooltip: 'The keep alive functionality assures that the connection is still open and both broker and client are connected to one another. Therefore the client specifies a time interval in seconds and communicates it to the broker during the establishment of the connection. The interval is the longest possible period of time, which broker and client can endure without sending a message.',
2404+
type: 'text',
2405+
placeholder: '5000',
2406+
required: false,
2407+
flex: "50"
2408+
}, {
2409+
key: 'connect.mqtt.connection.ssl.ca.cert',
2410+
value: '',
2411+
label: 'CA certificate file path',
2412+
tooltip: 'Provides the path to the CA certificate file to use with the Mqtt connection',
2413+
type: 'text',
2414+
placeholder: 'CA/certificate/path',
2415+
required: false,
2416+
flex: "50"
2417+
}, {
2418+
key: 'connect.mqtt.converter.throw.on.error',
2419+
value: '',
2420+
label: 'Throw error on conversion',
2421+
tooltip: 'If set to false the conversion exception will be swallowed and everything carries on BUT the message is lost!!; true will throw the exception.Default is false.',
2422+
type: 'text',
2423+
placeholder: 'throw',
2424+
required: false,
2425+
flex: "50"
2426+
}, {
2427+
key: 'connect.mqtt.source.converters',
2428+
value: '',
2429+
label: 'Converter class',
2430+
tooltip: 'Contains a tuple (Mqtt source topic and the canonical class name for the converter of a raw Mqtt message bytes to a SourceRecord).If the source topic is not matched it will default to the BytesConverter/i.e. $mqtt_source1=com.datamountaineer.streamreactor.connect.mqtt.source.converters.AvroConverter;$mqtt_source2=com.datamountaineer.streamreactor.connect.mqtt.source.converters.JsonConverter""".stripMargin',
2431+
type: 'text',
2432+
placeholder: 'com.datamountaineer.streamreactor.connect.converters.source.AvroConverter',
2433+
required: false,
2434+
flex: "50"
2435+
}]
2436+
}
2437+
2438+
2439+
2440+
] //end of sections
2441+
}]
22712442
}
22722443
];
22732444

0 commit comments

Comments
 (0)