public function consume(ItemPipelineEvent $event)
    {
        if (!$this->setItem($event)) {
            return;
        }

        $this->log(
            sprintf(
                'Start update single document of type %s id: %s',
                get_class($this->getItem()->getDocument()),
                $this->getItem()->getDocument()->getId()
            )
        );

        if (!$this->persistDocument()) {
            return;
        };

        $this->log('End an update of a single document.');
    }