Skip to content
This repository was archived by the owner on Jul 19, 2024. It is now read-only.

Commit 0bdac26

Browse files
author
Bertus Steenberg
authored
Merge pull request #4 from Superbalist/max-messages
Add max messages config setting to google adapter
2 parents 2eedfba + c4502bc commit 0bdac26

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/PubSubConnectionFactory.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ protected function makeGoogleCloudAdapter(array $config)
126126
$autoCreateSubscriptions = array_get($config, 'auto_create_subscriptions', true);
127127
$backgroundBatching = array_get($config, 'background_batching', false);
128128
$backgroundDaemon = array_get($config, 'background_daemon', false);
129+
$maxMessages = array_get($config, 'max_messages', 1000);
129130

130131
if ($backgroundDaemon) {
131132
putenv('IS_BATCH_DAEMON_RUNNING=true');
@@ -136,7 +137,8 @@ protected function makeGoogleCloudAdapter(array $config)
136137
$clientIdentifier,
137138
$autoCreateTopics,
138139
$autoCreateSubscriptions,
139-
$backgroundBatching
140+
$backgroundBatching,
141+
$maxMessages
140142
);
141143
}
142144

src/config/config.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
'auth_cache' => null, // eg: \Google\Auth\Cache\MemoryCacheItemPool::class,
6363
'background_batching' => false,
6464
'background_daemon' => false,
65+
'max_messages' => 1000,
6566
],
6667

6768
'http' => [

0 commit comments

Comments
 (0)