1.2 KiB
1.2 KiB
Feature Spec: Service Mesh Interop
Summary
Enable inter-service communication: Chat Service validates tokens via auth-svc, and pushes async tasks to the PostgreSQL job queue for Worker to process.
Requirements
- Auth-svc /validate endpoint: Auth Service exposes
POST /api/auth-svc/validatethat accepts a Bearer token and returns the validated user info. - Chat-svc token validation: Chat Service calls
http://auth-svc/api/auth-svc/validateviapkg/svcclient to check tokens on protected endpoints. - Chat-svc queue producer: Chat Service pushes jobs to the PostgreSQL queue (via
pkg/queue) for async processing by Worker. - Worker job processing: Worker registers a handler for
chat_taskjob type and processes tasks from the queue.
Non-Goals
- No new database schemas beyond existing jobs table
- No Redis (using existing PostgreSQL queue)
- No new frontend changes
Acceptance Criteria
- Auth-svc has a
/validateendpoint that validates JWT tokens - Chat-svc calls auth-svc to validate tokens on protected routes
- Chat-svc can enqueue jobs to the queue
- Worker processes
chat_taskjobs - All components have tests
- All tests pass