Open spencergibb opened 4 years ago
@FWinkler79 said: Just to add: I tried a little more, and can now confirm that this really an issue and not just "not nice".
The exception / underlying problem breaks communication between services via the gateway.
In my setup I am using a WebFlux endpoint that translates the POST request into an RSocket request sent via the gateway to another RSocket service. As a result, (with Spring Cloud Bus on the classpath) the exception given above will be thrown.
Here is an additional sample, that shows that setup.
To reproduce:
service-gateway
reservation-service
<-- throws exceptionreservation-service-client
<-- throws exception as wellPOST
request to http://localhost:6666/reservation/create/Spencer with empty body.To fix reservation-service
, comment out the following dependency:
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-bus</artifactId>
</dependency>
To fix reservation-service-client
, you even need to comment out more:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-stream-binder-rabbit</artifactId>
</dependency>
So maybe it actually has something to do with the stream binder? Not sure.
Even with "fixed" services, the gateway throws an exception, though. I will open another issue for that. Hope that helps in the analysis.
@FWinkler79 said: I am using ... Spring Boot: 2.2.0.RELEASE Spring Cloud: Hoxton.BUILD-SNAPSHOT Sample project: here
The
service-gateway
uses Spring Cloud Gateway with RSocket support andreservation-service-client
is an application that acts as a client to the (RSocket Broker) Gateway. In my production setup, ?reservation-service-client
gets its configurations from a Spring Cloud config-server and config updates via Rabbit MQ and Spring Cloud Bus (which is why I need Spring Cloud Bus on the classpath).Problem is: as soon as Spring Cloud Bus is on the classpath, I receive an Exception at startup of
reservation-service-client
which looks as follows:This only occurs, if the following dependency is declared:
I am not sure, this exception is actually a problem but it's certainly not nice.
To reproduce:
service-gateway
reservation-service-client
spring-cloud-bus
dependency inreservation-service-client/pom.xml
and start again,