From 496c2b173760e6f6a8047ac0ff8627615b2cd366 Mon Sep 17 00:00:00 2001 From: Steven van Beelen Date: Wed, 10 Jul 2019 13:37:28 +0200 Subject: [PATCH] Add ProcessingGroup annotation to OrderedProductsEventHandler Add the ProcessingGroup annotation to OrderedProductsEventHandler so that this event handler is grouped in a nicely named Event Processor. If the app is started in conjunction with Axon Server, this will make the set up more evident from the dashboard BAEL-2435 --- .../baeldung/axon/querymodel/OrderedProductsEventHandler.java | 2 ++ axon/src/main/resources/application.properties | 1 + 2 files changed, 3 insertions(+) create mode 100644 axon/src/main/resources/application.properties diff --git a/axon/src/main/java/com/baeldung/axon/querymodel/OrderedProductsEventHandler.java b/axon/src/main/java/com/baeldung/axon/querymodel/OrderedProductsEventHandler.java index d4cf3d999b..a37f0111ed 100644 --- a/axon/src/main/java/com/baeldung/axon/querymodel/OrderedProductsEventHandler.java +++ b/axon/src/main/java/com/baeldung/axon/querymodel/OrderedProductsEventHandler.java @@ -5,6 +5,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.axonframework.config.ProcessingGroup; import org.axonframework.eventhandling.EventHandler; import org.axonframework.queryhandling.QueryHandler; import org.springframework.stereotype.Service; @@ -16,6 +17,7 @@ import com.baeldung.axon.coreapi.queries.FindAllOrderedProductsQuery; import com.baeldung.axon.coreapi.queries.OrderedProduct; @Service +@ProcessingGroup("ordered-products") public class OrderedProductsEventHandler { private final Map orderedProducts = new HashMap<>(); diff --git a/axon/src/main/resources/application.properties b/axon/src/main/resources/application.properties new file mode 100644 index 0000000000..7c51eb8e1e --- /dev/null +++ b/axon/src/main/resources/application.properties @@ -0,0 +1 @@ +spring.application.name=Order Management Service \ No newline at end of file