springboot rsocket 2.2.0.RELEASE bug
huangshayang opened this issue · 4 comments
@Controller
public class ServerController {
@MessageMapping(value = "market")
public MarketResponse getMarket(Market market) {
return new MarketResponse(market.getName());
}
}
@RestController
public class ConsumerController {
private final RSocketRequester rSocketRequester;
public ConsumerController(RSocketRequester rSocketRequester) {
this.rSocketRequester = rSocketRequester;
}
@GetMapping(path = "/market/{name}")
public Publisher<MarketResponse> getMarket(@PathVariable String name) {
return rSocketRequester.route("market").data(new Market(name)).retrieveMono(MarketResponse.class);
}
}
java.lang.IllegalArgumentException: No decoder for com.example.rsocketclient.MarketResponse
at org.springframework.messaging.rsocket.RSocketStrategies.decoder(RSocketStrategies.java:92) ~[spring-messaging-5.2.0.RELEASE.jar:5.2.0.RELEASE]
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Error has been observed at the following site(s):
|_ checkpoint ⇢ HTTP GET "/market/test" [ExceptionHandlingWebHandler]
@Data
public class MarketResponse {
private String res;
public MarketResponse(String res) {
this.marketResponse("Hello" + res + Instant.now());
}
private MarketResponse marketResponse(String res) {
this.res = res;
return this;
}
}
@huangshayang I see you’ve also raised the same issue on the Spring Framework issue tracker. Please do not cross-post bug reports as it means two different team members can end up duplicating effort
I use the Spring rsocket 2.6.3 and the mongo gridfs for backend and the rsocket.js in browser .
At first The spring works properly in requestchannel mode , but after version 2.5 of the spring boot not works properly .
for uploading first media has been broken to many chunks . per chunk has 8kb size then i send per chunk by Flowable . the first chunk has been sent by the javascript and backend receive it , but the second chunk has not been received by the spring . this problem has been created after version 2.5 of the spring