[GitHub] [camel-kafka-connector] oscerd opened a new issue #20: Allow the user to set the key of the SourceRecord explicitly

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [camel-kafka-connector] oscerd opened a new issue #20: Allow the user to set the key of the SourceRecord explicitly

GitBox
oscerd opened a new issue #20: Allow the user to set the key of the SourceRecord explicitly
URL: https://github.com/apache/camel-kafka-connector/issues/20
 
 
   Currently, when the messages being polled, via this method:
   ```
   SourceRecord record = new SourceRecord(sourcePartition, sourceOffset, topic, Schema.BYTES_SCHEMA, exchange.getMessage().getBody());
   ```
   We don't set the Key of the record in the `SourceRecord` constructor which could be dangerous to send these data downstream non-keyed, therefore to tackle this, I'd suggest to all the user to set the Key explicitly, let's see a key of the exchange is available as a header, the user will just supply the name of the header in order to key the record with.
   By default, I'd suggest to key the message by the `messageId` in case the user didn't set any configuration for the keys

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services