Integrating Tyk with RabbitMQ or any other message queue

Imported Google Group message. Original thread at: Redirecting to Google Groups Import Date: 2016-01-19 21:36:47 +0000.
Sender:Guneet Uppal.
Date:Thursday, 17 December 2015 13:26:07 UTC.

Hi,

I came across Tyk on Google while looking for an open source API gateway. I’ve been trying to find information if Tyk can be integrated with the likes of RabbitMQ or any other message queue. Any information will be useful.

Thanks

Imported Google Group message.
Sender:Martin Buhr.
Date:Thursday, 17 December 2015 13:38:38 UTC.

Hi Guneet,

Not yet, might consider putting it on the roadmap, what’s your use case?

Cheers,
Martin

  • show quoted text -

  • show quoted text -


You received this message because you are subscribed to the Google Groups “Tyk Community Support” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web, visit https://groups.google.com/d/msgid/tyk-community-support/eae444a9-ce33-47e8-ab2a-5d688292ba30%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Imported Google Group message.
Sender:Guneet Uppal.
Date:Thursday, 17 December 2015 14:00:39 UTC.

Hi Martin,

I have been following the pattern described in the following post

The API gateway communicates to the Services layer via a service bus instead of invoking the end point directly. Most of the time it will be a synchronous call, the API will publish a message on the queue and pass the response from the service to the client.

Also the following link API gateway pattern discusses the API gateway pattern currently in practice.

Cheers.
Gun

Imported Google Group message.
Sender:Martin Buhr.
Date:Thursday, 17 December 2015 14:24:43 UTC.

Just posting this here as I replied directly, but would love more input o how we’d tackle something like this with Tyk:

Interesting, it’s worth considering. I would expect the service bus has a REST API, that would keep things HTTP instead of having to switch out to another protocol?

Actually a protocol translator would be the way to go, it’s interesting NGinX mention Thrift for RPC but not protobufffs, I’m a big fan of the distributed queue-based infrastructure, it has it’s own complexities though.

How would the API Gateway provide a response to a client for a call that goes via an MQ and therefore has no immediate response? Does it keep the connection open and wait? There’s quite a lot of complexity there.

Imported Google Group message.
Sender:Guneet Uppal.
Date:Thursday, 17 December 2015 14:41:56 UTC.

The Service bus, for e.g. RabbitMQ uses the AMQP - https://www.amqp.org/. There is a client library in Go - GitHub - streadway/amqp: Go client for AMQP 0.9.1 to connect to RabbitMQ. The connection will be left open for timeout value specified by the user. Tyk client will post the message on the queue and wait for a response on the same queue or a different queue in case of Publish/Subscribe. The following link has samples on how Go can connect to RabbitMQ. Tutotial One and Two and maybe Three would be the relevant ones.

Imported Google Group message.
Sender:Martin Buhr.
Date:Thursday, 17 December 2015 14:46:05 UTC.

Thanks Guneet - I know RabbitMQ well (Tyk started it’s life as a distributed enterprise service bus before it became an API gateway), so this scenario makes sense. In the end it’s basically an open / reconfigurable client on the gateway end that moves payloads across protocols.

:slight_smile:

Cheers,
Maritn

Imported Google Group message.
Sender:Guneet Uppal.
Date:Thursday, 17 December 2015 14:47:38 UTC.

In addition this pattern can remove the burden of service discovery.

Imported Google Group message.
Sender:Guneet Uppal.
Date:Thursday, 17 December 2015 14:57:53 UTC.

Yes, I was reading the history of Tyk. This would save one hop, otherwise one would need to wire the endpoint to a Go client which in turn will manage the connection to RabbitMQ. This addition could give Tyk the edge ;).

Imported Google Group message.
Sender:Martin Buhr.
Date:Thursday, 17 December 2015 15:05:17 UTC.

It’s on the roadmap now :smiley:

Thanks again for the idea.

Cheers,
Martin

On Thu, Dec 17, 2015 at 6:57 AM -0800, “Guneet Uppal” [email protected] wrote:

Yes, I was reading the history of Tyk. This would save one hop, otherwise one would need to wire the endpoint to a Go client which in turn will manage the connection to RabbitMQ. This addition could give Tyk the edge ;).

You received this message because you are subscribed to the Google Groups “Tyk Community Support” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web, visit https://groups.google.com/d/msgid/tyk-community-support/88680f8e-e8fe-4b9c-a945-22407624c246%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Imported Google Group message.
Sender:Guneet Uppal.
Date:Thursday, 17 December 2015 15:10:06 UTC.

Your most welcome. I’ll be keeping an eye out on the roadmap for sure :slight_smile:

Cheers
Gun