 
   func publish(message: Message) -> Promise<Message, HomeClientError> {
     let publish = PromiseSource<Message, HomeClientError>()
-    mqttSession.publishData(message.payload, onTopic: message.topic, retain: message.retain, qos: message.mqttQos) { error in
+    mqttSession.publishData(message.payload, onTopic: message.topic, retain: message.retain, qos: message.mqttQos) { [weak self] error in
       if error != nil {
         publish.reject(HomeClientError(message: error.description))
       } else {
         print("published message '\(message.payloadString)' on topic '\(message.topic)'")
+        self?.currentObserver?.on(.Next(message))
         publish.resolve(message)
       }
     }

    let mqttTransport: MQTTCFSocketTransport
    let mqttSession: MQTTSession
    var delegate: MqttHomeDelegate? = nil

    mqttTransport = MQTTCFSocketTransport()
    mqttTransport.host = host

      }
    }

    mqttSession.connectAndWaitTimeout(10)

    return source.promise
  }
