$this->uuid(),// 自定义消息ID 'event' => $event, 'data' => $data, 'options' => $options ]; $this->payload = $message; } /** * 生成唯一的消息ID * * @return string */ private function uuid() { return Str::random() . mt_rand(100000, 999999) . uniqid(); } }