forked from ianpartridge/coffeeshop-demo
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9ddbd08
commit c418995
Showing
11 changed files
with
69 additions
and
51 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
barista-kafka/src/main/java/me/escoffier/quarkus/coffeeshop/Beverage.java
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
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
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
3 changes: 3 additions & 0 deletions
3
barista-kafka/src/main/java/me/escoffier/quarkus/coffeeshop/PreparationState.java
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
@POST | ||
@Path("/async") | ||
public CompletionStage<Beverage> async(Order order) { | ||
return barista.orderAsync(order.setOrderId(UUID.randomUUID().toString())); | ||
} | ||
|
||
@Inject | ||
@Stream("orders") | ||
Emitter<String> orders; | ||
|
||
@Inject | ||
@Stream("queue") | ||
Emitter<String> states; | ||
|
||
@POST | ||
@Path("/messaging") | ||
public Order messaging(Order order) { | ||
order.setOrderId(UUID.randomUUID().toString()); | ||
states.send(PreparationState.queued(order)); | ||
orders.send(jsonb.toJson(order)); | ||
return order; | ||
} |
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
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
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
40 changes: 0 additions & 40 deletions
40
...eeshop-service/src/main/java/me/escoffier/quarkus/coffeeshop/messaging/KafkaBaristas.java
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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