Durable queue

45 views
Skip to first unread message

j...@emailline.net

unread,
May 30, 2017, 12:55:03 AM5/30/17
to grpc.io
Currently I'm using rabbitmq and I'd prefer standardizing on gRPC, but I don't have a mechanism to "send and forget" with durable delivery.

Is there a common practice on a using a durable queue in golang with gRPC?

- James

Doug Fawley

unread,
Jun 28, 2017, 12:49:42 PM6/28/17
to grpc.io, j...@emailline.net
gRPC itself is a transmission protocol, not a message queue/pubsub system.  You would need a database or other external service (like rabbitmq or redis) to store your unprocessed messages.

Common practice to do this in gRPC servers is to accept an RPC, publish/store the request, then return from the RPC and process the message asynchronously with background workers.  This makes the RPC itself fast and guarantees no message loss.  Where results are needed by the client, the RPC would return a tracking token or send results asynchronously through another channel.

This has a few benefits over having your clients go directly to your database/messaging system to send requests, e.g. you can change it in the future transparently to your users.

Thanks,
Doug
Reply all
Reply to author
Forward
0 new messages