[
https://issues.apache.org/jira/browse/CAMEL-12076?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16290653#comment-16290653
]
ASF GitHub Bot commented on CAMEL-12076:
----------------------------------------
oscerd commented on issue #2147: CAMEL-12076: Specified topic is ignored when
KafkaConfiguration is used
URL: https://github.com/apache/camel/pull/2147#issuecomment-351666831
Thanks the PR has been merged on master. There was a little error on tests
compilation. Fixed now.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Camel Kafka producer: Specified topic is ignored ("No topic key set" error)
> when KafkaConfiguration is used
> -----------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-12076
> URL: https://issues.apache.org/jira/browse/CAMEL-12076
> Project: Camel
> Issue Type: Bug
> Components: camel-kafka
> Affects Versions: 2.20.1
> Reporter: Igor Lavrentjev
> Assignee: Dmitry Volodin
> Fix For: 2.21.0
>
>
> Specified topic is ignored ("No topic key set" error) when KafkaConfiguration
> is used. When topic is set inside KafkaConfiguration then no error occurs.
> <spring-boot.version>1.5.8.RELEASE</spring-boot.version>
> <camel.version>2.20.1</camel.version>
> {code}
> from("direct:sendToKafka")
> .setBody(constant("Message from Camel to Kafka"))
> .setHeader(KafkaConstants.KEY, constant("Camel"))
> .to("kafka:TESTTOPIC?configuration=#kafkaConfiguration");
> {code}
> {code}
> 2017-12-11 14:16:35.466 ERROR 12048 --- [ad #1 - WireTap] CamelRouter
> : Exchange[ExchangePattern: InOnly, BodyType: String,
> Body: Message from Camel to Kafka, CaughtExceptionType:
> org.apache.camel.CamelExchangeException, CaughtExcept
> ionMessage: No topic key set. Exchange[ID-5CG7383K6H00BA-1512994577303-0-3],
> StackTrace: org.apache.camel.CamelExchangeException: No topic key set.
> Exchange[ID-5CG7383K6H00BA-1512994577303-0-3]
> at
> org.apache.camel.component.kafka.KafkaProducer.createRecorder(KafkaProducer.java:149)
> at
> org.apache.camel.component.kafka.KafkaProducer.process(KafkaProducer.java:251)
> at
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148)
> at
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)
> at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:138)
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:101)
> at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
> at
> org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:62)
> at
> org.apache.camel.processor.SendDynamicProcessor$1.doInAsyncProducer(SendDynamicProcessor.java:132)
> at
> org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:445)
> at
> org.apache.camel.processor.SendDynamicProcessor.process(SendDynamicProcessor.java:127)
> at
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)
> at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
> at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:97)
> at
> org.apache.camel.processor.WireTapProcessor$1.call(WireTapProcessor.java:158)
> at
> org.apache.camel.processor.WireTapProcessor$1.call(WireTapProcessor.java:153)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> ]
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)