storm-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kashyap Mhaisekar <>
Subject Question on Acking
Date Tue, 29 Apr 2014 15:46:58 GMT
I have a strange problem my topology. I use KafkaSpout to read from a kafka
topic and i find that the topology stops consuming messages after a while,
without apparent reason.
I suspect this on acking.

I use BaseBasicBolt (due to auto acking capabilities) and what I do in bolt
is use a condition to emit tuples out.
My question is -
1. When I emit from an execute(...), does that mean acking happens
automatically here?
2. What if I dont emit all tuples? If I use a condition like the code
highlighted below, does it mean that acking does not happen when execute
method is not complete?
3. How do I ack from BasicOutputCollector? I mean, OutputCollector has
method *ack *used for acking while BasicOutputCollector has no such method.
What do I do to explicitly ack using BasicOutputCollector?
4. If I have a bolt that saves values to DB and does not emit anything,
will it cause an problem?


public void execute(Tuple tuple, BasicOutputCollector collector) {
            String sentence = tuple.getString(0);
            for(String word: sentence.split(" ")) {
                *if (word.equals("the"))* collector.emit(new Values(word));

Please help!


View raw message