- Run
docker run --rm -ti -p 5672:5672 -p 15672:15672 rabbitmq:3.6.5-management
- Fire up a Clojure REPL w/ langohr available
(require '[langohr.core :as rmq])
(def rconn (rmq/connect))
(require '[langohr.channel :as lch])
(def rch (lch/open rconn))
(require '[langohr.queue :as lq])
(lq/declare rch "foo.bar" {:exclusive false :auto-delete false :durable true})
(require '[langohr.consumers :as lcons])
(lcons/subscribe rch "foo.bar" (fn [_ _ ^bytes m] (println (String. m "UTF-8"))) {:auto-ack true})
- Go to http://localhost:15672/ in a web browser
- Click on Queues
- Click on the foo.bar queue
- Expand the Consumers section
- Verify that "Prefetch count" is zero in the initial table
- Click on the consumer
- Verify that "Prefetch count" is zero everywhere on that page too
(require '[langohr.basic :as lb])
(lb/qos rch 12)
- Go back to foo.bar queue page in RabbitMQ management UI
- Refresh the page and verify that "Prefetch count" is still 0 there
- Click on the consumer again and verify that "Prefetch count" is now 12 in the upper "Details" section but still 0 in the Consumers table
- Declare another channel & queue but set qos before subscribing
(def rch' (lch/open rconn))
(lq/declare rch' "baz.qux" {:exclusive false :auto-delete false :durable true})
(lb/qos rch' 15)
(lcons/subscribe rch' "baz.qux" (fn [_ _ ^bytes m] (println (String. m "UTF-8"))) {:auto-ack true})
- Click into the baz.qux queue in the RabbitMQ management UI
- Verify that the "Prefetch count" in the consumers table is 15
- Click on the consumer and verify that the same Details -> Prefetch count value is 15 here too but the consumers table also now shows 15
Last active
December 15, 2016 21:18
-
-
Save cap10morgan/cb6e2567cd330a11e1424ed2cbe52dd8 to your computer and use it in GitHub Desktop.
Steps to reproduce RabbitMQ qos admin UI bug
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment