/**
  * {@inheritdoc}
  */
 public function process(ConsumerEvent $event)
 {
     $page = $this->pageManager->findOneBy(array('id' => $event->getMessage()->getValue('pageId')));
     if (!$page) {
         return;
     }
     // start a transaction
     $this->snapshotManager->getConnection()->beginTransaction();
     // cleanup snapshots
     $this->snapshotManager->cleanup($page, $event->getMessage()->getValue('keepSnapshots'));
     // commit the changes
     $this->snapshotManager->getConnection()->commit();
 }