Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/daggerok/reactive-spring-k8s

Test tcp, websocket and http reactive traffic other k8s network...
https://github.com/daggerok/reactive-spring-k8s

k8s r2dbc reactive rsocket skaffold spring webflux

Last synced: 15 days ago
JSON representation

Test tcp, websocket and http reactive traffic other k8s network...

Awesome Lists containing this project

README

        

# reactive-spring-k8s
Test tcp, websocket and http reactive traffic other k8s network...

## build, run and test locally

```bash
./mvnw clean package
java -jar ./r-socket-r2dbc/target/*.jar &
java -jar ./r-socket-websocket/target/*.jar &
java -jar ./r-socket-webflux/target/*.jar &
# wait for ports: 8001 8002 8080
http --stream :8080/stream-messages &
http :8080/find-messages
http :8080/save-message sender=Max body=ololo
http :8080/save-message sender=Max body=trololo
# stop any ports: 8001 8002 8080
```

## jib

```bash
./mvnw package jib:dockerBuild
docker run --rm -d --name r2dbc daggerok/reactive-spring-k8s-r-socket-r2dbc
docker run --rm -d --name websocket -e R2DBC_HOST=r2dbc daggerok/reactive-spring-k8s-r-socket-websocket
docker run --rm -d --name webflux -e WEBSOCKET_HOST=websocket -p 8080:8080 daggerok/reactive-spring-k8s-r-socket-webflux
# wait a little bit..
http --stream :8080/stream-messages &
http :8080/find-messages
http :8080/save-message sender=Max body=ololo
http :8080/save-message sender=Max body=trololo
# stop
docker rm -f -v r2dbc websocket webflux
```

## skaffold

```bash
kubectl apply -f k8s/
skaffold dev --cache-artifacts=false
# wait...
http --stream :30080/stream-messages &
http :30080/find-messages
http :30080/save-message sender=Max body=ololo
http :30080/save-message sender=Max body=trololo
# ctrl+c
```

## finally update versions

```bash
./mvnw build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false
```