Minimalistic proof of concept for event-driven architecture (EDA) using NATS
- Showcase pub-sub messaging trough NATS broker
- Showcase pub-sub messaging with security mechanisms using TLS for encryption and authentication through a NATS broker
- Ramp up local Docker Compose cluster:
docker-compose up -d --build
- Launch the subscriber application in a terminal process:
cd subscribers/Mgtt.MinimalisticSubscriber
dotnet run
- Initiate the publisher application in a separate terminal process:
cd publishers/Mgtt.MinimalisticPublisher
dotnet run
- Observe that the subscriber successfully receives the submitted event. Results should resemble the following:
- Terminate the subscriber application by pressing any key and remove resources of the local Docker Compose cluster:
docker-compose down -v
-
Renew cryptographic material (self signed certs and private keys) as outlined in the README.md if necessary due to expiration
-
Ramp up local Docker Compose cluster:
docker-compose -f docker-compose.nats-with-tls-and-auth.yml up -d --build
The logs within the Docker container should appear similar to the following:
- Launch the subscriber application in a terminal process:
cd subscribers/Mgtt.SubscriberWithTlsAndAuth
dotnet run
- Initiate the publisher application in a separate terminal process:
cd publishers/Mgtt.PublisherWithTlsAndAuth
dotnet run
- Observe that the subscriber successfully receives the submitted event. Results should resemble the following:
- Terminate the subscriber application by pressing any key and remove resources of the local Docker Compose cluster:
docker-compose -f docker-compose.nats-with-tls-and-auth.yml down -v