Repository: symfony/symfony
File: src/Symfony/Component/Messenger/Command/ConsumeMessagesCommand.php (PHP)

Code before:
    <info>php %command.full_name% <receiver-name> --memory-limit=128M</info>

Use the --time-limit option to stop the worker when the given time limit (in seconds) is reached.
If a message is being handled, the worker will stop after the processing is finished:

    <info>php %command.full_name% <receiver-name> --time-limit=3600</info>

Use the --bus option to specify the message bus to dispatch received messages
to instead of trying to determine it automatically. This is required if the
messages didn't originate from Messenger:

    <info>php %command.full_name% <receiver-name> --bus=event_bus</info>

Use the --queues option to limit a receiver to only certain queues (only supported by some receivers):

    <info>php %command.full_name% <receiver-name> --queues=fasttrack</info>

Use the --no-reset option to prevent services resetting after each message (may lead to leaking services' state between messages):

    <info>php %command.full_name% <receiver-name> --no-reset</info>

Use the --all option to consume from all receivers:

    <info>php %command.full_name% --all</info>

Use the --exclude-receivers option to exclude specific receivers/transports from consumption (can only be used with --all):

    <info>php %command.full_name% --all --exclude-receivers=<receiver-name></info>
EOF
            )
        ;
    }

    protected function initialize(InputInterface $input, OutputInterface $output): void
    {
        if ($input->hasParameterOption('--keepalive')) {
            $this->getApplication()->setAlarmInterval((int) ($input->getOption('keepalive') ?? self::DEFAULT_KEEPALIVE_INTERVAL));
        }

        if ($input->getOption('exclude-receivers') && !$input->getOption('all')) {
            throw new InvalidOptionException('The --exclude-receivers option can only be used with the --all option.');
        }
    }

    protected function interact(InputInterface $input, OutputInterface $output): void
    {
        $io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output);

        if ($input->getOption('all')) {
            return;
        }

Review comment (suggestion):
```suggestion
Use the <info>--exclude-receivers</info> option to exclude specific receivers/transports from consumption (can only be used with <info>--all</info>):
```

Code after:
                    <info>php %command.full_name% <receiver-name> --memory-limit=128M</info>

                Use the <info>--time-limit</info> option to stop the worker when the given time limit (in seconds) is reached.
                If a message is being handled, the worker will stop after the processing is finished:

                    <info>php %command.full_name% <receiver-name> --time-limit=3600</info>

                Use the <info>--bus</info> option to specify the message bus to dispatch received messages
                to instead of trying to determine it automatically. This is required if the
                messages didn't originate from Messenger:

                    <info>php %command.full_name% <receiver-name> --bus=event_bus</info>

                Use the <info>--queues</info> option to limit a receiver to only certain queues (only supported by some receivers):

                    <info>php %command.full_name% <receiver-name> --queues=fasttrack</info>

                Use the <info>--no-reset</info> option to prevent services resetting after each message (may lead to leaking services' state between messages):

                    <info>php %command.full_name% <receiver-name> --no-reset</info>

                Use the <info>--all</info> option to consume from all receivers:

                    <info>php %command.full_name% --all</info>

                Use the <info>--exclude-receivers</info> option to exclude specific receivers/transports from consumption (can only be used with <info>--all</info>):

                    <info>php %command.full_name% --all --exclude-receivers=<receiver-name></info>
                EOF
            )
        ;
    }

    protected function initialize(InputInterface $input, OutputInterface $output): void
    {
        if ($input->hasParameterOption('--keepalive')) {
            $this->getApplication()->setAlarmInterval((int) ($input->getOption('keepalive') ?? self::DEFAULT_KEEPALIVE_INTERVAL));
        }

        if ($input->getOption('exclude-receivers') && !$input->getOption('all')) {
            throw new InvalidOptionException('The "--exclude-receivers" option can only be used with the "--all" option.');
        }
    }

    protected function interact(InputInterface $input, OutputInterface $output): void
    {
        $io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output);

        if ($input->getOption('all')) {
            return;
        }