question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not able to communicate from Java Standalone client to SpringBoot enabled Rsocket server

See original GitHub issue

I have an instance of Rsocket server(responder) and it works perfectly fine when I write a requester snippet out of a springboot API exposed client. The connection to the server is being established using ` private final RSocketRequester rSocketRequester;

public CustomerServiceAdapter(RSocketRequester.Builder rsocketRequesterBuilder) {
	this.rSocketRequester = rsocketRequesterBuilder
			.connectTcp("localhost", 7000).block();

}`

This works perfectly when invoked using the rsc.jar and command line invocation. However, when I try to invoke using a standalone Java client as a requester, there are some issues .The client instance obtained by using RSocket client = RSocketFactory.connect() .transport(TcpClientTransport.create(7000)) .start() .block(); RSocketFactory is not able to invoke the server . It connects but an exception with _

MonoIgnoreThen

_ is returned on the client side and the responder server does not listen to the controller mapping and simply java.nio.channels.ClosedChannelException is thrown.

Any help would help.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dushdushyantcommented, Apr 1, 2020

Hi Oleg,

Thanks for a prompt reply, As described above, I have put my code in git.

https://github.com/dushdushyant/rsocket-server/blob/master/src/main/java/io/pivotal/rsocketserver/RSocketController.java This is the responder server for RSocket Server and this works fine when tested over the rsc.jar file or another springboot requestor.

The issue is in this code , https://github.com/dushdushyant/rsocket-rnd/blob/master/src/main/java/com/rnd/SampleRScoketClient.java. This is the requestor code which is trying to create a connection to the Rsocket and invoke a simple message mapping.

Thanks and Regards, Dushyant

0reactions
makingcommented, Apr 3, 2020

@dushdushyant Here is my example from vanilla rsocket client to spring boot rsocket server. Hope this helps you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error while connecting to Spring Boot RSocket server from ...
I am not using RSocketRequester on client side. The issue is when I put metadata (for routing, here "socket" is route @MessageMapping on...
Read more >
Reactive Programming with RSocket and Spring Boot - Medium
Figure 1 Communication models in RSocket protocol. In the Fire-and-Forget pattern, a client sends one message and expect no response from the server....
Read more >
Getting Started With RSocket: Spring Boot Server
The RSocket server controller code can be found in the RSocketController.java file. This class is annotated as a Spring @Controller which ...
Read more >
Using Spring Boot for WebSocket Implementation with STOMP
Let's look at how to implement WebSockets with the Spring Boot framework, and use STOMP for effective client-server communication.
Read more >
Tutorial: Reactive Spring Boot Part 9 – Java RSocket Client
In this lesson we add an RSocket client that can talk to the RSocket server we created in the last lesson. This is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found