Questions Management – Implement Turbine Stream with RabbitMQ

Check out the full series of Questions Management tutorial here.

I showed you about the Turbine Stream with RabbitMQ in this tutorial, to implement it for Questions Management, first, we need to add Hystrix Stream and Stream Rabbit dependency for API and Composite services as follows:

Next, we need to declare information about RabbitMQ for these services in their application.properties file:

In the support-turbine-stream project, you need to add annotation @EnableTurbineStream to the SupportTurbineStreamApplication class:

and configure the application.properties file as follows:

The last thing we need to do is, because the latest version of Spring Cloud Netflix does not work with Hystrix Stream and Turbine Stream, we need to downgrade its version to Greenwich.M1 in the pom.xml file of parent project questions-management :

That’s it.

Let’s try start MongoDB, RabbitMQ, all services, and support:

Questions Management - Implement Turbine Stream with RabbitMQ

Start front-end:

Questions Management - Implement Turbine Stream with RabbitMQ

Run Support Hystrix Dashboard and connect to Support Turbine Stream:

Questions Management - Implement Turbine Stream with RabbitMQ

Go to the page showing all the questions, then the page displays all categories multiple times, then return to the Hystrix Dashboard screen, you will see the following result:

Questions Management - Implement Turbine Stream with RabbitMQ

If I turn off the Core Option Service and then do the above actions again, you will see the following result:

Questions Management - Implement Turbine Stream with RabbitMQ

As you can see the display on the Hystrix Dashboard, the call to get all the options are faulty. Based on this report, we will know which service is in need of taking action quickly so that our system will be stable again.

Đánh giá bài viết
Chia sẽ bài viết này ...Share on Facebook
Facebook
0Tweet about this on Twitter
Twitter
Share on LinkedIn
Linkedin

Add Comment