You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by GitBox <gi...@apache.org> on 2019/12/09 09:49:20 UTC

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

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:
users@infra.apache.org


With regards,
Apache Git Services