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

Javascript: RPC client may exit too early #258

Open
jaydpather opened this issue Feb 18, 2020 · 2 comments
Open

Javascript: RPC client may exit too early #258

jaydpather opened this issue Feb 18, 2020 · 2 comments

Comments

@jaydpather
Copy link

I found this tutorial quite confusing: https://www.rabbitmq.com/tutorials/tutorial-six-javascript.html

It claims it is going to show you how to write an RPC, where the caller waits for a response before returning. However, the example code does the opposite: in rpc_client.js, the call to amqp.connect returns before the callback for channel.consume is invoked.

The C# RPC tutorial does a true RPC, where it waits for the response before returning. The Javascript tutorial should have a similar behavior.

@michaelklishin michaelklishin transferred this issue from rabbitmq/rabbitmq-website Feb 18, 2020
@michaelklishin
Copy link
Member

You are welcome to correct the JavaScript example and submit two PRs, in this repo for the executable version and then for the website copy.

@michaelklishin michaelklishin changed the title Javascript RPC tutorial does not wait for callback Javascript: RPC client may exit too early Feb 18, 2020
@lukebakken
Copy link
Contributor

The website tutorial pages are located here:

https://github.com/rabbitmq/rabbitmq-website/tree/live/site/tutorials

As @michaelklishin said, we would welcome corrections. RabbitMQ is free, open-source software and any contributions from the community are very welcome.

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

3 participants