Task & Config Stores

a2a-rust uses pluggable storage backends for tasks and push notification configs. The built-in in-memory stores work for development and testing. For production, use the SQLite or PostgreSQL stores that ship with the crate (features sqlite / postgres), or implement the traits for your own database.

Which store

StoreUse it for
InMemoryTaskStore, the defaultDevelopment, tests, and one process whose tasks need not survive a restart. Terminal tasks expire after an hour.
SqliteTaskStore, feature sqliteOne process, or processes on one host sharing the file, whose tasks must survive restarts. Tasks stay until you delete them.
PostgresTaskStore, feature postgresReplicas on several hosts sharing one store. Tasks stay until you delete them.
TenantAware… variantsMulti-tenant servers, and any server behind an authenticating interceptor: one partition per tenant, and per caller.
Your ownA database the SDK does not ship a store for.

Push-notification configs have their own store with the same choices; see Push-config stores.

In this chapter

Next steps