I'm having a similar issue. I am connecting to a AMQP queue and pulling messages off it in the spout, then using the bolt for nothing but acking. Monitoring my Rabbit cluster I see messages being delivered at a very high rate (about 50,000/s) but being acked a very slow rates (1,000/s max). I have the ack in the spout doing the call back to Rabbit's basicAck method. Parallelism is set to 32, with 16 workers and 32 ackers.
My spout is doing nothing but pulling a message off the queue in NextTuple and emitting it. My bolt is doing nothing calling ack!:
(ack [id]
(. @channel basicAck id false))
(defbolt ack-message []
[tuple collector]
(ack! collector tuple))
If I change the call to basicAck to be inside NextTuple itself (right before it emits), the ack rate in Rabbit jumps to about equal to the delivery rate. So something is delaying the call to ack on the spout, but I have no idea what. Debugging is turned off, there are plenty of acker threads and I'm not timing out messages until after 90 seconds.
If I run local (with p 12, 1 worker and 1 acker), the delivery rate and are about the same, maybe 20,000/s, so overall running locally on my workstation with 12 threads is actually a LOT faster than running on the production cluster.
Is there some configuration setting that we're both missing that is causing the ack to work much better locally? Here is my topology:
(defn mk-topology []
(topology
{"1" (spout-spec rabbit-consumer-spout :p 32)}
{"2" (bolt-spec {"1" :shuffle}
ack-message :p 32)}))
The setup to the local call:
(defn run-local! []
(with-local-cluster [cluster]
(submit-local-topology (:nimbus cluster)
"rabbit-spout"
{TOPOLOGY-WORKERS 1
TOPOLOGY-DEBUG false
TOPOLOGY-ACKERS 1}
(mk-topology))
(Thread/sleep (* 1 60000))))
Main
(defn -main [name]
(StormSubmitter/submitTopology
name
{TOPOLOGY-WORKERS 16
TOPOLOGY-DEBUG false
TOPOLOGY-ACKERS 32
TOPOLOGY-MESSAGE-TIMEOUT-SECS 90}
(mk-topology)))
I can give a lot more information/code/data if needed.