<?php
declare(strict_types=1);

namespace PpPhp\Core\Platform\Event\Consumer\Contracts;

use PpPhp\Core\Platform\Event\Consumer\QueueConsumerResult;
use PpPhp\Core\Platform\Event\Consumer\QueueConsumerSnapshot;
use PpPhp\Core\Platform\Event\Consumer\QueueConsumerStatistics;

interface QueueConsumerInterface
{
    public function consume(?callable $handler = null): QueueConsumerResult;
    public function consumeBatch(int $limit = 10, ?callable $handler = null): int;
    public function statistics(): QueueConsumerStatistics;
    public function snapshot(): QueueConsumerSnapshot;
    public function clear(): void;
}
