Overview
This guide walks through setting up Argos Mesh for local development. You’ll learn how to run services individually, build from source, and configure your development environment.For running the complete stack, see Docker Compose Deployment.
Prerequisites
Required Software
Java Development Kit 21
Argos Mesh uses Java 21 features including Virtual Threads.Install on Linux/macOS:Verify installation:
Apache Maven 3.9+
Build tool for Spring Boot applications.Install on Linux/macOS:Verify installation:
Docker & Docker Compose
Required for running PostgreSQL, RabbitMQ, and Redis locally.Install Docker Desktop:
- macOS/Windows: Docker Desktop
- Linux: Docker Engine
Optional Tools
- IDE: IntelliJ IDEA, VS Code with Java extensions, or Eclipse
- Database Client: DBeaver, pgAdmin, or psql CLI
- API Testing: Postman, Insomnia, or curl
- Redis Client: RedisInsight or redis-cli
Project Structure
Quick Start: Full Stack
Start Infrastructure Services
Start PostgreSQL, RabbitMQ, and Redis using Docker Compose:Verify services are running:
Service-by-Service Setup
Orders Service (Main Application)
Orders Service Configuration
Orders Service Configuration
Technology Stack:Run the Service:The Orders API will be available at: http://localhost:8080Environment Variables:You can override default configuration:
- Spring Boot 4.0.3
- Spring Data JPA (PostgreSQL)
- Spring Data Redis
- Spring AMQP (RabbitMQ)
- Spring Web MVC
- MapStruct for DTO mapping
- Lombok
Sentinel Service (DDoS Protection)
Sentinel Service Configuration
Sentinel Service Configuration
Technology Stack:Run the Service:Environment Variables:
- Spring Boot 4.0.3
- Spring AMQP (RabbitMQ consumer/publisher)
- Spring Data Redis (blacklist storage)
- Java 21 Virtual Threads
- Jackson for JSON serialization
- Monitors request patterns for DDoS attacks
- Uses Redis to maintain IP blacklist
- Publishes alerts to RabbitMQ
- High concurrency with Virtual Threads
Sentinel requires RabbitMQ and Redis to be running before it starts.
Notify Service (Alert Worker)
Notify Service Configuration
Notify Service Configuration
Technology Stack:Run the Service:Environment Variables:
- Spring Boot 4.0.3
- Spring AMQP (RabbitMQ consumer)
- Jackson for JSON deserialization
- Consumes alert messages from RabbitMQ
- Sends notifications for security events
- Headless worker service (no HTTP endpoints)
Infrastructure Services
PostgreSQL Database
PostgreSQL Setup
PostgreSQL Setup
Start PostgreSQL:Connection Details:Common psql Commands:JDBC Connection String:
- Host: localhost
- Port: 5432
- Database: shop_db
- Username: user_shop
- Password: secretPassword
RabbitMQ Message Broker
RabbitMQ Setup
RabbitMQ Setup
Start RabbitMQ:Connection Details:
- AMQP Port: 5672
- Management UI: http://localhost:15672
- Username: admin
- Password: admin123
- Open browser to http://localhost:15672
- Login with
admin/admin123 - View:
- Queues and message rates
- Connections from services
- Exchange bindings
- Message flow
Redis Cache
Redis Setup
Redis Setup
Start Redis:Connection Details:Common Redis Commands:Persistence:Redis is configured with AOF (Append-Only File) persistence:Data persists in the
- Host: localhost
- Port: 6379
- Password: None (default)
redis_data Docker volume.Development Workflow
Using IDE (IntelliJ IDEA)
Import Project
- Open IntelliJ IDEA
- File → Open → Select
argos-meshdirectory - IntelliJ will detect Maven projects automatically
Run Configuration
Create run configurations for each service:
- Run → Edit Configurations
- Add new Spring Boot configuration
- Main class: Auto-detected
- Environment variables: Set as needed
Hot Reload with Spring DevTools
Add Spring DevTools topom.xml for automatic restarts:
Testing
Accessing Services
Service Ports
| Service | Port | URL |
|---|---|---|
| Orders API | 8080 | http://localhost:8080 |
| PostgreSQL | 5432 | jdbc:postgresql://localhost:5432/shop_db |
| RabbitMQ AMQP | 5672 | amqp://localhost:5672 |
| RabbitMQ Management | 15672 | http://localhost:15672 |
| Redis | 6379 | redis://localhost:6379 |
Testing the Orders API
Troubleshooting
Port already in use
Port already in use
Error: Or change the port:
Port 8080 is already in useSolution:Find and kill the process:Maven build fails
Maven build fails
Error:
Failed to execute goalSolutions:- Clean Maven cache:
- Delete
.m2/repositoryand rebuild:
- Ensure Java 21 is active:
Database connection refused
Database connection refused
Error:
Connection refused: localhost:5432Solutions:- Verify PostgreSQL is running:
- Check database logs:
- Test connection:
RabbitMQ connection timeout
RabbitMQ connection timeout
Error:
Timeout waiting for RabbitMQ connectionSolutions:- Verify RabbitMQ is running:
- Check health:
- Access management UI to verify: http://localhost:15672
Redis connection failed
Redis connection failed
Error:
Unable to connect to RedisSolutions:- Verify Redis is running:
- Test connection:
Java version mismatch
Java version mismatch
Error:
class file has wrong versionSolution:Ensure Java 21 is active:Out of memory errors
Out of memory errors
Error:
Java heap spaceSolution:Increase heap size:Development Tips
Use Profiles
Create different
application-{profile}.properties files for dev/test/prod configurations.Enable Debug Logging
Add to
application.properties:Use Docker Compose Profiles
Start only infrastructure:
Monitor with Actuator
Add Spring Boot Actuator for metrics and health checks at
/actuator.Next Steps
Docker Compose Deployment
Deploy the complete stack with one command
API Reference
Explore the REST API endpoints
Architecture Overview
Understand the system architecture
Security Features
Learn about DDoS protection