1

I've been looking into Apache Camel and Kafka over the past two days in hopes of learning about messaging frameworks/brokers. Is a possible use case of Camel/Kafka using Kafka as the message broker while implementing the producers and consumers with Camel? I saw a brief example of something similar, but can't seem to find it again. If not, what is the point of the Camel:Kafka component?

5
  • 1
    Have you looked here camel.apache.org/kafka.html? Has examples of consuming and producing using Camel. Commented Jan 16, 2018 at 20:23
  • I have. Probably should have been more direct with my question. Is it that easy using Camel? I see going through the documentation of Kafka that the logic behind getting producers up and running with proper partitions alongside the consumers handling partitions with the logic behind rewinding can get pretty nasty. Is it really as easy as the examples they provide? Sorry if my questions are loaded, but the documentation behind the Kafka component isn't too informative to me. Commented Jan 16, 2018 at 20:31
  • Can you tell me what benefit will apache camel provide over writing our own producer and consumers? Commented Jan 17, 2018 at 14:59
  • Not sure if I'm the best one to be answering this, but I've done more research since when I asked this question. Camel adds more abstraction to handling middleware. Meaning you can focus less on how Kafka works. Pretty sure most systems could care less about the finer levels of middleware as long as it works as they intend it to. Also, it allows you to switch middleware out without too much hassle. You're basically hiding your middleware. Commented Jan 18, 2018 at 15:51
  • Start with understanding your delivery guarantee requirements - do you need exactly once, at least once, or at most once? Commented Jan 31, 2019 at 6:45

1 Answer 1

5

Yes Apache Camel makes using Kafka easier as it hides a bunch of the complexities, which is the main point about Camel components. However if you need to do something really advanced or be in control yourself then sometimes a Camel component may lack a functionality for that, or some hooks/apis you need, and if so people ask for that and we improve these components over time, to the communities requirements. And if you cannot wait/do that, then you do NOT have to use a Camel component and can use the Kafka API yourself directly - after all its all just Java.

There is also an Camel example here: https://github.com/apache/camel/tree/master/examples/camel-example-kafka.

And the Camel in Action 2nd edition book covers Camel with Kafka in its cluster chapter.

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

1 Comment

Hi has anyone consumed avro messages using this camel-example-kafka route? If so can you please help me with route configuration?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.