public boolean acquire(long messageCreateTime) {
        if (isDelayed(messageCreateTime)) {
            return eventRateLimiter.tryAcquire();
        }
        return false;
    }
@Test
    public void testAcquire() throws InterruptedException {
        double permitsPerSecond = 0.5;
        Duration delayThreshold = Duration.ofMillis(1000);
        MessageDelayedEventLimiter delayedEventLimiter =
                new MessageDelayedEventLimiter(delayThreshold, permitsPerSecond);

        long endTime = System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(10);
        long actualAcquiredCount = 0;
        while (System.currentTimeMillis() < endTime) {
            boolean acquired =
                    delayedEventLimiter.acquire(
                            System.currentTimeMillis() - (delayThreshold.toMillis() * 10));
            if (acquired) {
                actualAcquiredCount++;
            }
            Thread.sleep(1);
        }
        long expectedAcquiredCount = (long) (TimeUnit.SECONDS.toSeconds(10) * permitsPerSecond);

        Assertions.assertTrue(expectedAcquiredCount >= actualAcquiredCount);
    }