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

pubsub/rabbitpubsub: add query string set the qos prefetch count #3431

Merged
merged 7 commits into from
May 28, 2024

Conversation

peczenyj
Copy link
Contributor

@peczenyj peczenyj commented May 27, 2024

Fixes #3430

Since we usually want to set the prefetch count, I simplify the rabbit url to support a single query string

we can use rabbit://myqueue (continues backward compatible) or the new one rabbit://myqueue?prefetch_count=<prefetch-count-value>

I tested locally using a rabbitmq docker image and it seems to work properly.

pubsub/rabbitpubsub/rabbit.go Outdated Show resolved Hide resolved
pubsub/rabbitpubsub/rabbit.go Outdated Show resolved Hide resolved
pubsub/rabbitpubsub/rabbit.go Show resolved Hide resolved
pubsub/rabbitpubsub/rabbit.go Outdated Show resolved Hide resolved
pubsub/rabbitpubsub/rabbit.go Show resolved Hide resolved
@peczenyj peczenyj requested a review from vangent May 27, 2024 18:52
Copy link

codecov bot commented May 27, 2024

Codecov Report

Attention: Patch coverage is 72.41379% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 73.26%. Comparing base (d8b9c94) to head (ca2c5a2).

Files Patch % Lines
pubsub/rabbitpubsub/rabbit.go 77.77% 4 Missing and 2 partials ⚠️
pubsub/rabbitpubsub/amqp.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3431      +/-   ##
==========================================
+ Coverage   73.21%   73.26%   +0.04%     
==========================================
  Files         113      113              
  Lines       14873    14897      +24     
==========================================
+ Hits        10890    10914      +24     
+ Misses       3211     3207       -4     
- Partials      772      776       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

pubsub/rabbitpubsub/rabbit.go Show resolved Hide resolved
pubsub/rabbitpubsub/rabbit.go Outdated Show resolved Hide resolved
pubsub/rabbitpubsub/rabbit.go Outdated Show resolved Hide resolved
@peczenyj peczenyj requested a review from vangent May 28, 2024 09:21
@vangent vangent merged commit e677ded into google:master May 28, 2024
7 checks passed
@peczenyj peczenyj deleted the add-rabbitmq-qos branch June 1, 2024 04:46
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

Successfully merging this pull request may close these issues.

pubsub/rabbitpubsub: add support to qos prefetch count via url query string
2 participants