Summary
Implement the StorageAdapter interface with MongoDB as the default persistence backend.
Tasks
Acceptance Criteria
- All
StorageAdapter methods work correctly against MongoDB
- TTL index on tokens auto-expires documents
- Indexes support efficient queries for common access patterns
- Tests pass against MongoDB in Docker (
docker compose up)
- Graceful connection cleanup on shutdown
Dependencies
References
Summary
Implement the
StorageAdapterinterface with MongoDB as the default persistence backend.Tasks
StorageAdaptermethods using nativemongodbpackagechannels,recipients,threads,turns,routes,tokensthreads: bythreadId(unique), bychannelId + nativeThreadId, bychannelId + targetIdturns: byturnId(unique), bythreadId + timestamproutes: by criteria fields for efficient matchingtokens: by token value (unique), TTL index onexpiresAtAcceptance Criteria
StorageAdaptermethods work correctly against MongoDBdocker compose up)Dependencies
StorageAdapterinterface defined thereReferences