         dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)) {
             mosquitto_connect(mosquittoContext.mosquittoHandler, host.cCharArray, port, keepAlive)
             mosquitto_loop_start(mosquittoContext.mosquittoHandler)
-            mqttClient.operationQueue.suspended = false
+            mqttClient.serialQueue.suspended = false
         }
         
         return mqttClient
     }
 
-    private class func onConnectAdapter(callback: ((ReturnCode) -> Void)!) -> ((returnCode: Int) -> Void)! {
+    private class func onConnectAdapter(callback: ((ReturnCode) -> ())!) -> ((returnCode: Int) -> ())! {
         return callback == nil ? nil : { (rawReturnCode: Int) in
             let returnCode = rawReturnCode < ReturnCode.Unknown.rawValue ? ReturnCode(rawValue: rawReturnCode) : ReturnCode.Unknown
             callback(returnCode!)
         }
     }
 
-    private class func onDisconnectAdapter(callback: ((ReasonCode) -> Void)!) -> ((reasonCode: Int) -> Void)! {
+    private class func onDisconnectAdapter(callback: ((ReasonCode) -> ())!) -> ((reasonCode: Int) -> ())! {
         return callback == nil ? nil : { (rawReasonCode: Int) in
             let reasonCode = rawReasonCode < ReasonCode.Unexpected.rawValue ? ReasonCode(rawValue: rawReasonCode) : ReasonCode.Unexpected
             callback(reasonCode!)
         }
     }
 
-    private class func onMessageAdapter(callback: ((MQTTMessage) -> Void)!) -> ((UnsafePointer<mosquitto_message>) -> Void)! {
+    private class func onMessageAdapter(callback: ((MQTTMessage) -> ())!) -> ((UnsafePointer<mosquitto_message>) -> ())! {
         return callback == nil ? nil : { (rawMessage: UnsafePointer<mosquitto_message>) in
             let message = rawMessage.memory
             let topic = String.fromCString(message.topic)!

    public var mqttClientCert: MQTTClientCert?
    public var mqttTlsOpts: MQTTTlsOpts?
    
    public var onConnectCallback: ((returnCode: ReturnCode) -> Void)?
    public var onDisconnectCallback: ((reasonCode: ReasonCode) -> Void)!
    public var onPublishCallback: ((messageId: Int) -> Void)!
    public var onMessageCallback: ((mqttMessage: MQTTMessage) -> Void)!
    public var onSubscribeCallback: ((messageId: Int, grantedQos: Array<Int32>) -> Void)!
    public var onUnsubscribeCallback: ((messageId: Int) -> Void)!
    
    public init(clientId: String, host: String, port: Int32, keepAlive: Int32) {
        // MQTT client ID is restricted to 23 characters in the MQTT v3.1 spec

public final class __MosquittoContext {
    public var mosquittoHandler: COpaquePointer = COpaquePointer.null()
    public var isConnected: Bool = false
    public var onConnectCallback: ((returnCode: Int) -> ())!
    public var onDisconnectCallback: ((reasonCode: Int) -> ())!
    public var onPublishCallback: ((messageId: Int) -> ())!
    public var onMessageCallback: ((message: UnsafePointer<mosquitto_message>) -> ())!
    public var onSubscribeCallback: ((messageId: Int, qosCount: Int, grantedQos: UnsafePointer<Int32>) -> ())!
    public var onUnsubscribeCallback: ((messageId: Int) -> ())!
    public var keyfile_passwd: String = ""
    internal init(){}
}
