You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class ConsumeMessagesCommand extends Command implements SignalableCommandInterface
45
45
{
46
+
privateconstDEFAULT_KEEPALIVE_INTERVAL = 5;
47
+
46
48
private ?Worker$worker = null;
47
49
48
50
publicfunction__construct(
@@ -75,6 +77,7 @@ protected function configure(): void
75
77
newInputOption('queues', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Limit receivers to only consume from the specified queues'),
76
78
newInputOption('no-reset', null, InputOption::VALUE_NONE, 'Do not reset container services after each message'),
77
79
newInputOption('all', null, InputOption::VALUE_NONE, 'Consume messages from all receivers'),
80
+
newInputOption('keepalive', null, InputOption::VALUE_OPTIONAL, 'Whether to use the transport\'s keepalive mechanism if implemented', self::DEFAULT_KEEPALIVE_INTERVAL),
78
81
])
79
82
->setHelp(<<<'EOF'
80
83
The <info>%command.name%</info> command consumes messages and dispatches them to the message bus.
@@ -124,6 +127,13 @@ protected function configure(): void
Copy file name to clipboardExpand all lines: Command/FailedMessagesRetryCommand.php
+19-1
Original file line number
Diff line number
Diff line change
@@ -41,6 +41,8 @@
41
41
#[AsCommand(name: 'messenger:failed:retry', description: 'Retry one or more messages from the failure transport')]
42
42
class FailedMessagesRetryCommand extends AbstractFailedMessagesCommand implements SignalableCommandInterface
43
43
{
44
+
privateconstDEFAULT_KEEPALIVE_INTERVAL = 5;
45
+
44
46
privatebool$shouldStop = false;
45
47
privatebool$forceExit = false;
46
48
private ?Worker$worker = null;
@@ -64,6 +66,7 @@ protected function configure(): void
64
66
newInputArgument('id', InputArgument::IS_ARRAY, 'Specific message id(s) to retry'),
65
67
newInputOption('force', null, InputOption::VALUE_NONE, 'Force action without confirmation'),
66
68
newInputOption('transport', null, InputOption::VALUE_OPTIONAL, 'Use a specific failure transport', self::DEFAULT_TRANSPORT_OPTION),
69
+
newInputOption('keepalive', null, InputOption::VALUE_OPTIONAL, 'Whether to use the transport\'s keepalive mechanism if implemented', self::DEFAULT_KEEPALIVE_INTERVAL),
67
70
])
68
71
->setHelp(<<<'EOF'
69
72
The <info>%command.name%</info> retries message in the failure transport.
@@ -87,6 +90,13 @@ protected function configure(): void
0 commit comments