Using RabbitMQ with Swift on Linux (and REST APIs in general)

Unfortunately, the current RabbitMQ-Client for Swift does not run on Linux. In another thread the idea of using the Python bridge was mentioned — @Karl, since you mentioned it in the other thread: do you see this as a sensible idea, do you even have some code to share? Thanks.

General question: What are other people using as a „message broker“ analogous to RabbitMQ or Apache Kafka (there is also no Kafka client as far as I know) with Swift, what are the thoughts of members of the server work group on this? Would a RabbitMQ client for Swift running on Linux be an important thing, and how hard would it be to get it running on Linux? BTW what about using Smoke as a basis for implementing a REST API, has someone experiences to share?

I believe it was confirmed somewhere that Apple are using Swift on production servers

To the Apple folks: Would be interesting if you would share some information about it.

Without having looked into it myself, you might be able to use the MQTT plugin MQTT Plugin — RabbitMQ with mqtt-nio GitHub - sroebert/mqtt-nio: Non-blocking, event-driven Swift client for MQTT (3.1.1 and 5.0).

1 Like

There are currently 3 packages listed on the Swift Package Index that support linux, perhaps one of those alternatives work for you?

Edit: fixed link

1 Like

Huh. For some reason the link is broken for me (Safari). The link is using form-encoding (using a + to represent a space), but then the forum software percent-encodes it, so the search field ends up containing a literal "+" rather than a space. What's weird is that I'm literally working on an API for this right now, and this kind of mix-up is what I'm trying to help prevent.

Anyway, here's a fixed link:

As for the topic question: I don't know what the current state of the art is. I'd advise checking out the packages mentioned by the previous commenters.

Oops, thanks a lot for spotting that, Karl! Not sure how exactly I messed that up :slight_smile:

(It's not your mistake - the forum software just incorrectly encodes the URL used by the SPI site. It does the same for me by default :slight_smile:)

1 Like

Thank you all for your suggestions. I will discuss the issue with another partner who is working on a project with me, and we will certainly come to a solution. I will then post about it here.