Skip to content

Instantly share code, notes, and snippets.

@dgafka
Created September 29, 2022 18:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dgafka/01bd0286f40bf0d5443e2f430ff921ac to your computer and use it in GitHub Desktop.
Save dgafka/01bd0286f40bf0d5443e2f430ff921ac to your computer and use it in GitHub Desktop.
loosely-coupled-microservices-01.php
<?php
class OrderService
{
#[EventHandler]
public function placeOrder(OrderWasPlaced $event, DistributedBus $distributedBus): void
{
$distributedBus->convertAndPublishEvent("order.was_placed",$event);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment