Product Ingestion
Catalog API persists product changes in PostgreSQL; Scheduler triggers Catalog Ingestion over Kafka every five minutes to refresh or remove Qdrant vectors and acknowledge unchanged revisions.
Trigger & Business Outcome
This workflow begins when a catalog administrator creates, updates, or soft-deletes a BookEntityv1.0.0BookCanonical sellable title in the product catalog, encapsulating descriptive metadata, pricing, stock availability, taxono...Ownercatalog-experience-teamOpen docs, AuthorEntityv1.0.0AuthorRepresents a credited author of one or more books in the product catalog, enforcing display-name validity and referentia...Ownercatalog-experience-teamOpen docs, CategoryEntityv1.0.0CategorySingle-level taxonomy classification grouping books by subject or genre within the product catalog.Ownercatalog-experience-teamOpen docs, or PublisherEntityv1.0.0PublisherRepresents a publishing house or imprint associated with books in the product catalog.Ownercatalog-experience-teamOpen docs through Catalog APIServicev1.0.0Catalog APIInternal HTTP and gRPC service for Catalog product management, hybrid discovery, and authoritative book metadata. PublishesBookUpdatedRatingFailedIntegrationEventSubscribesCreatePublisher, UpdatePublisher +24APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs. Success is confirmed when Catalog IngestionServicev1.0.0Catalog IngestionInternal background worker that reads pending Catalog book updates and synchronizes semantic search vectors in Qdrant. SubscribesProcessVectorBatchIntegrationEventOwnercatalog-experience-teamDiagramRepositoryOpen docs refreshes or removes the corresponding embeddings in Catalog VectorContainerv1.0.0Catalog VectorNon-authoritative Qdrant vector search index owned by the Catalog bounded context for hybrid semantic and keyword book d...Ownercatalog-experience-teamDiagramOpen docs and acknowledges only unchanged revision rows in Catalog DatabaseContainerv1.0.0Catalog DatabaseAuthoritative PostgreSQL system of record owned by the Catalog bounded context for books, authors, categories, publisher...Ownercatalog-experience-teamDiagramOpen docs, keeping semantic search eventually consistent without slowing catalog writes.
Interactive Flow Visualization
Step-by-Step Walkthrough
Decoupled Catalog Mutation and Vector Indexing
Persist catalog changes and coalesce pending work
Catalog APIServicev1.0.0Catalog APIInternal HTTP and gRPC service for Catalog product management, hybrid discovery, and authoritative book metadata. PublishesBookUpdatedRatingFailedIntegrationEventSubscribesCreatePublisher, UpdatePublisher +24APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs commits validated catalog changes to Catalog DatabaseContainerv1.0.0Catalog DatabaseAuthoritative PostgreSQL system of record owned by the Catalog bounded context for books, authors, categories, publisher...Ownercatalog-experience-teamDiagramOpen docs. In the same transaction, database triggers atomically coalesce each affected book ID into the pending vector queue with a new revision token, collapsing rapid edits into one indexing pass.
Emit periodic batch trigger
Every five minutes in UTC, Scheduler ServiceServicev1.0.0Scheduler ServiceSingle-host Quartz.NET job execution engine and operational dashboard UI for scheduling recurring platform jobs and insp...PublishesProcessVectorBatchIntegrationEventAPIsAsyncAPIOwnerplatform-engineering-teamDiagramRepositoryOpen docs publishes Process vector batchEventv1.0.0Process vector batchIntegration event published by Scheduler every five minutes to trigger Catalog Ingestion vector batch processing over Ka...Ownerplatform-engineering-teamSchemaDiagramOpen docs via its transactional outbox to Process Vector Batch ChannelChannelv1.0.0Process Vector Batch ChannelUnprefixed Kafka trigger topic owned by the platform team used by Scheduler Service every five minutes to initiate Catal...Ownerai-capabilities-teamOpen docs.
Acquire exclusive lock and read bounded batch
Catalog IngestionServicev1.0.0Catalog IngestionInternal background worker that reads pending Catalog book updates and synchronizes semantic search vectors in Qdrant. SubscribesProcessVectorBatchIntegrationEventOwnercatalog-experience-teamDiagramRepositoryOpen docs acquires an exclusive PostgreSQL advisory lock so only one worker processes the queue at a time, then reads up to 200 queued revisions with current book metadata.
Generate embeddings and update Qdrant
Catalog IngestionServicev1.0.0Catalog IngestionInternal background worker that reads pending Catalog book updates and synchronizes semantic search vectors in Qdrant. SubscribesProcessVectorBatchIntegrationEventOwnercatalog-experience-teamDiagramRepositoryOpen docs generates batch embeddings for active books, upserts active records into Catalog VectorContainerv1.0.0Catalog VectorNon-authoritative Qdrant vector search index owned by the Catalog bounded context for hybrid semantic and keyword book d...Ownercatalog-experience-teamDiagramOpen docs, and deletes vectors for missing or soft-deleted books.
Acknowledge unchanged revisions
Only after all vector operations succeed, Catalog IngestionServicev1.0.0Catalog IngestionInternal background worker that reads pending Catalog book updates and synchronizes semantic search vectors in Qdrant. SubscribesProcessVectorBatchIntegrationEventOwnercatalog-experience-teamDiagramRepositoryOpen docs deletes pending rows whose book ID and revision token match the processed snapshot, preserving any concurrent edits made during processing.
Failure, Retry & Compensation Behavior
| Failure Point | System Behavior | Compensation / Recovery |
|---|---|---|
| Advisory lock already held | Worker exits cleanly without touching catalog-vector | Pending rows remain intact for the next five-minute trigger |
| Incomplete AI embedding response | Batch aborts before any vector writes | Advisory lock is released; entire batch is retried on the next scheduled run |
| Vector store or acknowledgement failure | Error propagates and lock is released | Unacknowledged rows survive in catalog-database; vector writes are idempotent by book UUID |
Eventual consistency window: Semantic search results lag behind catalog writes by up to five minutes (plus additional cycles if the queue exceeds 200 books). Authoritative book details and prices are always hydrated from Catalog DatabaseContainerv1.0.0Catalog DatabaseAuthoritative PostgreSQL system of record owned by the Catalog bounded context for books, authors, categories, publisher...Ownercatalog-experience-teamDiagramOpen docs at query time.
Participating Resources
- Domains & Systems: CatalogDomainv1.0.0CatalogCore BookWorm subdomain that makes books discoverable, purchasable, and consistently described across the customer journ...Ownercatalog-experience-teamDiagramOpen docs, PlatformDomainv1.0.0PlatformProvides cross-cutting capabilities for recurring scheduled triggers and durable, idempotent transactional email notific...Ownerplatform-engineering-teamDiagramOpen docs, Product Catalog SystemSystemv1.0.0Product Catalog SystemInternal BookWorm system that owns catalog management, product discovery, and catalog search index ingestion within the ...Ownercatalog-experience-teamDiagramOpen docs, Scheduler SystemSystemv1.0.0Scheduler SystemInternal Quartz-based platform system that persists schedules, coordinates recurring jobs, and dispatches background wor...Ownerplatform-engineering-teamDiagramOpen docs
- Services: Catalog APIServicev1.0.0Catalog APIInternal HTTP and gRPC service for Catalog product management, hybrid discovery, and authoritative book metadata. PublishesBookUpdatedRatingFailedIntegrationEventSubscribesCreatePublisher, UpdatePublisher +24APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs, Scheduler ServiceServicev1.0.0Scheduler ServiceSingle-host Quartz.NET job execution engine and operational dashboard UI for scheduling recurring platform jobs and insp...PublishesProcessVectorBatchIntegrationEventAPIsAsyncAPIOwnerplatform-engineering-teamDiagramRepositoryOpen docs, Catalog IngestionServicev1.0.0Catalog IngestionInternal background worker that reads pending Catalog book updates and synchronizes semantic search vectors in Qdrant. SubscribesProcessVectorBatchIntegrationEventOwnercatalog-experience-teamDiagramRepositoryOpen docs
- Messages & Channels: Process vector batchEventv1.0.0Process vector batchIntegration event published by Scheduler every five minutes to trigger Catalog Ingestion vector batch processing over Ka...Ownerplatform-engineering-teamSchemaDiagramOpen docs, Process Vector Batch ChannelChannelv1.0.0Process Vector Batch ChannelUnprefixed Kafka trigger topic owned by the platform team used by Scheduler Service every five minutes to initiate Catal...Ownerai-capabilities-teamOpen docs
- Data Stores: Catalog DatabaseContainerv1.0.0Catalog DatabaseAuthoritative PostgreSQL system of record owned by the Catalog bounded context for books, authors, categories, publisher...Ownercatalog-experience-teamDiagramOpen docs, Catalog VectorContainerv1.0.0Catalog VectorNon-authoritative Qdrant vector search index owned by the Catalog bounded context for hybrid semantic and keyword book d...Ownercatalog-experience-teamDiagramOpen docs