Skip to content

Commit 14afec0

Browse files
author
brunoroux
committed
allow user to configure push type (unicast or multicast)
1 parent 2d8b396 commit 14afec0

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/DependencyInjection/Configuration.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,11 @@ private function getQueuesNode()
143143
->defaultFalse()
144144
->info('Whether notifications are sent to the subscribers')
145145
->end()
146+
->scalarNode('push_type')
147+
->defaultValue('multicast')
148+
->info('Whether the push queue is multicast or unicast')
149+
->example('unicast')
150+
->end()
146151
->scalarNode('notification_retries')
147152
->defaultValue(3)
148153
->info('How many attempts the Push Notifications are retried if the Subscriber returns an error')

src/Provider/IronMqProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function create()
7171
{
7272
if ($this->options['push_notifications']) {
7373
$params = [
74-
'push_type' => 'multicast',
74+
'push_type' => $this->options['push_type'],
7575
'push' => [
7676
'rate_limit' => $this->options['rate_limit'],
7777
'retries' => $this->options['notification_retries'],

tests/Provider/IronMqProviderTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ private function getIronMqProvider(array $options = [])
6060
[
6161
'logging_enabled' => false,
6262
'push_notifications' => true,
63+
'push_type' => 'multicast',
6364
'notification_retries' => 3,
6465
'notification_retries_delay' => 60,
6566
'message_delay' => 0,

0 commit comments

Comments
 (0)