10 KiB
10 KiB
Partner DLQ API - Complete Documentation Index
📚 Quick Navigation
🚀 Getting Started
-
Quick Start Guide - Start here!
- Web dashboard access
- API quick examples
- CLI tool usage
- Common operations
-
- Pre-deployment verification
- Step-by-step deployment
- Post-deployment configuration
- Rollback procedures
📖 Reference Documentation
-
- Complete endpoint reference
- Request/response schemas
- Authentication details
- Usage examples (curl, JavaScript)
-
- System architecture
- Error categories
- Configuration reference
- Troubleshooting procedures
- Monitoring recommendations
-
- Technical architecture
- Code structure
- Error categorization logic
- Processing decision trees
- Performance characteristics
-
- System overview
- Message flow
- Error categorization
- API structure
- Security flow
📂 File Structure
Code Files
server/
├── controllers/
│ └── partner_dlq.js # Main DLQ controller (600+ lines)
│
├── routes/
│ └── partner.js # DLQ routes (modified)
│
├── workers/
│ └── partner_dlq_handler.js # Background DLQ worker (existing)
│
├── scripts/
│ ├── monitor_partner_dlq.js # CLI monitoring tool (existing)
│ └── test_dlq_api.sh # API test suite (new)
│
└── public/
└── dlq-monitor.html # Web dashboard (500+ lines)
Documentation Files
server/
├── PARTNER_DLQ_API_SUMMARY.md # Complete implementation summary
├── README.md # Updated with DLQ section
│
└── docs/
├── PARTNER_DLQ_QUICKSTART.md # Quick start guide
├── PARTNER_DLQ_API.md # API reference
├── PARTNER_DLQ_HANDLING.md # Operations guide
├── PARTNER_DLQ_IMPLEMENTATION.md # Technical details
├── PARTNER_DLQ_ARCHITECTURE_DIAGRAMS.md # Visual diagrams
├── PARTNER_DLQ_DEPLOYMENT_CHECKLIST.md # Deployment guide
└── Partner_DLQ_API.postman_collection.json # Postman collection
🎯 Use Case Index
For Administrators
Daily Operations:
- Checking DLQ Health - Quick commands
- Web Dashboard Usage - Visual monitoring
- Processing Failed Tasks - Batch operations
Troubleshooting:
- High DLQ Count - Resolution steps
- Stuck Tasks - Debugging
- Common Issues - Quick fixes
Reporting:
- Statistics API - Get metrics
- Recent Failures - View errors
- Error Categorization - Understand patterns
For Developers
Integration:
- API Reference - Complete endpoint documentation
- Postman Collection - Import and test
- Code Examples - Integration patterns
Architecture:
- System Overview - High-level design
- Message Flow - Processing pipeline
- Data Models - Database schema
Testing:
- Test Suite - Automated tests
- Manual Testing - Test procedures
- Postman Collection - API testing
For DevOps
Deployment:
- Deployment Checklist - Step-by-step guide
- Configuration - Environment variables
- Background Services - Setup options
Monitoring:
- Monitoring Setup - Alert configuration
- Key Metrics - What to track
- Alert Thresholds - When to alert
Operations:
- Daily Operations - Daily tasks
- Incident Response - Emergency procedures
- Rollback - Recovery steps
🔍 Quick Reference
Common Commands
# Web Dashboard
open http://localhost:3000/dlq-monitor.html
# CLI Monitoring
node scripts/monitor_partner_dlq.js
# Get Statistics
curl -H "Authorization: Bearer $TOKEN" \
http://localhost:3000/api/dlq/partner_tasks/stats
# Process DLQ (Dry Run)
curl -X POST -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"dryRun": true}' \
http://localhost:3000/api/dlq/partner_tasks/process
# Run Test Suite
./scripts/test_dlq_api.sh
# Start Background Handler
pm2 start workers/partner_dlq_handler.js --name partner-dlq-handler -- monitor
API Endpoints Summary
| Endpoint | Method | Purpose |
|---|---|---|
/api/partners/dlq/stats |
GET | Get statistics |
/api/partners/dlq/messages |
GET | View messages |
/api/partners/dlq/process |
POST | Process DLQ |
/api/dlq/:queueName/retryAll |
POST | Retry all messages |
/api/dlq/:queueName/retryByPosition |
POST | Retry by position |
/api/dlq/:queueName/retryByHeader |
POST | Retry by header |
/api/partners/dlq/purge |
DELETE | Purge queue |
Error Categories
| Category | Description | Action |
|---|---|---|
| 🔵 Transient | Network/connection issues | Auto-retry < 2h |
| 🔴 Validation | Invalid data | Archive immediately |
| 🟠 Processing | Parse/calculation errors | Manual review |
| ⚪ Infrastructure | Database/filesystem | Retry with backoff |
| 🟣 Partner API | Auth/rate limiting | Retry with delay |
| ⚫ Unknown | Unclassified | Manual review |
Configuration Variables
# Queue Settings
QUEUE_NAME_PARTNER=partner_tasks # Auto-prefixes with 'dev_' in development mode
PARTNER_MAX_RETRIES=5
# DLQ Settings
DLQ_CHECK_INTERVAL=300000 # 5 minutes
MAX_DLQ_AGE_MS=86400000 # 24 hours
AUTO_RETRY_WINDOW_MS=7200000 # 2 hours
📞 Getting Help
Documentation Issues
If you find errors or missing information in the documentation:
- Check the Implementation Details for technical depth
- Review Architecture Diagrams for visual explanations
- Contact the development team
Technical Issues
For technical problems:
- Check Troubleshooting Guide
- Review Operations Guide
- Check application logs
- Contact on-call engineer
Feature Requests
To request new features:
- Review Future Enhancements
- Document use case
- Submit feature request to product team
🔄 Version History
v1.0.0 (October 2, 2025) - Initial Release
Features:
- ✅ 6 REST API endpoints
- ✅ Web dashboard with auto-refresh
- ✅ Error categorization (6 types)
- ✅ Intelligent processing rules
- ✅ Manual retry/archive operations
- ✅ Comprehensive documentation
- ✅ Test suite
- ✅ Postman collection
Files:
- Created: 11 new files
- Modified: 2 existing files
- Total Lines: ~5000+ lines of code and documentation
Status: ✅ Production Ready
📊 Documentation Statistics
| Document | Lines | Purpose |
|---|---|---|
| Quick Start | ~300 | Getting started guide |
| API Spec | ~500 | Complete API reference |
| Operations | ~400 | Operational procedures |
| Implementation | ~800 | Technical details |
| Architecture | ~600 | Visual diagrams |
| Deployment | ~500 | Deployment guide |
| Total | ~3100+ | Complete documentation |
🎓 Learning Path
Beginner (New Administrators)
- Start with Quick Start Guide
- Explore Web Dashboard
- Try CLI tool
- Read Operations Guide
Intermediate (Developers)
- Review API Specification
- Study Architecture Diagrams
- Test with Postman Collection
- Read Implementation Details
Advanced (DevOps/Architects)
- Study Implementation Details
- Review Deployment Checklist
- Configure monitoring and alerts
- Plan integration with existing systems
🚀 Next Steps
Immediate
- Read Quick Start Guide
- Access web dashboard
- Run test suite
- Review API documentation
Short Term
- Deploy to staging environment
- Train administrators
- Configure monitoring
- Test with real data
Long Term
- Deploy to production
- Set up automated processing
- Implement advanced features
- Optimize performance
📝 Document Maintenance
This index is maintained as part of the Partner DLQ API documentation.
Last Updated: October 2, 2025
Version: 1.0.0
Maintainer: Development Team
For corrections or updates, please contact the development team.
Ready to start? → Quick Start Guide