Notif is a distributed notification micro-service. Its build using Nats JetStream which serves as a distributed workQueue and consumes the event with a pull based consumer.The pull subscriber actually pulls event from stream which means its can be scaled horizontally very easily. The pull-subscriber fetch events in batchs which can be configured.
Notif also has instrumentation support for distributed tracing for observability which is key for async transactions using Open Telemetry, B3 as propagator, and Jaeger as exporter.
- a smtp server / enable smtp service on your email
- docker and go installed
git@github.com:sourikghosh/notif.git
cd notif
go mod downlaod
make js
make trace
make server
Currently the Mode of Notification is only email. Email is sent using go standard lib smtp package.
Notif does not provide a SMTP server it takes few required credentials to create a secured TLS smtp client connection if possible to send emails.
Email accept all possible content-type so you can send from beautiful htmls to basic plain/text. For examples refer to example
Notif currently only support rest endpoint to create notification events.
gRPC enpoints are coming soon.
curl --request POST \
--url http://localhost:6969/notif-svc/v1/create \
--header 'Content-Type: application/json' \
--data '{
"fromName":"Sourik Ghosh",
"toList":[
{
"emailAddr":"someemail@example.com",
"userName":"some one"
}
],
"subject":"This is the subject",
"body":"Hi someone, Have a great day !!!"
}'
Then navigate to Jaeger-UI