Spring Boot Microservices Project Example - Part 6 | Resilience4J Circuit Breaker

  Рет қаралды 38,165

Programming Techie

Programming Techie

2 жыл бұрын

Spring Boot Microservices Project Example - Part 6 | Resilience4J Circuit Breaker
Source Code
github.com/SaiUpadhyayula/spr...
⭐️⭐️ You can follow me on Social Media through the below Links⭐️⭐️
Twitter: / sai90_u
Blog: programmingtechie.com/
Dev.to: dev.to/saiupadhyayula
Facebook Page: / programmingtechie

Пікірлер: 44
@defrankline
@defrankline 2 жыл бұрын
Thanks bro! your tutorial are simple to follow and cover what its needed!
@toto_frs620
@toto_frs620 2 жыл бұрын
I love your videos. Well done!
@diggydavro1588
@diggydavro1588 2 жыл бұрын
Great tutorial 👌 easy to follow keepnthe good work
@vaishnavepranav7394
@vaishnavepranav7394 10 ай бұрын
Thanks for the wonderful tuorial .
@hoangtv3949
@hoangtv3949 2 жыл бұрын
Very useful
@user-cf7bi1tx1h
@user-cf7bi1tx1h 3 ай бұрын
Thank you so much :) _/\_ Highly appreciated!
@vietnguyenba4680
@vietnguyenba4680 2 жыл бұрын
Thanks, bro! You can share videos about managing transactions in a microservice system.
@adityamankar9543
@adityamankar9543 2 жыл бұрын
Thank you for these amazing tutorials. Can you please add a video demonstrating the deployment process for microservices?
@defrankline
@defrankline 2 жыл бұрын
i second this. at the end lets deploy this app using say docker, kubernetes
@deanclancy6448
@deanclancy6448 2 жыл бұрын
Yes please🙏🙏
@ProgrammingTechie
@ProgrammingTechie 2 жыл бұрын
It's already in plan to integrate the project to Kubernetes.
@exploreWorldMe1984
@exploreWorldMe1984 6 ай бұрын
Thanks! wonderful tutorial... keep up the good work
@ProgrammingTechie
@ProgrammingTechie 6 ай бұрын
Thank you
@az910
@az910 2 жыл бұрын
Thank you 🙏 When you will share the next part ? Haha 😁
@ProgrammingTechie
@ProgrammingTechie 2 жыл бұрын
On Tuesday :)
@az910
@az910 2 жыл бұрын
I appreciate what you do for us
@manojkumar8358
@manojkumar8358 Жыл бұрын
@@ProgrammingTechie Please tell on how to add junit test case for fallback method
@osasereuhunmwangho5293
@osasereuhunmwangho5293 11 ай бұрын
Hello Programming Techie. I am facing an issue with the time-out exception. I want to keep the logic stuff in the service and the controller stuff strictly in the controller. Do I have to move my logic to the controller before a time-limiter exception is thrown? I don't think so. The annotations i.e. CircuitBreaker, TimeLimiter are in the service layer. I am returning a type of CompletableFuture in the service layer also. The controller attached to it is also returning a type of CompletableFuture. The error observed when I run in postman is that, TimeLimiter annotation ought to return a type of CompletionStage which means the service should have a return type of CompletionStage instead of CompletableFuture. Once this is done, I have tried using a return type of CompletionStage in the controller too. On the other hand, I have used a return type of CompletableFuture and I simply cast the response of the service to CompletionStage. Either way, the time-out exception is not being thrown when I try to send in Postman. All it does is wait for as long as the thread.sleep is set in the inventory service. After which, the order is then successfully placed. Please what is the way around it?
@osasereuhunmwangho5293
@osasereuhunmwangho5293 11 ай бұрын
I have found a way around it. I simply moved the @TimeLimter annotation to the controller. The circuit breaker annotation remains in the service. The service returns a type of String while the controller returns a CompletableFuture
@NoOne-mg6ti
@NoOne-mg6ti 3 ай бұрын
@@osasereuhunmwangho5293 I'm also having the same problem. Can you show me your code on handling this problem?
@yogeez123
@yogeez123 Жыл бұрын
If you are using Gateway and service to service communication should be done through gateway, I believe
@ProgrammingTechie
@ProgrammingTechie Жыл бұрын
Gateway acts as an entrypoint of a request into our system, from there the request is routed through other services, internal service to service communication is not done through API Gateway.
@nonamespls3468
@nonamespls3468 4 ай бұрын
why didn't the fallback work when timeout was thrown?
@kevinm.1597
@kevinm.1597 Жыл бұрын
Thank you for this tutorial! but i am facing an issue right now TimeLimiter is not throwing the TimeoutException
@KK-wu2fq
@KK-wu2fq Жыл бұрын
Programming Techie any idea why?
@KK-wu2fq
@KK-wu2fq Жыл бұрын
ive been doing CB stuff on service, i moved all to controler and there it throws exception for timelimiter :)
@osasereuhunmwangho5293
@osasereuhunmwangho5293 11 ай бұрын
@@KK-wu2fqHello. I am facing the same issue. I want to keep the logic stuff in the service and the controller stuff strictly in the controller. Do i have to move my logic to the controller before a timelimiter exception is thrown. Did you find a way around it?
@osasereuhunmwangho5293
@osasereuhunmwangho5293 11 ай бұрын
I have found a way around it. I simply moved the @TimeLimter annotation to the controller. The circuit breaker annotation remains in the service. The service returns a type of String while the controller returns a CompletableFuture
@razataggarwal7365
@razataggarwal7365 Жыл бұрын
Circuit Breaker annotation doesn't work for java 1.8 but why ?
@abhinandankumar4255
@abhinandankumar4255 2 жыл бұрын
next video please
@QuickInterviewPrep
@QuickInterviewPrep 4 ай бұрын
Great tutorial :). can we implement circuit breaker in gateway? Or As my UI is calling gateway and gateway is calling my service, should i implement in UI(say react)
@ProgrammingTechie
@ProgrammingTechie 4 ай бұрын
Yes you can also implement it in the gateway
@QuickInterviewPrep
@QuickInterviewPrep 4 ай бұрын
@@ProgrammingTechie Not sure if we can implement it in gateway as gateway is just routing not making rest call. Did i understand correctly? In your example you implemented it method that is calling rest endpoint
@ognjenbarovic1756
@ognjenbarovic1756 Жыл бұрын
Is it just me or orderRepository still saves order after timeout?
@baranemreturkmen9497
@baranemreturkmen9497 Жыл бұрын
Yeah me too. And I don't understand why
@baranemreturkmen9497
@baranemreturkmen9497 Жыл бұрын
In my problem I relaized that I didn't invoke my placeOrder method which in OrderService class, with resilience4j time limiter. Maybe you did same mistake with me.
@aamirshaikh1389
@aamirshaikh1389 3 ай бұрын
I'm currently dealing with a similar problem, and I'd appreciate it if you could share more details on how you resolved the issue? @@baranemreturkmen9497
@bautistaquesada4436
@bautistaquesada4436 2 ай бұрын
Hey! can someone help me please im having this issue An expected CSRF token cannot be found, when im trying to do a post in localhost:8080/api/order, i dont know how to solve it my application.properties of my discovery server is the same as the video. so i dont understand what is happening
@ProgrammingTechie
@ProgrammingTechie 2 ай бұрын
Please cross check the code against the GitHub repo
@bautistaquesada4436
@bautistaquesada4436 Ай бұрын
@@ProgrammingTechie Hi! yes i double check with the repo and the problem persist.
@user-lz7wx7dg5f
@user-lz7wx7dg5f 5 ай бұрын
My status always shows closed. never Open or even half open. Not sure why
@king0s
@king0s 4 ай бұрын
Bring the other service down?
@vishalwagh478
@vishalwagh478 4 ай бұрын
I too have a similar problem. Because the circuit breaker was not registering itself. Hence I changed the resilience4j.circuitbreaker.instances.inventory.registerHealthIndicator => resilience4j.circuitbreaker.instances.default.registerHealthIndicator Hence even though inventory was down, the circuit breaker was not identified & state was in OPEN state only. After reverting back to circuit status was started reflecting correctly.
Spring Boot Microservices Project Example - Part 7 | Distributed Tracing
18:38
Spring Boot Microservices Project Example - Part 5 | Security
30:13
Programming Techie
Рет қаралды 60 М.
버블티로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 76 МЛН
Дибала против вратаря Легенды
00:33
Mr. Oleynik
Рет қаралды 3,6 МЛН
Контейнеризация приложений - Spring Boot
58:52
Уголок сельского джависта
Рет қаралды 7 М.
Microservices using SpringBoot | Full Example
1:21:39
Daily Code Buffer
Рет қаралды 1 МЛН