duanasq opened a new issue #1268:
URL: https://github.com/apache/camel-kafka-connector/issues/1268
Hi I'm new to apache camel and I was getting the following error when trying
to run the kinesis sink connector on a kafka topic:
```
Caused by: java.lang.NullPointerException
at
org.apache.camel.component.aws2.kinesis.Kinesis2Producer.createRequest(Kinesis2Producer.java:56)
at
org.apache.camel.component.aws2.kinesis.Kinesis2Producer.process(Kinesis2Producer.java:41)
at
org.apache.camel.support.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:66)
at
org.apache.camel.processor.SendDynamicProcessor.lambda$process$0(SendDynamicProcessor.java:197)
at
org.apache.camel.support.cache.DefaultProducerCache.doInAsyncProducer(DefaultProducerCache.java:318)
at
org.apache.camel.processor.SendDynamicProcessor.process(SendDynamicProcessor.java:182)
```
I did some digging around and see it is related to [this
issue](https://github.com/apache/camel-kafka-connector/issues/1261).
I found [the excellent
tutorial](https://github.com/apache/camel-kafka-connector-examples/tree/main/aws2-kinesis/aws2-kinesis-sink)
that passes in headers when we write to a kafka topic, eg. ` echo "hello
there" | ./kafkacat -b localhost:9092 -H
"CamelHeader.CamelAwsKinesisPartitionKey=partition-1" -t mytopic` and indeed it
works if I do that.
I am guessing that these headers are needed for the internal routing in
Camel, but we absolutely won't have these headers on our kafka topics. I don't
know how and where to set these headers. Do I need to define a SMT or
something? I'm not sure where in the documentation I need to look to understand
this. Grateful for any pointers, thanks.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]