Loading...
Loading...
Architecture async-first avec messaging et queues (Symfony Messenger, Laravel Queue, Ecotone). Use when working with async processing, queues, workers, background jobs.
npx skill4agent add thebeardedbearsas/claude-craft async| Cas | Async ? |
|---|---|
| Envoi d'email transactionnel | ✅ |
| Génération PDF / export CSV | ✅ |
| Appel API tierce > 200 ms | ✅ |
| Traitement batch nocturne | ✅ |
| Lecture base de données triviale | ❌ |
| Stack | Framework | Notes |
|---|---|---|
| Symfony | Symfony Messenger | Transport AMQP, Redis, Doctrine ; supports Stamps |
| Laravel | Laravel Queue (Horizon en prod) | Backed by Redis ou SQS ; supervision native |
| PHP framework-agnostic | Ecotone | DDD, sagas, scheduler, messaging unifié |
| Node.js | BullMQ ou RabbitMQ | Redis-backed avec dashboard |
// Message (immutable DTO)
final class SendWelcomeEmail
{
public function __construct(public readonly string $userId) {}
}
// Handler
final class SendWelcomeEmailHandler
{
public function __invoke(SendWelcomeEmail $message): void
{
// Idempotency check
if ($this->emailLog->wasSent($message->userId, 'welcome')) {
return;
}
$this->mailer->sendWelcome($message->userId);
$this->emailLog->record($message->userId, 'welcome');
}
}
// Dispatch (controller)
$this->bus->dispatch(new SendWelcomeEmail($user->id));try { ... } catch (\Throwable) { /* swallow */ }Détails complets, patterns Laravel/Ecotone, exemples de configuration, observabilité OpenTelemetry, lifecycle events, checklists par phase : voir.@.claude/skills/async/REFERENCE.md