fix: Update encoding for structured event (#384)

Signed-off-by: Paul Strachan <paul.strachan@det.nsw.edu.au>
This commit is contained in:
shnplr 2021-05-03 17:39:48 +10:00 committed by GitHub
parent 7f355d10c1
commit 0a1a03db64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ public class SampleProducer {
// Configure the CloudEventSerializer to emit events as json structured events
props.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, CloudEventSerializer.class);
props.put(CloudEventSerializer.ENCODING_CONFIG, Encoding.BINARY);
props.put(CloudEventSerializer.ENCODING_CONFIG, Encoding.STRUCTURED);
props.put(CloudEventSerializer.EVENT_FORMAT_CONFIG, JsonFormat.CONTENT_TYPE);
// Create the KafkaProducer