Skip to content

Commit f853d25

Browse files
Update byte manipulation example
- Generate example data for byte manipulation example - Have byte manipulation example read from alternative topic
1 parent e4d0fdd commit f853d25

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

examples/00-example-generate-sensordata.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,13 @@ producers:
4444
topic: ksml_sensordata_avro
4545
keyType: string
4646
valueType: avro:SensorData
47+
48+
# The following producer generates messages for 12-example-byte-manipulation.yaml. Enable this producer if you
49+
# want to run that specific example.
50+
sensordata_avro_producer_binary:
51+
generator: generate_sensordata_message
52+
interval: 3s
53+
to:
54+
topic: ksml_sensordata_avro_binary
55+
keyType: string
56+
valueType: avro:SensorData

examples/12-example-byte-manipulation.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
# message contains a schema id that is not locally recognized. By changing bytes 1-4 in the value,
99
# one can override the schema id for further downstream processing.
1010

11-
# Yes, this is hacky, but it may serve a purpose for cases where binary copies are made from
12-
# remote Kafka clusters that contain conflicting schema ids.
11+
# Yes, this is hacky, but it may serve a purpose for cases where binary message copies are made from
12+
# remote Kafka clusters with their own (possibly conflicting) schema ids.
1313

1414
streams:
15-
sensor_source:
16-
topic: ksml_sensordata_avro
15+
sensor_binary_source:
16+
topic: ksml_sensordata_avro_binary
1717
keyType: string
1818
valueType: bytes
1919
offsetResetPolicy: latest
@@ -44,7 +44,7 @@ functions:
4444

4545
pipelines:
4646
main:
47-
from: sensor_source
47+
from: sensor_binary_source
4848
via:
4949
- type: peek
5050
forEach:

0 commit comments

Comments
 (0)