How services work
Every service follows this pattern:Subscribe
Sends a query defining which entities it cares about (e.g., “entities with an EDI component and a Customer component”).
Process
Runs business logic on the changed entities. May create new entities, update existing ones, or link entities together.
Guaranteed delivery
Services receive changes through a durable message queue. This provides:| Feature | Benefit |
|---|---|
| Durability | Messages persist even if the service is offline |
| Acknowledgment | Services must confirm processing; unacknowledged messages are re-delivered |
| Consumer groups | Multiple instances of a service can share the workload |
| Auto-retry | Unacknowledged messages are auto-claimed after a timeout |
Service capabilities
Inside a service’s processing logic, the following tools are available:| Capability | Purpose |
|---|---|
| Entity search | Find entities matching a query |
| Child lookup | Look up child entities |
| Aggregation | Run aggregation queries |
| File upload | Upload files to cloud storage |
| Distributed locks | Prevent concurrent processing of the same data |
| Log broadcast | Send log messages visible to admins in our UI |
Service queries
Services subscribe using JSON queries that match against entity state:EDI component and a Customer component. The query engine evaluates matches efficiently using a combination of in-memory assertions and database queries.
Logging
Services can broadcast log messages visible to admin users in our UI. Lifecycle events are logged automatically:- Processing started — when a batch begins
- Processing complete — when it succeeds
- Processing failed — when it fails (includes error details)