           resmsgs (if abort?
                     evmsgs
                     (concat evmsgs (->> (goto-next-and-transform transs [msg])
-                                        (map inc-route-count))))]
+                                        (map inc-transition-count))))]
       (debug "routing ending with" (mapv printable-msg resmsgs))
       resmsgs)
-    (do (warn "dropping message due to high route-count")
+    (do (warn "dropping message due to high transition-count")
         [])))
 
 

            [ow.starbuck.core :refer [defcomponentrecord] :as oc]))

(defn- printable-msg [msg]
  (select-keys msg #{:route :comp :starbuck/route-count}))

(defn- inc-route-count [msg]
  (update msg :starbuck/route-count
          #(inc (or % 0))))

(defn- next->fns [m]

                       :ch-in ch-in
                       :ch-out ch-out
                       :ruleset ruleset}))



(comment

  (def ruleset1
    ;;; you can have many routes
    {:routes

     ;;; defining a route :book-flight
     {:book-flight

      ;;; routes define transitions from one "component" to other "component(s)"
      {:transitions {nil :auth-checker

                     :auth-checker {:next :overbooked-checker}

                     :overbooked-checker {:next (fn [msg] :booker)}

                     :booker {:transform (fn [msg] (assoc msg :checked true))
                              :next [:invoice-generator (fn [msg] :notifier)]}}}}})

  )
