orpiske commented on issue #1211:
URL: 
https://github.com/apache/camel-kafka-connector/issues/1211#issuecomment-861282320


   > I have used CamelFileSInk connector in one of our project and I would like 
to write each messages that is being read from a Kafka topic by the connector 
into a new file, meaning each message should be written in new file. I went 
thru the configuration document and couldn't find much information to achieve 
my requirement. Could you please let me know if this can be achieved if yes 
then which configurations to tune?
   
   Hi, have you tried setting the `CamelHeader.CamelFileName` header for each 
message produced on you Kafka endpoint? For example, suppose you have 2 
messages "a" and "b". For each of those, you set a different header with a 
different file name. 
   
   Here's one example of how it do it for the AWS S3 component: 
https://github.com/apache/camel-kafka-connector/blob/main/tests/itests-aws-v2/src/test/java/org/apache/camel/kafkaconnector/aws/v2/s3/sink/CamelSinkAWSS3ITCase.java#L74.
 It's a different component, but the approach should be similar. 
   


-- 
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:
[email protected]


Reply via email to