         service-count (count key->service)
         rand-fn (fn [] (rand-int service-count))]
     (assert (>= service-count action-count))
-    (->Shotgun context
+    (->Shotgun action-count
+               context
                (if (= service-count action-count)
                  (fn []
                    key-service-tuples)

  (submit-action [this action-fn timeout-millis]
    (some (fn [[key service]]
            (let [f (service/submit-action service
                                        (partial action-fn (get context key))
                                        timeout-millis)]
              (if (identical? :rejected (:status f)) nil f)))
          (load-balancer-fn)))
  (submit-action-map [this key->fn timeout-millis]

  (:import (fault ServiceExecutor
                  MultipleWriterResilientPromise
                  ResilientPromise
                  ResilientAction RejectedActionException)
           (java.util ArrayList)))

(set! *warn-on-reflection* true)

