zeguru/notify

By zeguru

Updated over 1 year ago

Notify is a service for sending SMS, Emails and Push notifications using a unified interface.

Image
Integration & delivery
Message queues
Developer tools
1

115

zeguru/notify repository overview

What is notify

  • Notify is a notification SaaS for sending SMS, Emails and Push notifications on your behalf. Delivers your alerts ad notifications to different service providers using a unified interface, out of the box.

  • Notify has been integrated with:

Feature3rd Party Provider
SMS

How to use the image

  • By default, the SPRING_PROFILES_ACTIVE environment variable is set to standalone. Other alternative modes to be availed soon are stateless, headless and saas.

  • You will need to create an account and generate the keys from the respective service providers. Set them to match corresponding environment variables at runtime:

Environment variableSource
infobip.keyInfobip
infobip.baseUrlInfobip
africastalking.usernameAfrica's Talking
africastalking.keyAfricas' Talking

Running notify in docker

  • Run the following command while passing in the necessary values:
docker run \
 -e SPRING_PROFILES_ACTIVE=standalone \
 -e africastalking.username=*username* \
 -e africastalking.key=*africas-talking-key* \
 -e infobip.key=*infopib-key* \
 -e infobip.baseUrl=*infobip-base-url* \
 --publish *host-port*:8008 notify:latest

NB: replace the values between asterisks(*) with actual values and remember to omit the asterisks(*) in your command.

Example:

i. Run with Africa's Talking alone

 docker run \
 -e SPRING_PROFILES_ACTIVE=standalone \
 -e africastalking.username=username \
 -e africastalking.key=atsk_blahblah \
 --publish 8080:8008 notify:alpha1

NB: to run with InfoBip alone remember to only include the infobip.key and infobip.baseUrl in your docker command.

Setting up notify

  • By default notify will use the NOP adapter to send SMS. This is a black hole, you do not want to use this
  • You can simply set the (one) provider you want to use. Alternatively you can have multiple providers and set the rules on when each should be used at runtime.
  • Notify comes bundled with a feature manager available at http://localhost:8080/notify/feature-flags
  • Navigate to the feature management console and toggle the desired SMS provider

Sending Notificatioons

    1. Sending an SMS:
curl -X 'POST' 'http://localhost:8080/notify/notify/send/message/' \
-H 'X-TENANT-ID: test-client' \
-H 'Content-Type: application/json' \
-d '{
    "text": "hello world",
    "recepient": "+254727442573",
    "message_id": "12221231"
    }'
  • Send SMS response: {"success":true,"msg":"Sent","data":infobip} //Successfully sent {"success":false,"msg":"Not Sent","data":nop} //Not sent

Resources

  • Swagger:

http://localhost:/notify/swagger-ui/index.html

  • Feature management admin console:

http://localhost:/notify/feature-flags/index

Metrics

Actuator
  • Notify uses spring-boot-actuator to monitor the application's health as well gather metrics relating to its performance. Below are examples of actuator endpoints that can be accessed via a GET request
EndpointDescription
/actuator/healthShow the application health status
/actuator/metricsDisplay performance metrics
Prometheus
  • Notify uses Prometheus to monitor the performance and health of the application

Tag summary

Content type

Image

Digest

sha256:f8934915d

Size

186.5 MB

Last updated

over 1 year ago

docker pull zeguru/notify:alpha1