Created
September 29, 2022 18:43
-
-
Save dgafka/01bd0286f40bf0d5443e2f430ff921ac to your computer and use it in GitHub Desktop.
loosely-coupled-microservices-01.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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