consumeToken

abstract fun consumeToken(key: String, configuration: RateLimitConfiguration, amount: Long = 1): RateLimiter.ConsumptionData

Consumes amount tokens from the bucket associated with the given key This will raise any exception thrown by the bucket4j proxy manager implementation, e.g. subclasses of JedisException when using the Jedis implementation.