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

                                                    :targets [uri]
                                                    :in-reply-to id
                                                    :sender "pcp:///server")
                              (message/set-expiry 3 :seconds)
                              (message/set-json-data response))]
              (websockets-client/send! ws (encode message)))
            (if reason
              (do

  [broker :- Broker message :- Message targets :- [p/Uri]]
  (when (:destination_report message)
    (let [report {:id (:id message)
                  :targets targets}]
      (s/validate p/DestinationReport report)
      (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
