Thank you for covering everything needed with such simple and clear explanation! Helped me a lot to understand everything under microservices, never found any course as simple as this one.
@@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?
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
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?
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
hi sir , i begin learning of your course , so i dont know begin with chapter ? . I see two course in spring microservice . one of it is project example . please reply me
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 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
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.
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
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
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.
Thank you for covering everything needed with such simple and clear explanation! Helped me a lot to understand everything under microservices, never found any course as simple as this one.
Thanks! wonderful tutorial... keep up the good work
Thank you
Thanks bro! your tutorial are simple to follow and cover what its needed!
Thank you for this amazing video
Thanks for the wonderful tuorial .
Great tutorial 👌 easy to follow keepnthe good work
Very useful
I love your videos. Well done!
Thank you for these amazing tutorials. Can you please add a video demonstrating the deployment process for microservices?
i second this. at the end lets deploy this app using say docker, kubernetes
Yes please🙏🙏
It's already in plan to integrate the project to Kubernetes.
Thank you so much :) _/\_ Highly appreciated!
Thanks, bro! You can share videos about managing transactions in a microservice system.
Thank you for this tutorial!
but i am facing an issue right now TimeLimiter is not throwing the TimeoutException
Programming Techie any idea why?
ive been doing CB stuff on service, i moved all to controler and there it throws exception for timelimiter :)
@@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?
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
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?
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
@@osasereuhunmwangho5293 I'm also having the same problem. Can you show me your code on handling this problem?
hi sir , i begin learning of your course , so i dont know begin with chapter ? . I see two course in spring microservice . one of it is project example . please reply me
why didn't the fallback work when timeout was thrown?
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)
Yes you can also implement it in the gateway
@@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
Thank you 🙏
When you will share the next part ? Haha 😁
On Tuesday :)
I appreciate what you do for us
@@ProgrammingTechie Please tell on how to add junit test case for fallback method
Circuit Breaker annotation doesn't work for java 1.8
but why ?
Is it just me or orderRepository still saves order after timeout?
Yeah me too. And I don't understand why
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.
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
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
Please cross check the code against the GitHub repo
@@ProgrammingTechie Hi! yes i double check with the repo and the problem persist.
If you are using Gateway and service to service communication should be done through gateway, I believe
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.
next video please