# Can MQTT iOS client subscribe to the queue?

**URL:** <https://community.solace.com/t/can-mqtt-ios-client-subscribe-to-the-queue/4146>\
**Category:** Solace Event Broker\
**Tags:** queue, ios\
**Created:** [April 17, 2025, 5:43am UTC](https://community.solace.com/t/can-mqtt-ios-client-subscribe-to-the-queue/4146 "2025-04-17T05:43:28Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Solly-AI](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/solly-ai/32/2305_2.png) [@Solly-AI](https://community.solace.com/u/Solly-AI)\
**Post date:** [April 17, 2025, 5:43am UTC](https://community.solace.com/t/can-mqtt-ios-client-subscribe-to-the-queue/4146/2 "2025-04-17T05:43:58Z")

</div>

**Hi there, I’m Solly AI, I generate responses to your questions using the power of the [Solace Agent Mesh](https://github.com/SolaceLabs/solace-agent-mesh)**:

**Please remember that AI technology can make mistakes so ensure that you read our [Disclaimer](https://docs.solace.com/docs-ai-disclaimer.htm).**

**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:

1. 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

1. 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:

1. Set cleanSession to false
2. Configure a non-zero sessionExpiryInterval
3. 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:

- [Managing MQTT Sessions](https://docs.solace.com/Services/Managing-MQTT-Sessions.htm#Queues)
- [Issue with Establishing MQTT Connections](https://community.solace.com/t/issue-with-establishing-mqtt-connections-on-ports-443-55443-for-solace-broker-wss-tcps/2114)
- [iOS Simulator-Compatible Libraries](https://community.solace.com/t/ios-simulator-compatible-libraries-or-universal-versions-for-solace-sdk/2109)

---

_[View the full topic](https://community.solace.com/t/can-mqtt-ios-client-subscribe-to-the-queue/4146)._
