[ 
https://issues.apache.org/jira/browse/CAMEL-12076?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16290629#comment-16290629
 ] 

ASF GitHub Bot commented on CAMEL-12076:
----------------------------------------

GitHub user dmvolod opened a pull request:

    https://github.com/apache/camel/pull/2147

    CAMEL-12076: Specified topic is ignored when KafkaConfiguration is used

    If topic property was not received from configuration or header parameters 
take it from the remaining URI. Also some minor code style fixes are applied.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/dmvolod/camel CAMEL-12076

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/camel/pull/2147.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2147
    
----
commit ed9d4d6fe5f4ccc9975c62b89a145beebf079ef2
Author: Dmitry Volodin <dmvo...@gmail.com>
Date:   2017-12-14T09:43:50Z

    CAMEL-12076: Specified topic is ignored when KafkaConfiguration is used

----


> 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
>
> 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)

Reply via email to