0

Please find below the code snippet:

properties file:

consumer.topic=FIRST,SECOND consumer.group=group1 

Route.java:

from("kafka:{{kafka.url}}?topic={{consumer.topic}}&groupId={{consumer.group}}&autoOffsetReset=earliest&consumersCount={{consumer.consumersCount}}") 

The topics FIRST and SECOND are being considered as a single topic instead of being considered as two different ones. Can someone please help me by explaining how should they be configured in the properties file to be resolved as two?

LOG:

KafkaTopic[FIRST,SECOND]] Error while fetching metadata with correlation id 2159 : {FIRST,SECOND=INVALID_TOPIC_EXCEPTION} 
2
  • 1
    What version of Camel do you use? And have you tried using a newer release Commented May 19, 2017 at 7:09
  • 1
    Camel Version : 2.17.0 JDK : 1.8 Commented May 22, 2017 at 23:25

1 Answer 1

4

This is not supported in Camel 2.17.0.

The multiple topics subscription has been introduced from Camel 2.17.1 onwards and Camel 2.18.x onwards.

Here is the commit related to this change on 2.17.x branch: https://github.com/apache/camel/commit/a8f32d4ec485419cd196988f0de938d6f9b3cc49

and here is the commit related to this change on 2.18.x branch: https://github.com/apache/camel/commit/d7fc67fa16d083e570650aa20c064d609b469641

You have to upgrade to Camel >=2.17.1 or 2.18.x

For completeness here is the issue on Camel JIRA https://issues.apache.org/jira/browse/CAMEL-9835

Sign up to request clarification or add additional context in comments.

1 Comment

:Thank you so much, i upgraded the version to 2.17.1 and it worked. I was concentrating more on 2.17 and ignored its child version. :)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.