bbit/sqs-command-queue-bundle
Command component, enabling seamless queuing of console commands (e.g., cache:clear, doctrine:schema:update).__serialize()/__unserialize() methods.aws-sdk-php).ContainerAwareCommand deprecations).Aws\Sqs\SqsClient mocks or localstack).Command logic via traits or interfaces).Command classes for serializability.cache:warmup vs. user:export).cache:clear).[program:sqs-worker]
command=php bin/console bbit:sqs-command-queue:worker
autostart=true
autorestart=true
user=www-data
numprocs=4 # Scale based on load
// Before
$this->getContainer()->get('command_bus')->handle(new ClearCacheCommand());
// After
$this->getContainer()->get('sqs_queue')->addCommand('app/console cache:clear');
aws/aws-sdk-php v2. Ensure compatibility with your AWS SDK version (e.g., v3 may require updates).ContainerAware deprecations).guzzlehttp/stream) must be compatible.SQSFullAccess for testing, least-privilege for prod).composer.json and AppKernel.php.monolog + ELK).numprocs in supervisor or deploying additional instances.php.ini tuning).ApproximateNumberOfMessagesVisible) to trigger worker scaling.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| SQS Unavailable (AWS Outage) | Tasks pile up or fail silently. | Implement local fallback queue (e.g., Redis) or synchronous fallback. |
| Worker Crashes | Tasks remain invisible in SQS. | Set visibility timeout < task duration; use supervisor autorestart. |
| Command Serialization Errors | Tasks fail silently. | Add validation in addCommand(); log deserialization errors. |
| AWS Credential Leak | Security breach. | Use IAM roles ( |
How can I help you explore Laravel packages today?