glcrazier commented on issue #12185:
URL: https://github.com/apache/pulsar/issues/12185#issuecomment-938387427
> > **Is your enhancement request related to a problem? Please describe.**
> > If set ratePeriodInSecond of DispatchRate as 0 when setting namespace
policy, the admin api indicates success. However, successive operations like
creating subscriptions under this namespace would fail and the caller doesn't
know why due to improper settings.
> > **Describe the solution you'd like**
> > When calling admin api, check ratePeriodInSecond value if it's
non-positive, failed the calling to let the caller try correct values.
>
> How do you use it, can you tell me the steps?
I called like the following:
```
adminClient.namespaces().setDispatchRate("namespace",
new
DispatchRate(configuration.getDispatchThrottlingRateInMsg(),
configuration.getDispatchThrottlingRateInByte(),
0));
```
I accidentally created DispatchRate object with third parameters as 0. Then
subsequent operations like creating subscription would fail.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]