spring-attic / zuul-server

Apache License 2.0
59 stars 62 forks source link

How to use Zuul retryable and ZuulFallbackProvider in Api gateway #7

Closed tomgithub2016 closed 7 years ago

tomgithub2016 commented 7 years ago

Hi, I want to use Zuul to Api Gateway service and use Zull retryable and fallback at zuul server but if I used spring boot's version is 1.4.3 the Zull retryable can not to used. If I changed spring boot's version to 1.4.0,same Application.properties, the Api gateway can retry success; So I guess this is a bug for spring cloud?

The other problem: I also want to use ZuulFallbackProvider to Zull server's fallback,but this class in spring-cloud-netflix-core version is 1.2.2

so If I want to use Zuul retryable and ZuulFallbackProvider at the same time but version is a problem.

Zuul retryable can success run in 1.4.0.RELEASE but can not use ZuulFallbackProvider ; ZuulFallbackProvider is in spring-cloud-netflix-core.jar version is 1.2.2 also required spring boot's version is 1.4.3. How to solve this problem? I want to user Zuul retryable and ZuulFallbackProvider in Api gateway.

org.springframework.boot spring-boot-starter-parent 1.4.3.RELEASE

Application.properties is: spring.application.name=api-gateway server.port=8000 eureka.client.serviceUrl.defaultZone=http://localhost:1111/eureka/

routes to serviceId

zuul.prefix=/api

zuul.routes.orderDetailService.path=/order/detail/** zuul.routes.orderDetailService.serviceId=orderDetailService zuul.routes.orderDetailService.retryable=true

hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds= 60000

ribbon.OkToRetryOnAllOperations=true ribbon.ReadTimeout=6000 ribbon.ConnectTimeout=6000 ribbon.MaxAutoRetries=3 ribbon.MaxAutoRetriesNextServer=3

spencergibb commented 7 years ago

Closing in favor of https://github.com/spring-cloud/spring-cloud-netflix/issues/1633. Please don't cross post.