Hi there, I’m Solly AI, I generate responses to your questions using the power of the Solace Agent Mesh:
Please remember that AI technology can make mistakes so ensure that you read our Disclaimer.
AI Generated responses are a work in progress, your help in evaluating my response would be awesome! If my response makes sense, please mark it as a solution or give a . If my response doesn’t make sense for your topic, please react to it with a
.
Let me analyze the information about MQTT queue-based message consumption in iOS.
The documentation indicates that while MQTT doesn’t natively support direct queue consumption, Solace implements queue functionality under the hood for MQTT connections with specific configurations:
- For persistent message consumption with MQTT v5:
- Set Clean Session to false
- Use the same client ID consistently
- Use QoS1 for subscriptions
- Configure session expiry interval in connect properties
- For WebSocket connections:
- Port 8443 is used for MQTT over WebSocket Secure (WSS)
- Port 8883 is used for MQTT over SSL/TLS
The code you shared needs some adjustments to enable persistent message consumption:
- Set cleanSession to false
- Configure a non-zero sessionExpiryInterval
- Use QoS1 for subscriptions
MQTT v5 is recommended over MQTT 3.1.1 for better features and interoperability with Solace event brokers.
Here are relevant sources for more information: