Skip to content

[5.x] Speared the producer and the consumer #261

@papac

Description

@papac

Actually, the producer is also the consumer

You should spread this to the producer and consumer.

class Producer extends ProducerService
{
    public function __construct(private int $user_id)
    {}
}
class Consumer
{
   public function __construct(private UserService $userService){}

   public function process(ProducerService $producer)
   {
      $user_id = $producer->getUser();
      $userService->sendEmail($user_id);
   }
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

🔖 Ready

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions