AntonFagerberg / rackla

Open Source API Gateway in Elixir

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rackla w/ Non HTTP API Target

lukegalea opened this issue · comments

I'm sure it's pretty trivial, but before I go down this path: Do you have any examples of using Rackla where the API services ("behind" Rackla) are not HTTP?

Ie: submitting a request via rabbitmq and waiting for a response?

Thanks in advance

I'm afraid I don't have any such examples, and I don't really have much practical experience with RabbitMQ. Rackla is (at least for now) kinda tightly coupled with HTTP in both directions.

What you can do is use a third party library to do the RabbitMQ request, convert the response to a Rackla type with Rackla.just. Then you can do any transformations and send http responses to the client.

It's a very manual approach and not very pretty but perhaps it's good enough.

At least for now, I don't have any time/plans to support RabbitMQ as an alternative to HTTP in Rackla.