ASYNC WORK

Events & background jobs

RAIQL 0.17 introduces an executable asynchronous-work model built on a PostgreSQL outbox.

Declare an event

EVENT OrderCreated FROM Order;

After a generated POST creates an Order, the runtime writes an outbox row in the same application database.

Declare a job

JOB NotifyCustomer ON OrderCreated;

The generator emits a typed job handler and wires it to the generated worker.

Run the worker

terminal
npm run worker

The worker polls pending outbox rows, dispatches matching handlers, records attempts and marks successfully processed events.

Current adapter

Executable events in 0.17 use the same PostgreSQL database as the application. Queue products such as Kafka/SQS remain future adapters rather than hidden dependencies.

Continue exploring RAIQLOpen the playground →