Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/mcruzdev/dapr-devservices


https://github.com/mcruzdev/dapr-devservices

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

# dapr-devservices

This repository aims to use and test Quarkus Dapr DevServices.

## Getting Started

1. Clone Quarkus Dapr Extension.

```shell
git clone [email protected]:mcruzdev/quarkus-dapr.git
```

2. Go to the `quarkus-dapr` repository.

```shell
cd quarkus-dapr
```

3. Go to `try-devservices` branch.

```shell
git checkout try-devservices
```

4. Install the extension.

```shell
mvn clean install
```

5. Clone this repository.

```shell
git clone [email protected]:mcruzdev/dapr-devservices.git
```

6. Go to the `dapr-devservices` repository.

7. Create the `dapr` network before creating Redis container.

```shell
docker network create dapr
```

8. Execute Redis container:

```shell
docker run --name redis --network dapr -d -p 6379:6379 redis --requirepass ""
```

1. Execute all services.

Subscriber:

```shell
cd subscriber && ./mvnw quarkus:dev
```

Writer:
```shell
cd writer && ./mvnw quarkus:dev
```

Reader:

```shell
cd reader && ./mvnw quarkus:dev
```

9. Testing the endpoint

- Creating a message

```shell
curl --request POST \
--url 'http://localhost:8081/messages?message=Hello' \
--header 'Content-Type: application/json' \
--header 'User-Agent: insomnia/8.5.1'
```

- Reading all messages

```shell
curl --request GET \
--url http://localhost:8082/messages \
--header 'User-Agent: insomnia/8.5.1'
```

- Seeing all messages received from PubSub

**You need to see the `subscriber` logs.**