From 45e01ff85990abbbdcd8a7cf4a814bf681a3d1e1 Mon Sep 17 00:00:00 2001 From: Andrew Minion Date: Tue, 22 Oct 2019 17:35:06 -0500 Subject: [PATCH] return message IDs --- src/GoogleCloudPubSubAdapter.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/GoogleCloudPubSubAdapter.php b/src/GoogleCloudPubSubAdapter.php index b895ddd..7821e99 100644 --- a/src/GoogleCloudPubSubAdapter.php +++ b/src/GoogleCloudPubSubAdapter.php @@ -273,6 +273,8 @@ public function subscribe($channel, callable $handler) * * @param string $channel * @param mixed $message + * + * @return array Array of message IDs. */ public function publish($channel, $message) { @@ -282,7 +284,7 @@ public function publish($channel, $message) if ($this->backgroundBatching) { $topic->batchPublisher()->publish(['data' => $payload]); } else { - $topic->publish(['data' => $payload]); + return $topic->publish(['data' => $payload]); } }