getExportRequest(); try { $exportService = $this->handler->getExporterFor($exportRequest); $file = $exportService->export($exportRequest); $update = new Update('files', json_encode(['url' => 'https://my.download.url/' . $file->getId()])); $this->mercureHub->publish($update); } catch (\Exception $e) { // To prevent Messenger from retrying throw new UnrecoverableMessageHandlingException($e->getMessage(), $e->getCode(), $e); } } }