messageId = $messageId; } /** * true if topic sent with success * * @return bool */ public function isSuccess() { return (bool) $this->messageId; } /** * set error * @param $error */ public function setError($error) { $this->error = $error; } /** * return error message * you should test if it's necessary to resent it * * @return string error */ public function error() { $this->error; } /** * return true if it's necessary resent it using exponential backoff * * @return bool */ public function shouldRetry() { $this->error; } }