See https://github.com/spring-cloud/spring-cloud-gateway/issues/580#issuecomment-509462611 for project to reproduce.
The problem is that the routeId is null and the event is never published to cache the body.
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
Most helpful comment
To work around the problem, you need to add
routeIdto the retry configuration. It must match the routeId.