/** * @param Exception $exception * @param CommandInterface $command * @throws Exception */ protected function handlePutFailure(Exception $exception, CommandInterface $command) { $this->logger->alert('Failed to queue command due to unexpected exception', ['exception' => $exception, 'producer' => $this->producer, 'command' => $command]); if ($this->fallbackEnabled === true) { $command->execute(); } else { throw $exception; } }
/** * @return bool */ public function execute() { return $this->command->execute(); }