     /// Initializer
     /// - Parameter credentials: account credentials
     public init(withCredentials credentials: MXCredentials) {
+        processingQueue = DispatchQueue(label: "MXBackgroundSyncServiceQueue-" + MXTools.generateSecret())
         self.credentials = credentials
         syncResponseStore = MXSyncResponseFileStore()
         syncResponseStore.open(withCredentials: credentials)
         restClient = MXRestClient(credentials: credentials, unrecognizedCertificateHandler: nil)
+        restClient.completionQueue = processingQueue
         store = MXBackgroundStore(withCredentials: credentials)
         store.open(with: credentials, onComplete: nil, failure: nil)
         if MXRealmCryptoStore.hasData(for: credentials) {

        static let syncRequestPresence: String = "offline"
    }
    
    private let credentials: MXCredentials
    private let syncResponseStore: MXSyncResponseStore
    private let store: MXStore

                
                if let event = self.syncResponseStore.event(withEventId: eventId, inRoom: roomId), !self.canDecryptEvent(event) {
                    //  we got the event but not the keys to decrypt it. continue to sync
                    self.launchBackgroundSync(forEventId: eventId, roomId: roomId, completion: completion)
                } else {
                    //  do not allow to sync anymore
                    self._event(withEventId: eventId, inRoom: roomId, allowSync: false, completion: completion)
                }
            case .failure(let error):
                guard let _ = self else {
