8000 pubsub/rabbitpubsub: add support to qos prefetch count via url query string · Issue #3430 · google/go-cloud · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
pubsub/rabbitpubsub: add support to qos prefetch count via url query string #3430
Closed
@peczenyj

Description

@peczenyj

Is your feature request related to a problem? Please describe.

Today we can't set the QoS prefetch count when we open a subscription to a rabbitmq queue.

Describe the solution you'd like

I check how kafka handle query strings and I add support to prefetch_count=<prefetch count value> that should be transparent when using a rabbit://queue url format like rabbit://queue?prefetch_coint=1000 to set the prefetch count equal to 1000.

Describe alternatives you've considered

I find no alternatives, since to set the QoS we need to call a specific method on the amqp channel object. See https://pkg.go.dev/github.com/rabbitmq/amqp091-go#Channel.Qos

This development is not needed if we use the following configuration in the rabbitmq server:
https://www.rabbitmq.com/docs/consumer-prefetch#default-limit

Additional context

Usuall we only set the consumer prefetch count, this is why I am ignoring the other parameters on the Qos method and setting default value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0