            (or (service-event? message)
                (service-task-event? message))))
     (subscription [_ message]
-      (let [service-name (or (get-in message [:Actor :Attributes :com.docker.swarm.service.name])
-                             (get-in message [:Actor :Attributes :name]))
+      (let [service-name (service-name message)
             stack-name (du/hypothetical-stack service-name)]
         {:handler :stack-info
          :params  {:name stack-name}}))

     :tasks    tasks
     :networks networks}))

(defn- stack-info-data
  [service-event-message]
  (let [service-name (or (get-in service-event-message [:Actor :Attributes :com.docker.swarm.service.name])
                         (get-in service-event-message [:Actor :Attributes :name]))
        stack-name (du/hypothetical-stack service-name)]
    (api/stack stack-name)))


           (or (service-event? message)
               (service-task-event? message))))
    (subscription [_ message]
      {:handler :service-info
       :params  {:id (service-id message)}})
    (subscribed-data [_ message]
      (service-info-data message))))

