Class DisabledPublishRateLimiter

java.lang.Object
org.apache.pulsar.broker.service.DisabledPublishRateLimiter
All Implemented Interfaces:
PublishRateLimiter

public class DisabledPublishRateLimiter extends Object implements PublishRateLimiter
  • Field Details

  • Method Details

    • handlePublishThrottling

      public void handlePublishThrottling(Producer producer, int numOfMessages, long msgSizeInBytes)
      Description copied from interface: PublishRateLimiter
      Consumes publishing quota and handles throttling.

      The rate limiter implementation calls Producer.incrementThrottleCount() to indicate that the producer should be throttled. The rate limiter must schedule a call to Producer.decrementThrottleCount() after a throttling period that it calculates.

      Specified by:
      handlePublishThrottling in interface PublishRateLimiter
      numOfMessages - number of messages to publish
      msgSizeInBytes - size of messages in bytes to publish
    • update

      public void update(org.apache.pulsar.common.policies.data.Policies policies, String clusterName)
      Description copied from interface: PublishRateLimiter
      updates rate-limiting threshold based on policies.
      Specified by:
      update in interface PublishRateLimiter
    • update

      public void update(org.apache.pulsar.common.policies.data.PublishRate maxPublishRate)
      Description copied from interface: PublishRateLimiter
      updates rate-limiting threshold based on passed in rate limiter.
      Specified by:
      update in interface PublishRateLimiter