Spring Applications
Project: Shipping Client
The objective of this exercise is to use message queues to process and ship orders asynchronously.
- Add the starters
spring-boot-starter-artemis
and spring-boot-starter-json
as dependencies to the bookstore application.
- Add the configuration class JmsConfig to the application to configure the Jackson message converter.
- Use the shipping DTO classes to implement a component
ShippingClient
that
- sends a
ShippingOrder
message to the OrderQueue
after an order has been accepted
- sends a
ShippingCancel
message to the CancelQueue
if an order has to be canceled
- receives
ShippingInfo
messages from the InfoQueue
and updates the status of the corresponding order accordingly
- Inject the shipping client into the
OrderService
and use it to initiate the shipping of placed orders.
- Add the library
artemis-jakarta-server
as test dependency and the updated configuration file application.properties to the test classpath to use the embedded Artemis message broker for testing.
- Run the updated OrderServiceIT integration test.