Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using NATS request/reply mechanism #12

Open
ospatil opened this issue Sep 9, 2021 · 1 comment
Open

Using NATS request/reply mechanism #12

ospatil opened this issue Sep 9, 2021 · 1 comment

Comments

@ospatil
Copy link

ospatil commented Sep 9, 2021

Thank you for the wonderful krakend project. I am quite new to it and would like to use it with NATS to carry out protocol translation for microservices. The flow I would like to have is:

  1. Krakend receives a http request.
  2. It converts it to a message on a NATS subject, uses the NATS request-reply mechanism to wait for the backend response.
  3. Once response is received, converts it to http response and retuns it to the caller.

NATS allows us to use request-reply mechanism by setting "reply" header on the NATS message to a dynamic "inbox" subject and setting up a listener for it. The plumbing for this is setup by the NATS client libraries.

I looked at and experimented with krakend-pubsub functionality and couldn't find a way to use the request-reply mechanism.

Is there any way I can do this? Is there something obvious that I have missed?

Thanks again!

@ospatil
Copy link
Author

ospatil commented Oct 3, 2021

Any ideas or pointers for the above question? I wouldn't mind extending the functionality and providing a PR. Any help is appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant