-
Bug
-
Resolution: Obsolete
-
Minor
-
None
-
None
-
False
-
False
-
%
-
Undefined
-
appendChars isn't used when the file doesn't exist yet. My use-case would be that I wan't to append all messages from the topic into a single file delimited with some value, but the first message and second message are not separated.
connector config:
connector.class=org.apache.camel.kafkaconnector.file.CamelFileSinkConnector camel.sink.endpoint.fileExist=append tasks.max=1 topics=mytopic camel.sink.endpoint.appendChars=@@@ name=CamelFileSinkConnector value.converter=org.apache.kafka.connect.storage.StringConverter camel.sink.endpoint.fileName=output.txt key.converter=org.apache.kafka.connect.storage.StringConverter camel.sink.path.directoryName=/tmp/sink
Steps to reproduce:
0. ensure that /tmp/sink/output.txt doesn't exist yet
1. start ckc file connector:
$KAFKA_HOME/bin/connect-standalone.sh $KAFKA_HOME/config/connect-standalone.properties /tmp/connector.props
2. publish messages to mytopic before starting ckc file connector:
$KAFKA_HOME/bin/kafka-console-producer.sh --bootstrap-server localhost:9092 --topic mytopic >one >two >three >four >five
3. observe /tmp/sink/output.txt
onetwo@@@three@@@four@@@five@@@
The workaround would be to create file beforehand