@@ -103,6 +103,7 @@ abstract class AbstractSinkConfig : SinkConfig {
103
103
it.settings
104
104
}.toList()
105
105
}
106
+
106
107
override fun sinkElements (): Map <Topic , List <FloodplainSink >> {
107
108
return instantiateSinkConfig(this )
108
109
}
@@ -168,8 +169,8 @@ fun PartialStream.buffer(duration: Duration, maxSize: Int = 10000, inMemory: Boo
168
169
/* *
169
170
* Modifies the incoming message before passing it on.
170
171
* You can use it as a simple stateless transformation: Add constant values, remove fields or transform fields.
171
- * A 'set' is also required for more complicated combinations. Typically after a join you use a 'set' to merge the messages
172
- * from both sources.
172
+ * A 'set' is also required for more complicated combinations. Typically after a join you use a 'set' to merge
173
+ * the messages from both sources.
173
174
* The first message is the original message from the join, the second message the result from the 'secondary' source.
174
175
* The second message will be lost after this operation, so you need to append anything you want to keep from the inner
175
176
* source to the outer source here.
@@ -256,7 +257,12 @@ fun PartialStream.joinMulti(
256
257
addTransformer(Transformer (this .rootTopology, jrt, topologyContext))
257
258
}
258
259
259
- fun PartialStream.joinAttributes (withTopic : String , nameAttribute : String , valueAttribute : String , vararg keys : String ) {
260
+ fun PartialStream.joinAttributes (
261
+ withTopic : String ,
262
+ nameAttribute : String ,
263
+ valueAttribute : String ,
264
+ vararg keys : String
265
+ ) {
260
266
return joinAttributes(withTopic, nameAttribute, valueAttribute) { msg ->
261
267
keys.joinToString(ReplicationMessage .KEYSEPARATOR ) { msg[it].toString() }
262
268
}
@@ -295,6 +301,7 @@ fun PartialStream.joinAttributes(
295
301
}
296
302
}
297
303
}
304
+
298
305
/* *
299
306
* Group a source, using the key from the lambda. The messages will be unchanged,
300
307
* only the key will have the supplied key pre-pended.
@@ -306,8 +313,8 @@ fun PartialStream.group(key: (IMessage) -> String) {
306
313
}
307
314
308
315
/* *
309
- * Create sub source (without qualifying with tenant / deployment / gen)
310
- */
316
+ * Create sub source (without qualifying with tenant / deployment / gen)
317
+ */
311
318
fun PartialStream.from (topic : String , init : Source .() -> Unit = {}): Source {
312
319
return createSource(Topic .fromQualified(topic, rootTopology.topologyContext), rootTopology, init )
313
320
}
@@ -373,7 +380,8 @@ private fun existingDebeziumSource(topicSource: String, rootTopology: Stream, in
373
380
}
374
381
375
382
/* *
376
- * Creates a simple sink that will contain the result of the current transformation. Will not qualify with tenant / deployment
383
+ * Creates a simple sink that will contain the result of the current transformation.
384
+ * Will not qualify with tenant / deployment
377
385
*/
378
386
fun PartialStream.to (topic : String ): Transformer {
379
387
val sink = SinkTransformer (
@@ -472,6 +480,7 @@ fun PartialStream.scan(
472
480
fun PartialStream.createBlock (): Block {
473
481
return Block (rootTopology, topologyContext)
474
482
}
483
+
475
484
/* *
476
485
* Scan is effectively a 'reduce' operator (The 'scan' name is used in Rx, which means a reduce operator that emits a
477
486
* 'running aggregate' every time it consumes a message). A real reduce makes no sense in infinite streams
@@ -524,7 +533,12 @@ fun PartialStream.fork(vararg destinations: Block.() -> Unit): Transformer {
524
533
* with no further meaning within the framework, you can choose what meaning you want to attach. You can increment a
525
534
* number, use a sort of time stamp, or even a git commit.
526
535
*/
527
- fun stream (tenant : String? = null, deployment : String? = null, generation : String = "any", init : Stream .() -> Unit ): Stream {
536
+ fun stream (
537
+ tenant : String? = null,
538
+ deployment : String? = null,
539
+ generation : String = "any",
540
+ init : Stream .() -> Unit
541
+ ): Stream {
528
542
val topologyContext = TopologyContext .context(
529
543
Optional .ofNullable(tenant),
530
544
Optional .ofNullable(deployment),
0 commit comments