- inspired by
https://spring.io/guides/gs/routing-and-filtering/
- and developed reading
spring micro service in action
gradle
project has 4 modulescommon
a library with common part necessary to everymicroservice
of the project.gateway
useZul
to addcorrelationId
to every request.-
provide routing rules, so other
microservice
are accessed through it, and the correlation ID is then added. -
default port:
8080
-
book
samplemicroservice
withbook/available
andbook/checked-out
rest endpoint.- default port:
8090
- default port:
-
zipkinServer: default port is
9411
, should be started first, else lot of exception in app
-
direct access: http://localhost:8090/available access through gateway: http://localhost:8080/books/available
-
correlation id is set as the header:
tmx-correlation-id
of the request forwarded fromgateway
tobook
:RequestFilter
-
it is also added in the header of the response by the
gateway
:ResponseFilter
-
!!! Playing with ZipKin is now working, from 1 call to the
gateway
, I can see the trace up to thebook
application