Skip to content

Event Queues#2608

Open
sjvans wants to merge 50 commits into
mainfrom
event-queues-reconciled
Open

Event Queues#2608
sjvans wants to merge 50 commits into
mainfrom
event-queues-reconciled

Conversation

@sjvans

@sjvans sjvans commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread guides/events/event-queues.md Outdated
Comment thread guides/events/event-queues.md
Comment thread guides/events/event-queues.md Outdated
Comment thread guides/events/event-queues.md Outdated
Comment thread guides/events/event-queues.md Outdated
Comment thread guides/events/event-queues.md Outdated
Comment thread guides/events/event-queues.md Outdated
Comment thread guides/events/event-queues.md
Comment thread guides/events/event-queues.md
Comment thread guides/events/event-queues.md Outdated
Comment thread guides/events/event-queues.md
Comment thread guides/events/event-queues.md Outdated
Comment thread guides/events/event-queues.md Outdated
Comment thread guides/events/event-queues.md Outdated
Comment thread guides/events/event-queues.md Outdated
Comment thread guides/events/event-queues.md
@sjvans sjvans marked this pull request as ready for review June 16, 2026 08:47
This is also the foundation for [SAGA-style](https://microservices.io/patterns/data/saga.html) compensation across distributed systems: two-phase commits aren't possible once an outboxed call has gone out, so you keep consistency by reacting to outcomes and compensating where needed.

> [!note] Node.js only
> Callback events `#succeeded` and `#failed` are currently available in Node.js only. Java doesn't have an equivalent yet, but it's on the roadmap.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feature is requested by stakeholders frequently and would solve many workarounds.

t-bonk
t-bonk previously approved these changes Jun 17, 2026

@t-bonk t-bonk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sjvans

sjvans commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

@renejeglinsky @smahati fyi: @dimamost to check for missing java content, then we can merge

Comment thread node.js/event-queues.md
}
```

Some services - `cds.MessagingService` and `cds.AuditLogService` - are outboxed by default. See [*Auto-Outboxed Services*](../guides/events/event-queues#auto-outboxed-services) in the common guide.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Some services - `cds.MessagingService` and `cds.AuditLogService` - are outboxed by default. See [*Auto-Outboxed Services*](../guides/events/event-queues#auto-outboxed-services) in the common guide.
Some services - `cds.MessagingService` and `cds.AuditLogService` - are outboxed by default. See [*Auto-Outboxed Services*](../guides/events/event-queues#auto-outboxed-services) in the Transactional Event Queues guide.

Comment thread node.js/event-queues.md

### Scheduling

`srv.schedule()` queues like `cds.queued(srv).send()`, that is within the current transaction, dispatched after commit, but it **upserts** a singleton task keyed by event name (or by `.as(name)`) instead of inserting a new entry on every call. It accepts optional timing:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had issues to understand that "queues" here is a verb and not the noun. But I also do not have an idea to improve it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`srv.schedule()` queues like `cds.queued(srv).send()`, that is within the current transaction, dispatched after commit, but it **upserts** a singleton task keyed by event name (or by `.as(name)`) instead of inserting a new entry on every call. It accepts optional timing:
The `srv.schedule()` method queues like `cds.queued(srv).send()`, that is within the current transaction, dispatched after commit. But it **upserts** a singleton task keyed by event name (or by `.as(name)`) instead of inserting a new entry on every call. It accepts optional timing:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants