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

Rabbitmq transport polling #175

Closed
blankley opened this issue Mar 11, 2022 · 2 comments
Closed

Rabbitmq transport polling #175

blankley opened this issue Mar 11, 2022 · 2 comments

Comments

@blankley
Copy link

We're using rabbitmq as a transport and seeing very high cpu usage. We can see over 12k Gets a second and it looks like we're polling rabbit with no timeout :

Screenshot from 2022-03-11 10-01-06

I added a:

await new Promise(r => setTimeout(r,1000))

to

and see the expected 1 Get a second and normal CPU usage:
Screenshot from 2022-03-11 13-07-35

Are we making a mistake in implementation? Missing something else?

adenhertog added a commit that referenced this issue Mar 12, 2022
* convert rabbit get to consume

* lint fix
@adenhertog
Copy link
Contributor

thanks for finding that @blankley . I've pushed a change that internally uses callbacks rather than loops that should be much easier on your CPU.

This fix is available in the latest @node-ts/bus-core and @node-ts/bus-rabbitmq

@blankley
Copy link
Author

Thanks! Great fix. Not to sound ungrateful, but would it be possible to back port this to the 0.6.x tree?

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

2 participants