This project is an example application that uses the natsdedup
Go package from claudiunicolaa.
This example Go app demonstrates NATS server usage with deduplication. It connects to a NATS server, initializes a deduplicator for message processing, and creates a list of data items. It then publishes these items to a NATS subject, while a separate goroutine subscribes to another subject to receive and store these items. In the end, ensures items are not duplicated during transmission, checking that all sent items are correctly received without loss or duplication.
Prerequisites:
- docker
- docker-compose
- go
Start a nats server
docker-compose up -d
Start example app
go run main.go