It's a Store And Forward API built with Springboot/Webflux and MongoDb to send out notifications.
* Fully reactive
* Centralizes your notification requirements
* Send emails/sms/chats by calling a rest endpoint
* Add your own Email/SMS providers by implementing the Notifier Interface
* Configure blackouts - WIP
* Send bulk notifications
* Can store the notifications to a DB (mongodb/cassandra) before sending it
* Register a notification template and pass dynamic data to it via Freemarker
* Locale aware
* Generate and send pdf attachments(via FlyingSaucer/Openpdf)
* Generate and send html attachments (via Freemarker)
* Download from a url and send attachments
* Retry the failed notifications via multiple fallback providers
* Call webhooks on any failure/success (WIP)
* Audit the notifications.
* Easily extendable, so one can change any part of the system as required
* OpenTracing (Jaegar) integrated
* Prometheus metrics (WIP)
* SendMail/Mailgun for emails
* Twilio (WIP)
I can easily send all my notifications via Sendgrid/Mailgun, why do I need Communik? Well some reasons:
* Take control of your templates. For example, if I need to move to sendgrid from mailgun, I don't need to transfer the templates
* If I need to retry with a different provider, I dont need to worry about replicating the templates
* One API for all your notification needs across your systems.
Run the springboot application Communik
If you want to store the messages, a mongoDb cluster or cassandra is required
Go to the root of the project directory build and test the projects
$ ./gradlew
To run the communik application
$ ./gradlew run
$ ./gradlew test
TODO docker
- Springboot - The microservices framework
- Reactor - The reactive framework used
- Gradle - Dependency Management
- MongoDb - To store the notifications
- Mapstruct - To map the POJOs
- Springfox - To documentation
- FlyingSaucer - To generate pdf attachments
- Lombok - To do some magic!
- Freemarker - Template Engine
- OpenTracing - Distributed Tracing Specs
- Jaegar - Distributed Tracing Impl
- Seige - To run benchmark
- Wiremock - To run mock servers
- www.ascii-art-generator.org - To create the banner
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
- Code Tripper - Initial work - Code Tripper
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details
- Hat tip to anyone whose code was used
- Inspiration
- etc
Application Config
- dummyEmailer running in 200ms delay
- Log in INFO mode
- Heap size -xmx2G -xms2G
Running
- Use siege - details in seige/howto.txt
- JConsole to view threads and Heap
- Run with 20 concurrent requests and repeat 10 times
Results:
1. Transactions - 200
2. Elapsed Time - 17.2 secs
3. (Avg) Response Time - 1.63 secs (Lower the better)
4. Transaction Rate - 11.61 tps (Higher the better)
5. Threads - 31 (Should be always 31)
6. Heap - 250 MB