🎄 Happy Holidays! 🥳
Most of Solace is closed December 24–January 1 so our employees can spend time with their families. We will re-open Thursday, January 2, 2024. Please expect slower response times during this period and open a support ticket for anything needing immediate assistance.
Happy Holidays!
Please note: most of Solace is closed December 25–January 2, and will re-open Tuesday, January 3, 2023.
Solace + protobuf in iOS application
Hi everyone! I'm absolutely new in Solace, so I would you to help me: my app has to communicate with Solace using protobuf models. Can you help, what to start with?
Comments
-
Hi @Ivan_Suprynovich ! Welcome to the Solace Community 🎉 As a simple starter to get you up and going with the Soalce broker, you can use a standard messaging protocol, MQTT, to connect and then receive and send data to the broker. Here is an example on how to use SWIFT and MQTT https://www.cloudamqp.com/docs/swift_ios_mqtt.html; you can get your host and port from your Solace cloud console (or just use
localhost
if you are using a local docker image for the broker).Note that we also have a Native Solace IOS API that you can download from https://solace.com/downloads/ under the "Messaging APIs + Protocols" section. This is a wrapper around our C API that you can just include the headers in your swift app. The benefits to using this is you will have access to advanced Solace broker functionalities, however I think you would be good to get started with the MQTT library at first. The diagram on https://www.solace.dev/ will help in understanding the different supported protocols and translations that could happen in the broker.
Using a protobuf model will be as simple as serializing your data before you publish on the broker and deserializing it on the consuming end. Hope this helps!
1 -
Just to add to what @Tamimi has said - in Solace we don't touch the payload. Simply serialise your protobuf and create that as your message binary attachment. Similarly, on message reception, get the binary attachment and pass that to your protobuf deserialiser.
3