 (def default-config
   {;; :c :connection-redundancy
    :connection-redundancy 2 ;; Emperically determined by [1]
+   :message-dup-drop-after 10 ;; Empirically determined by [1]
    :logging (assoc timbre/*config*
                    :level :debug)
    }

(defn read-mail
  "Take a 'destination-node and a 'message.

  Process the message for 'destination-node and return a tuple of:
  [new-destination-node [new-message ...]]"
  [logging-config destination-node [message-type message-body]]
  {:post [(vector? %) (-> % first map?) (-> % second vector?)]}
  (timbre/log* logging-config :trace
               :read-mail
               :destination-node destination-node
               :message-type message-type
               :message-body message-body)
  (condp = message-type
    :forwarded-subscription (handle-forwarded-subscription logging-config
                                                           destination-node
                                                           message-body)
    (println :read-mail "Unknown message type (" message-type "): " message-body)))

(defn do-comm
  "Take 'world. Process one message. Return new 'world."

      (rand-nth* (seq downstream))
      :forwarded-subscription
      subscription
      envelope-id]]))

(defn handle-add-upstream
  "Take a node (?) and a new upstream 'id, and add the upstream node to this node's :upstream."
