Troubleshooting
Quick Diagnosis
# Check container status
docker ps | grep priority-queues
# Check recent logs
docker logs priority-queues --tail 50 2>&1 | grep -i error
# Test priority routing
curl -X POST http://localhost:8080/logs \
-H "Content-Type: application/json" \
-d '{"severity": "CRITICAL", "message": "test"}'
Common Issues
Critical events not getting priority
Cause: Severity field not recognized or scoring threshold too high
# Check logs for priority assignments
docker logs priority-queues --tail 20 2>&1 | grep priority
Fix: Verify severity values match expected format (CRITICAL, ERROR, not critical):
root.severity = this.severity.uppercase() # Normalize first
All events going to same queue
Cause: Switch condition not matching or default fallthrough
Fix: Add explicit priority ranges in switch:
- check: this.priority_score >= 200
output: {kafka: {topic: critical-queue}}
- check: this.priority_score >= 100
output: {kafka: {topic: high-queue}}
Low-priority events never processed (starvation)
Cause: High-priority queue always has messages
Fix: Add age-based escalation:
- mapping: |
if this.age_seconds > 3600 {
root.priority_score = root.priority_score + 50
}
Priority calculation wrong
Cause: Missing fields or wrong field names in scoring
Fix: Add defaults for missing fields:
root.severity = this.severity.or("INFO")
root.user_tier = this.user_tier.or("free")
Still stuck?
- Add debug logging:
logger: {level: DEBUG} - Check the Complete Pipeline for reference config
- Review Content Routing for conditional routing patterns