Somehow when the consumer tries to handle a message the MessageBus doesn't have any middleware registered at Symfony\Component\Messenger\MessageBus. This is only the case when consuming async. The regular sync messages all get handled correctly.
I've debugged it extensively. The messages are definitely 'consumed', but nothing happens and they're tried over and over.
I have a custom event.bus with async transport configured like this:
Bref\Symfony\Messenger\Service\Sqs\SqsConsumer:
public: true
autowire: true
arguments:
# Pass the transport name used in config/packages/messenger.yaml
$transportName: 'async'
# true enables partial SQS batch failure
# Enabling this without proper SQS config will consider all your messages successful
# See https://bref.sh/docs/function/handlers.html#partial-batch-response for more details.
$partialBatchFailure: false
$bus: '@event.bus'
$logger: '@logger'
$serializer: '@messenger.transport.symfony_serializer'
I'm currently using Symfony 6.3.3 and Bref 1.7.32
Running the consumer locally with the vendor/bin/bref local worker command works perfectly.
Somehow when the consumer tries to handle a message the MessageBus doesn't have any middleware registered at
Symfony\Component\Messenger\MessageBus
. This is only the case when consuming async. The regular sync messages all get handled correctly. I've debugged it extensively. The messages are definitely 'consumed', but nothing happens and they're tried over and over.I have a custom event.bus with async transport configured like this:
And this is in services.yaml:
I'm currently using Symfony 6.3.3 and Bref 1.7.32
Running the consumer locally with the
vendor/bin/bref local worker
command works perfectly.Might Bref 2 work? I'll try and upgrade tomorrow.