This project is a robust backend system designed to handle real-time stock price notifications. The system is built using Java Spring Boot and MySQL and integrates with the Alpha Vantage API to fetch intraday stock data, ensuring accurate and timely information for various stock symbols. Users can subscribe to and unsubscribe from stock symbols, receiving personalized notifications.
- Real-Time Stock Data: Integrated with the Alpha Vantage API to fetch intraday stock prices for various stock symbols.
- Subscription Management: Users can subscribe to and unsubscribe from specific stock symbols, receiving personalized notifications based on their preferences.
- Efficient Notification System: Utilized Redis to manage notification frequencies, ensuring no duplicate notifications are sent within an hour.
- Event-Driven Architecture: Built a mechanism to listen for price changes and trigger notifications to subscribed users efficiently.
- Scalable and Fault-Tolerant: Implemented using Kafka to ensure reliable and scalable message brokering for notifications.
- Backend: Java, Spring Boot
- Database: MySQL
- Caching: Redis
- Message Brokering: Kafka
- API Integration: Alpha Vantage API
- Java 8 or higher
- Maven
- MySQL
- Redis
- Kafka
- Alpha Vantage API Key
-
Clone the repository:
git clone https://github.com/yourusername/stock-price-notification.git cd stock-price-notification -
Configure the application:
- Update the
application.propertiesfile with your MySQL, Redis, Kafka configurations, and Alpha Vantage API key.
- Update the
-
Build the project:
mvn clean install
-
Run the application:
mvn spring-boot:run
-
Subscribe to a Stock Symbol:
- Use the
/subscribeendpoint to subscribe to a stock symbol.
- Use the
-
Unsubscribe from a Stock Symbol:
- Use the
/unsubscribeendpoint to unsubscribe from a stock symbol.
- Use the
-
Receive Notifications:
- Notifications will be triggered and sent based on price changes for subscribed stock symbols.
- Author: Danish Sarwar
- Email: danish.sharwar@gmail.com