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

https://github.com/daggerok/spring-cloud-function-stream-integration

This example was prepared for one of my stackoverflow question: Functional programming model bean definition and spring-cloud-function + spring-cloud-stream integration https://stackoverflow.com/questions/56517391/functional-programming-model-bean-definition-and-spring-cloud-function-spring
https://github.com/daggerok/spring-cloud-function-stream-integration

docker httpie pip3 rabbitmq reactor spring-cloud-function spring-cloud-stream spring-cloud-stream-binder-rabbit spring-cloud-stream-rabbitmq spring-cloud-stream-reactive spring-webflux webflux

Last synced: about 2 months ago
JSON representation

This example was prepared for one of my stackoverflow question: Functional programming model bean definition and spring-cloud-function + spring-cloud-stream integration https://stackoverflow.com/questions/56517391/functional-programming-model-bean-definition-and-spring-cloud-function-spring

Awesome Lists containing this project

README

          

# spring-cloud-function-stream-integration [![CI](https://github.com/daggerok/spring-cloud-function-stream-integration/actions/workflows/ci.yaml/badge.svg)](https://github.com/daggerok/spring-cloud-function-stream-integration/actions/workflows/ci.yaml)

This example was prepared for one of my [stackoverflow question: Functional programming model bean definition and spring-cloud-function + spring-cloud-stream integration](https://stackoverflow.com/questions/56517391/functional-programming-model-bean-definition-and-spring-cloud-function-spring)

```bash
docker run -d --rm --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3.7.15-management-alpine
./mvnw spring-boot:start

http :8080 string=1
http :8080 string=2
http :8080 string=0
# or
http :8080/process string=1
http :8080/process string=2
http :8080/process string=0

# and
echo '[0,1,1,2,3,5,8,13,21,34,55]' | http :8080/doubleIt
# or
curl -isS 0:8080/doubleIt -d '[0,1,1,2,3,5,8,13,21,34,55]' -H'Content-Type:application/json' ; echo

# and
echo 3 | http post :8080/produceIt
# or
curl -isS 0:8080/produceIt -d 3 -H'Content-Type:application/json' ; echo

# and
echo '{"integer":-123}' | http post :8080/logIt
# or
curl -isS 0:8080/logIt -d '{"integer":-123}' -H'Content-Type:application/json' ; echo

./mvnw spring-boot:stop
docker stop rabbitmq
```

## RTFM
* https://github.com/spring-cloud/spring-cloud-stream/blob/main/docs/src/main/asciidoc/spring-cloud-stream.adoc#sending-arbitrary-data-to-an-output-e-g-foreign-event-driven-sources