   [broker :- Broker message :- Message targets :- [p/Uri]]
   (when (:destination_report message)
     (let [report {:id (:id message)
-                  :targets targets}
-          reply (-> (message/make-message :targets [(:sender message)]
-                                          :message_type "http://puppetlabs.com/destination_report"
-                                          :in-reply-to (:id message)
-                                          :sender "pcp:///server")
-                    (message/set-expiry 3 :seconds)
-                    (message/set-json-data report))]
+                  :targets targets}]
       (s/validate p/DestinationReport report)
-      (accept-message-for-delivery broker (capsule/wrap reply)))))
+      (accept-message-for-delivery
+        broker
+        (-> (message/make-message :targets [(:sender message)]
+                                  :message_type "http://puppetlabs.com/destination_report"
+                                  :in-reply-to (:id message)
+                                  :sender "pcp:///server")
+            (message/set-json-data report)
+            (message/set-expiry 3 :seconds)
+            (capsule/wrap))))))
 
 ;; ActiveMQ queue consumers
 (s/defn deliver-message

          data (message/get-json-data message)]
      (s/validate p/InventoryRequest data)
      (let [uris (doall (filter (partial get-websocket broker) ((:find-clients broker) (:query data))))
            response-data {:uris uris}
            response (-> (message/make-message :message_type "http://puppetlabs.com/inventory_response"
                                               :targets [(:sender message)]
                                               :in-reply-to (:id message)
                                               :sender "pcp:///server")
                         (message/set-expiry 3 :seconds)
                         (message/set-json-data response-data))]
        (s/validate p/InventoryResponse response-data)
        (accept-message-for-delivery broker (capsule/wrap response)))))
  connection)

(s/defn process-server-message :- Connection

                                           :targets [sender]
                                           :sender "pcp:///server"
                                           :in-reply-to in-reply-to)
                     (message/set-json-data response_data)
                     (message/set-expiry 3 :seconds))]
    response))

(s/defn process-expired-message :- Capsule
