Negating a Quota policy increment with ResetQuota

We have a Quota policy in a Proxy Request Flow (Distributed, Asynchronous) and a conditional ResetQuota policy in a Target Response Flow and Fault Flows that is intended to negate the increment applied by the Quota Policy for particular responses.

The same reference is used for MessageWeight and Allow.

The effect we want is that the used count remains unchanged after each of the affected requests, however, we are seeing the used count reducing by the Allow amount a short time after the request.

With Allow set to zero, the used count increases as normal.

It seems that the non-zero ResetQuota is both blocking the increase from the Quota and reducing the used count.

How does the ResetQuota work in combination with a Quota Policy and synchronization of the count across Message Processors?

0 2 76
2 REPLIES 2

@NigelThompson , Please check the two old posts below that give the details of how Reset Quota works and where it should be placed in the flow.

https://community.apigee.com/questions/12730/cannot-get-resetquota-to-reset-the-quota-count.html https://community.apigee.com/questions/27507/how-to-use-reset-quota-correctly.html

@Nagashree B

I believe that I have catered for the issues noted in those posts by placing the ResetQuota after the Quota policy and executing it conditionally in either the response flow or the Target Fault Flow.

An example:

I make a request that executes the Quota policy (with message weight 15) but does not trigger the ResetQuota.
The Quota policy used.count is 242 (for example)

I make 3 requests that execute the Quota policy and then the Fault Flow ResetQuota (Allow 15).
(used.count = 257; 242; 227)

I then repeat the original request after allowing time to sync.
The Quota policy used.count is 212.

i.e. The Quota(15) + ResetQuota(15) is resulting in a net -15 rather than net zero