Hi,
I just started with Apache Kafka and wrote a high level consumer program
following the example given here
https://cwiki.apache.org/confluence/display/KAFKA/Consumer+Group+Example.
Though, I was able to run the program and consume the messages, I have one
doubt regarding *consumer.shutdown()*.
= writeToDB();
> }
> consumer.commit();
> }
>
> For your multiple topic case, if they are totally isolated (i.e. their
> corresponding updates to DB does not interfere with each other), then you
> can have 5 jvm processes each consumer one topic.
>
>
> On Mon, Aug
will make all other threads come to halt. Isn't it better to
have 5 java processes for each topic?
Regards
Anand
On Mon, Aug 4, 2014 at 12:31 PM, anand jain wrote:
> Thanks Guozhang!!
>
> Below is the code for ite
t;
> You can use the high-level consumer and turn of auto.offset.commit, and do
> sth. like:
>
> message = consumer.iter.next();
> bool acked = false
> while (!acked) {
> process(message)
> acked = writeToDB();
> }
> consumer.commit()
>
>
> Guozhang
>
>
>
gt; topic partition.
>
> https://kafka.apache.org/documentation.html#compaction
>
>
> Kumar
>
>
> On Fri, Aug 1, 2014 at 4:02 PM, anand jain
> wrote:
>
> > I want to delete the message from a Kafka broker after consuming it(Java
> > consumer). How can I do that?
> >
>
I want to delete the message from a Kafka broker after consuming it(Java
consumer). How can I do that?
I am very much new to Kafka and we are using Kafka 0.8.1.
What I need to do is to consume a message from topic. For that, I will have
to write one consumer in Java which will consume a message from topic and
then save that message to database. After a message is saved, some
acknowledgement will be