Welcome to the Notification Microservice repository. This application is built with both JavaScript and Python and serves as a crucial component in a microservices architecture. It listens for messages from RabbitMQ sent by other microservices. Upon detection of a message, it schedules an EventBridge CRON event to invoke an AWS Lambda function. This function is responsible for sending notifications via Amazon Simple Notification Service (SNS) and Amazon Simple Email Service (SES).
Repository: notification
- RabbitMQ Listener: Monitors messages from RabbitMQ queues.
- EventBridge CRON Scheduling: Writes CRON events to AWS EventBridge.
- AWS Lambda Integration: Triggers a Lambda function to process notifications.
- Amazon SNS and SES: Utilizes SNS for notifications and SES for email delivery.
- Multi-Language Codebase: Combines JavaScript and Python for a versatile application setup.
These instructions will guide you through the process of setting up the Notification Microservice on your local machine for development and testing purposes.
- Node.js (for JavaScript execution)
- Python 3.8+ (for Python execution)
- AWS CLI (configured with the necessary permissions)
- RabbitMQ (accessible for the microservice to connect)
- AWS Lambda, Amazon SNS, and Amazon SES (set up and configured)
- Clone the repository:
git clone https://github.com/GreenHarbor/notification.git - Navigate to the project directory:
cd notification - Install JavaScript dependencies:
npm install - Install Python dependencies:
pip install -r requirements.txt
- Configure your environment variables to include your AWS credentials, RabbitMQ settings, and other necessary configurations.
- Ensure that the AWS services (Lambda, SNS, SES) are properly set up with the correct permissions and configurations.
- Start the listener script to begin monitoring RabbitMQ messages:
- When a message is received, the application will schedule an EventBridge CRON event.
- The CRON event triggers the AWS Lambda function, which then sends out notifications via SNS and emails via SES.
The service operates automatically once configured. Ensure that all connections to RabbitMQ and AWS services are correctly established.