Closed baljakbratislav closed 3 years ago
Hello @baljakbratislav
Could you please give the code snippet you are using to initialize the IoT client and make the subscribe call? That will help us identify the issue and reproduce it on our side.
Thanks, Rohan
Of course I can:
This is code for initialization
if let socketProtocol = socket?.socketProtocol, let host = socket?.host, let identityPoolId = socket?.identityPoolId {
let endpoint = socketProtocol + "://" + host
let iotEndPoint = AWSEndpoint(urlString: endpoint)
let credentialProvider = AWSCognitoCredentialsProvider(regionType: .EUWest1, identityPoolId: identityPoolId)
let configuration = AWSServiceConfiguration(region: .EUWest1, endpoint: iotEndPoint, credentialsProvider: credentialProvider)
if let config = configuration {
AWSIoTDataManager.register(with: config, forKey: "EUWest1IoTDataManager")
AWSServiceManager.default()?.defaultServiceConfiguration = configuration
let iotDataManager = AWSIoTDataManager.init(forKey: "EUWest1IoTDataManager")
return iotDataManager
}
}
This is for connection
iotDataManager?.connectUsingWebSocket(withClientId: UUID().uuidString, cleanSession: true) { [weak self] (status) in
And last but not the least: for subscription
iotDataManager?.subscribe(toTopic: "topic", qoS: .messageDeliveryAttemptedAtLeastOnce) { [weak self] (message) in
If you have any more questions, feel free to ping me. @rohandubal
This issue is stale because it has been open for 14 days with no activity. Please, provide an update or it will be automatically closed in 7 days.
This issue is being automatically closed due to inactivity. If you believe it was closed by mistake, provide an update and re-open it.
Describe the bug
To Reproduce Steps to reproduce the behavior: Subscribe to "AA" topic. Unsubscribe to "AA" topic. Subscribe to "BB" topic.
Current behavior Receiving events from both topics: from "AA" and "BB"
Expected behavior Receiving events only from last topic: from "BB"
Environment(please complete the following information):
Device Information (please complete the following information):