spring-cloud / spring-cloud-netflix

Integration with Netflix OSS components
http://cloud.spring.io/spring-cloud-netflix/
Apache License 2.0
4.85k stars 2.43k forks source link

Hello All, #4241

Closed anjali090600 closed 5 months ago

anjali090600 commented 5 months ago

hello all, Need help !!!

i want to set timeout for 2 gateway api for 1 api = 60s and 2 api = 120s using hystrix , zuul i want to set timeout for api and when i hit the api through postman once timeout time is completed it will give 500 error how can i set in configuration file

zuul: sensitiveHeaders: Cookie,Set-Cookie routes:

employeeService:
  path: /api/employeeService/**
  url: http://localhost:8660/he-la-employee/

echo:
  path : /api/employeeService/**
  url: http://localhost:8680/he-la-employee/
  serviceID: underwritingService
  stripPrefix: true

hystrix: command: employeeService: execution: isolation: thread: timeoutInMilliseconds: 20000

employeeService: ribbon: ConnectTimeout: 200000

i set for 1 api but it is not working when i hit api through the postman

OlgaMaciaszek commented 5 months ago

Hello @anjali090600, thanks for reporting the issue. Please learn how to properly format code and logs.

Since you commented on an issue in Spring Cloud Gateway, I thought that that's what your problem was related to. When it comes to Spring Cloud Netflix Zuul, Spring Cloud Netflix Ribbon, and Spring Cloud Netflix Hystrix, these projects have been out of support for a very long time. Please do not use them, as it'll make your app prone to security issues. We recommend using Spring Cloud Gateway, Spring Cloud LoadBalancer and Spring Cloud CircuitBreaker + Resilience4J instead?