Open ramonsmits opened 1 year ago
Throttling by time, by # of messages, or a custom metric that is related to the number of messages but not 1 to 1.
but not 1 to 1.
@SeanFeldman What do you mean by this?
For example, Intercom API allows up to 16 operations per second. But a single message might represent one or more operations against a 3rd party. Therefore, it's not always 16 messages per second but rather less. The endpoint needs to know how many operations it has performed to slow down or stop receiving until it can resume.
Another example is CosmosDB or any other resource that has throttling in place and reports back the quota of operations used or left.
@SeanFeldman ok, rate limiting from the handlers processing perspective that is connecting to services. This issue is about rate limiting on the broker.
On the broker? The broker will give what it can. This is on endpoints. Endpoints pump messages.
The broker will rate limit / throttle the namespace when consumers fetch too many messages. I'm not sure about the reason as docs mention connection limits too but the transport should gracefully handle that and not immediately fetch/reconnect when that happens.
That's doesn't sound right, @ramonsmits. How would the broker know what is "too many messages"? The broker will only throttle based on your namespace tier and MUs provisioned in Premium. Nothing else. The throughput of an endpoint is an endpoint business, not the broker. Hence this issue.
Think about it, if a namespace can send you N messages that result in O operations, where N < O, the namespace is not throttling anything. It's the 3rd part that does because it cannot accept more that Max messages, where N <= Max < O.
Describe the feature.
Currently when there are rate limiting failures during processing messages are being fetched immediately for processing again and the transport is not throttling to adhere to the rate limiting request
Considerations:
Additional Context
No response