Created
May 7, 2022 14:25
-
-
Save ahndmal/60462ab1bbda7c5b04e65e2901c1e2c6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component | |
public record RClient() { | |
@EventListener(ApplicationReadyEvent.class) | |
public void ready() { | |
var source = RSocketConnector.create() | |
.reconnect(Retry.backoff(50, Duration.ofMillis(500)))// | |
.connect(TcpClientTransport.create("localhost", 7766)); | |
RSocketClient.from(source).fireAndForget(Mono.just(DefaultPayload.create("Reactive Spring!"))).block(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment