Need both camel-kafka-starter & camel-kafka in Spring Boot app?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Need both camel-kafka-starter & camel-kafka in Spring Boot app?

Ron Cecchini
Does it make sense that I would need both camel-kafka-starter and camel-kafka in my Camel 3.0 / Spring Boot 2.2.1 app?

I thought the *-starter would be enough, but without the camel-kafka dependency my Kafka consumer throws a:

java.lang.NoClassDefFoundError: org/apache/kafka/clients/consumer/ConsumerRebalanceListener

FWIW, my component config is pretty bare bones:

from("kafka:{{kafka.topic.in}}?brokers={{kafka.brokers}}").log("got: ${body}");

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Need both camel-kafka-starter & camel-kafka in Spring Boot app?

Claus Ibsen-2
Hi

The camel-kafka-starter depends on camel-kafka that ought to bring in
the needed JARs.

On Fri, Jan 10, 2020 at 7:44 PM Ron Cecchini <[hidden email]> wrote:

>
> Does it make sense that I would need both camel-kafka-starter and camel-kafka in my Camel 3.0 / Spring Boot 2.2.1 app?
>
> I thought the *-starter would be enough, but without the camel-kafka dependency my Kafka consumer throws a:
>
> java.lang.NoClassDefFoundError: org/apache/kafka/clients/consumer/ConsumerRebalanceListener
>
> FWIW, my component config is pretty bare bones:
>
> from("kafka:{{kafka.topic.in}}?brokers={{kafka.brokers}}").log("got: ${body}");
>
> Thanks.



--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2
Reply | Threaded
Open this post in threaded view
|

Re: Need both camel-kafka-starter & camel-kafka in Spring Boot app?

Jan Bednář
Hi Ron,
You are right, kafka-clients dependency was accidentally excluded in
3.0.0 starter.

Guillaume fixed this in
https://github.com/apache/camel-spring-boot/commit/9e450be35ea192fd62cbae75a713b7bfb683a458#diff-c0a243e4756707820b8d462867a35c82

Dne 11.1.2020 v 9:20 Claus Ibsen napsal(a):

> Hi
>
> The camel-kafka-starter depends on camel-kafka that ought to bring in
> the needed JARs.
>
> On Fri, Jan 10, 2020 at 7:44 PM Ron Cecchini <[hidden email]> wrote:
>> Does it make sense that I would need both camel-kafka-starter and camel-kafka in my Camel 3.0 / Spring Boot 2.2.1 app?
>>
>> I thought the *-starter would be enough, but without the camel-kafka dependency my Kafka consumer throws a:
>>
>> java.lang.NoClassDefFoundError: org/apache/kafka/clients/consumer/ConsumerRebalanceListener
>>
>> FWIW, my component config is pretty bare bones:
>>
>> from("kafka:{{kafka.topic.in}}?brokers={{kafka.brokers}}").log("got: ${body}");
>>
>> Thanks.
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Need both camel-kafka-starter & camel-kafka in Spring Boot app?

Ron Cecchini
Thanks, Jan, for doing that bit of research.  I'll try to get in the habit of checking commits the next time something doesn't seem to be working the way it should.

I look forward to Camel 3.1 and the latest batch of fixes and optimizations!

(Funny side note: I saw Claus' blog post about the 3.1 log/string optimizations -- and a few days earlier I had been wondering (without digging into the Camel source...) what Camel did under the hood regarding building potentially expensive log strings.  I've been on too many projects where we had to convert all the "log.level(<big string>)" to "if ( log.isLevelEnabled() ) log.level(<big string>)" to prevent Java from allocating objects.)

Anyway, thanks again.

> On January 12, 2020 at 12:13 PM Jan Bednář <[hidden email]> wrote:
>
>
> Hi Ron,
> You are right, kafka-clients dependency was accidentally excluded in
> 3.0.0 starter.
>
> Guillaume fixed this in
> https://github.com/apache/camel-spring-boot/commit/9e450be35ea192fd62cbae75a713b7bfb683a458#diff-c0a243e4756707820b8d462867a35c82
>
> Dne 11.1.2020 v 9:20 Claus Ibsen napsal(a):
> > Hi
> >
> > The camel-kafka-starter depends on camel-kafka that ought to bring in
> > the needed JARs.
> >
> > On Fri, Jan 10, 2020 at 7:44 PM Ron Cecchini <[hidden email]> wrote:
> >> Does it make sense that I would need both camel-kafka-starter and camel-kafka in my Camel 3.0 / Spring Boot 2.2.1 app?
> >>
> >> I thought the *-starter would be enough, but without the camel-kafka dependency my Kafka consumer throws a:
> >>
> >> java.lang.NoClassDefFoundError: org/apache/kafka/clients/consumer/ConsumerRebalanceListener
> >>
> >> FWIW, my component config is pretty bare bones:
> >>
> >> from("kafka:{{kafka.topic.in}}?brokers={{kafka.brokers}}").log("got: ${body}");
> >>
> >> Thanks.
> >
> >
>