Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

retry POST is not working #1160

Closed
spencergibb opened this issue Jul 10, 2019 · 1 comment

Comments

@spencergibb
Copy link
Member

commented Jul 10, 2019

See #580 (comment) for project to reproduce.

The problem is that the routeId is null and the event is never published to cache the body.

if (routeId != null && getPublisher() != null) {
// send an event to enable caching
getPublisher().publishEvent(new EnableBodyCachingEvent(this, routeId));
}

@spencergibb spencergibb added the bug label Jul 10, 2019

@spencergibb spencergibb added this to the 2.1.3.RELEASE milestone Jul 10, 2019

@spencergibb spencergibb self-assigned this Jul 10, 2019

@spencergibb spencergibb added this to To do in Hoxton.M2 via automation Jul 10, 2019

@spencergibb spencergibb added this to To do in Greenwich.SR3 via automation Jul 10, 2019

@spencergibb

This comment has been minimized.

Copy link
Member Author

commented Jul 10, 2019

To work around the problem, you need to add routeId to the retry configuration. It must match the routeId.

spring:
  cloud:
    gateway:
      routes:
      - id: greeting-service
        uri: lb://greeting-service
        predicates:
        - Path=/greeting-service/**
        filters:
        - name: RewritePath
          args:
            regexp: /greeting-service/(?<path>.*)
            replacement: /$\{path}
        - name: Retry
          args:
            routeId: greeting-service
            methods: GET,POST

Hoxton.M2 automation moved this from To do to Done Jul 10, 2019

Greenwich.SR3 automation moved this from To do to Done Jul 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
1 participant
You can’t perform that action at this time.