Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 809 Bytes

README.md

File metadata and controls

22 lines (16 loc) · 809 Bytes

natsdedup example project

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.

How to run

Prerequisites:

  • docker
  • docker-compose
  • go

Start a nats server

docker-compose up -d

Start example app

go run main.go