php bin/console messenger:consume

Consumes messages

Usage

messenger:consume [-l|--limit LIMIT] [-f|--failure-limit FAILURE-LIMIT] [-m|--memory-limit MEMORY-LIMIT] [-t|--time-limit TIME-LIMIT] [--sleep SLEEP] [-b|--bus BUS] [--] [<receivers>...]

Arguments

receivers   Names of the receivers/transports to consume in order of priority 

Options

-l,   --limit           Limit the number of received messages 
-f,   --failure-limit   The number of failed messages the worker can consume 
-m,   --memory-limit    The memory limit the worker can consume 
-t,   --time-limit      The time limit in seconds the worker can run 
      --sleep           Seconds to sleep before asking for new messages after no messages were found 
-b,   --bus             Name of the bus to which received messages should be dispatched (if not passed, bus is determined automatically) 

Help

The messenger:consume command consumes messages and dispatches them to the message bus.

    php bin/console messenger:consume 

To receive from multiple transports, pass each name:

    php bin/console messenger:consume receiver1 receiver2

Use the --limit option to limit the number of messages received:

    php bin/console messenger:consume  --limit=10

Use the --failure-limit option to stop the worker when the given number of failed messages is reached:

    php bin/console messenger:consume  --failure-limit=2

Use the --memory-limit option to stop the worker if it exceeds a given memory usage limit. You can use shorthand byte values [K, M or G]:

    php bin/console messenger:consume  --memory-limit=128M

Use the --time-limit option to stop the worker when the given time limit (in seconds) is reached:

    php bin/console messenger:consume  --time-limit=3600

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:

    php bin/console messenger:consume  --bus=event_bus