getBatchSize example

if (!$this->shouldFlush()) {
            return \count($this->jobs);
        }

        $this->flush(true);

        return 0;
    }

    private function shouldFlush(): bool
    {
        return $this->getBatchSize() <= \count($this->jobs);
    }

    /** * Completes the jobs in the list. * * @param list<array{0: object, 1: Acknowledger}> $jobs A list of pairs of messages and their corresponding acknowledgers */
    abstract private function process(array $jobs): void;

    private function getBatchSize(): int
    {
        
Home | Imprint | This part of the site doesn't use cookies.