Skip to content

Commit

Permalink
updates rsocket to 1.1 and rsocket-rpc to 0.3 (#986)
Browse files Browse the repository at this point in the history
* updates rsocket and rsocket-rpc to the latest versions

* exclude rsocket from grpc tests

* use provided static factories for better readablity

Co-authored-by: Oleh Dokuka <shadowgun@i.ua>
  • Loading branch information
lanwen and OlegDokuka authored Jul 31, 2021
1 parent b09bf3b commit 9a5bb00
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,13 @@ configure(subprojects.findAll { !it.name.startsWith("examples/") }) {
mavenBom 'io.grpc:grpc-bom:1.23.1'
mavenBom 'com.google.protobuf:protobuf-bom:3.10.0'

mavenBom 'io.rsocket:rsocket-bom:1.0.1'
mavenBom 'io.rsocket:rsocket-bom:1.1.0'
}

dependencies {
dependency 'org.pf4j:pf4j:3.1.0'

dependencySet(group: 'io.rsocket.rpc', version: '0.2.19') {
dependencySet(group: 'io.rsocket.rpc', version: '0.3.0') {
entry 'rsocket-rpc-core'
entry 'rsocket-rpc-protobuf'
}
Expand Down
1 change: 0 additions & 1 deletion client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ dependencies {
api 'io.grpc:grpc-protobuf'
api 'com.salesforce.servicelibs:reactor-grpc-stub'
api 'io.rsocket.rpc:rsocket-rpc-core'

api 'io.rsocket:rsocket-transport-netty'
api 'io.grpc:grpc-netty'
api 'com.google.protobuf:protobuf-java-util'
Expand Down
5 changes: 4 additions & 1 deletion plugins/grpc-transport-auth/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ dependencies {
testRuntimeOnly 'io.netty:netty-tcnative-boringssl-static:2.0.25.Final'

testImplementation project(":tck")
testImplementation project(":client")
testImplementation (project(":client")) {
exclude group: 'io.rsocket.rpc', module: 'rsocket-rpc-core'
exclude group: 'io.rsocket', module: 'rsocket-transport-netty'
}
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.bouncycastle:bcpkix-jdk15on:1.66'
testImplementation project(":plugins:grpc-transport")
Expand Down
5 changes: 4 additions & 1 deletion plugins/rsocket-transport/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ dependencies {
compileOnly project(":app")

api 'io.rsocket.rpc:rsocket-rpc-core'
api 'io.rsocket:rsocket-transport-netty'
api ('io.rsocket:rsocket-transport-netty') {
exclude group: "io.projectreactor.netty", module: "reactor-netty-core"
exclude group: "io.projectreactor.netty", module: "reactor-netty-http"
}

testImplementation project(":app")
testImplementation 'org.springframework.boot:spring-boot-test'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
import com.github.bsideup.liiklus.transport.rsocket.RSocketServerConfigurer;
import com.github.bsideup.liiklus.util.PropertiesUtil;
import com.google.auto.service.AutoService;
import io.rsocket.SocketAcceptor;
import io.rsocket.core.RSocketServer;
import io.rsocket.rpc.rsocket.RequestHandlingRSocket;
import io.rsocket.ipc.RequestHandlingRSocket;
import io.rsocket.transport.netty.server.CloseableChannel;
import io.rsocket.transport.netty.server.TcpServerTransport;
import lombok.Data;
Expand Down Expand Up @@ -50,11 +51,10 @@ public void initialize(GenericApplicationContext applicationContext) {
var transport = TcpServerTransport.create(serverProperties.getHost(), serverProperties.getPort());

var liiklusService = applicationContext.getBean(LiiklusService.class);
var server = new LiiklusServiceServer(liiklusService, Optional.empty(), Optional.empty());
var requestHandlingRSocket = new RequestHandlingRSocket(server);
var server = new LiiklusServiceServer(liiklusService, Optional.empty(), Optional.empty(), Optional.empty());
var requestHandlingRSocket = new RequestHandlingRSocket().withEndpoint(server);

var rSocketServer = RSocketServer.create()
.acceptor((setup, sendingSocket) -> Mono.just(requestHandlingRSocket));
var rSocketServer = RSocketServer.create(SocketAcceptor.with(requestHandlingRSocket));

for (var configurer : applicationContext.getBeansOfType(RSocketServerConfigurer.class).values()) {
configurer.apply(rSocketServer);
Expand Down

0 comments on commit 9a5bb00

Please sign in to comment.