/symfony-messenger-async
Symfony Messenger async processing — message queues, retry strategies, failure transport, Symfony Scheduler, idempotency patterns, background jobs. Triggers on: messenger, async, queue, retry, scheduler, background job, worker, transport, message queue, cron, scheduled task
$ npx -y skills add aligundogdu/symfony-hexagonal-skill --skill symfony-messenger-async --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/symfony-messenger-async
Context preview
The summary Claude sees to decide when to auto-load this skill.
Symfony Messenger async processing — message queues, retry strategies, failure transport, Symfony Scheduler, idempotency patterns, background jobs. Triggers on: messenger, async, queue, retry, scheduler, background job, worker, transport, message queue, cron, scheduled task
SKILL.md
symfony-messenger-async.SKILL.mddescription: "Symfony Messenger async processing — message queues, retry strategies, failure transport, Symfony Scheduler, idempotency patterns, background jobs. Triggers on: messenger, async, queue, retry, scheduler, background job, worker, transport, message queue, cron, scheduled task"
Symfony Messenger & Async Processing
You are an expert in async message processing with Symfony Messenger within hexagonal architecture.
When to Activate
- User needs async processing or background jobs
- User asks about message queues or retry strategies
- User mentions cron jobs (redirect to Scheduler)
- User needs idempotency or failure handling
- User asks about Symfony Scheduler
Core Principle: No Cron Jobs
**Never use raw cron.** Always use:
- **Symfony Messenger** for async message processing
- **Symfony Scheduler** for recurring tasks
Async Command Pattern
// The command is the same — async is a routing concern, not a code concern
namespace App\Application\Report\Command;
final readonly class GenerateReport
{
public function __construct(
public string $reportId,
public string $userId,
public string $type,
) {
}
}
// Handler is identical to sync — the bus handles async dispatch
#[AsMessageHandler(bus: 'command.bus')]
final readonly class GenerateReportHandler
{
public function __invoke(GenerateReport $command): void
{
// Long-running operation
}
}# Route to async transport
framework:
messenger:
routing:
'App\Application\Report\Command\GenerateReport': asyncIdempotency
Every async handler MUST be idempotent — safe to retry:
#[AsMessageHandler(bus: 'command.bus')]
final readonly class ProcessPaymentHandler
{
public function __construct(
private PaymentRepositoryInterface $paymentRepository,
private PaymentGatewayInterface $paymentGateway,
) {
}
public function __invoke(ProcessPayment $command): void
{
// Check if already processed (idempotency)
$existing = $this->paymentRepository->findByIdempotencyKey($command->idempotencyKey);
if ($existing !== null) {
return; // Already processed, skip
}
// Process payment
$result = $this->paymentGateway->charge($command->customerId, $command->amount);
$this->paymentRepository->save($result);
}
}References
See `references/` for detailed guides:
- `messenger-config.md` — Full Messenger YAML configuration
- `idempotency-patterns.md` — Idempotency key strategies
- `scheduler-patterns.md` — Symfony Scheduler setup and patterns
Read more
description: "Symfony Messenger async processing — message queues, retry strategies, failure transport, Symfony Scheduler, idempotency patterns, background jobs. Triggers on: messenger, async, queue, retry, scheduler, background job, worker, transport, message queue, cron, scheduled task"
Symfony Messenger & Async Processing
You are an expert in async message processing with Symfony Messenger within hexagonal architecture.
When to Activate
- User needs async processing or background jobs
- User asks about message queues or retry strategies
- User mentions cron jobs (redirect to Scheduler)
- User needs idempotency or failure handling
- User asks about Symfony Scheduler
Core Principle: No Cron Jobs
**Never use raw cron.** Always use:
- **Symfony Messenger** for async message processing
- **Symfony Scheduler** for recurring tasks
Async Command Pattern
// The command is the same — async is a routing concern, not a code concern
namespace App\Application\Report\Command;
final readonly class GenerateReport
{
public function __construct(
public string $reportId,
public string $userId,
public string $type,
) {
}
}
// Handler is identical to sync — the bus handles async dispatch
#[AsMessageHandler(bus: 'command.bus')]
final readonly class GenerateReportHandler
{
public function __invoke(GenerateReport $command): void
{
// Long-running operation
}
}# Route to async transport
framework:
messenger:
routing:
'App\Application\Report\Command\GenerateReport': asyncIdempotency
Every async handler MUST be idempotent — safe to retry:
#[AsMessageHandler(bus: 'command.bus')]
final readonly class ProcessPaymentHandler
{
public function __construct(
private PaymentRepositoryInterface $paymentRepository,
private PaymentGatewayInterface $paymentGateway,
) {
}
public function __invoke(ProcessPayment $command): void
{
// Check if already processed (idempotency)
$existing = $this->paymentRepository->findByIdempotencyKey($command->idempotencyKey);
if ($existing !== null) {
return; // Already processed, skip
}
// Process payment
$result = $this->paymentGateway->charge($command->customerId, $command->amount);
$this->paymentRepository->save($result);
}
}References
See `references/` for detailed guides:
- `messenger-config.md` — Full Messenger YAML configuration
- `idempotency-patterns.md` — Idempotency key strategies
- `scheduler-patterns.md` — Symfony Scheduler setup and patterns
A Claude Code plugin that enforces hexagonal architecture (ports & adapters) in Symfony projects. Works with both new projects (full scaffolding) and existing projects (progressive, module-by-module refactoring).
Other skills on symfony-hexagonal-skill.
- /symfony-api-response
Symfony API response standardization — JSON payload format, exception handling, controllers, REST endpoints, error responses, debug mode. Triggers on: API, endpoint, controller, response, error handling, JSON, REST, API response, exception subscriber, HTTP
Open skill - /symfony-cqrs-handlers
Symfony CQRS command/query handlers — commands, queries, handlers, bus configuration, use cases. Triggers on: command, query, handler, CQRS, bus, use case, command handler, query handler, message bus
Open skill - /symfony-doctrine-persistence
Symfony Doctrine persistence — repository adapters, entity mapping, migrations, transactions, database patterns. Triggers on: doctrine, repository, persistence, database, mapping, migration, ORM, entity manager, DBAL, transaction
Open skill - /symfony-domain-modeling
Symfony domain modeling — entities, value objects, domain events, aggregates, domain exceptions. Triggers on: entity, value object, domain event, aggregate, domain exception, domain model, domain logic, business rule, invariant
Open skill - /symfony-hexagonal-architecture
Symfony hexagonal architecture setup — project structure, module scaffolding, layer responsibilities, dependency rules. Triggers on: architecture, module, layer, hexagonal, scaffold, project structure, directory structure, new project, new module
Open skill - /symfony-ports-adapters
Symfony ports and adapters — port interfaces, adapter implementations, dependency injection, autowiring, repository interfaces. Triggers on: port, adapter, interface, repository interface, DI, autowiring, dependency injection, services.yaml, binding
Open skill

