{"ref":"capability:async-processing","page":"/capabilities/async-processing","json":"/capabilities/async-processing.json","generated":"2026-10-26","drafted_with_ai":true,"entity":{"id":"async-processing","name":"Async processing","domain":"integration-and-messaging","ecosystems":["cap","abap","btp"],"universal":true,"description":"Doing work outside the request that triggered it, with a guarantee that it eventually happens — deferred jobs, retries, and periodic work. Distinct from messaging, which is about telling other systems.","short":"Doing work outside the request that triggered it, with retries","core_coverage":{"state":"core-and-community","what_core_does":"Built in: the transactional event queue, persistent by default, stores a queued call, an inbound message or a scheduled task in the `cds.outbox.Messages` table inside the business transaction and dispatches it after commit, retries a failure with exponentially increasing delays, and moves it to the dead letter queue after a configurable number of attempts. Outbox, inbox and scheduled tasks are the three patterns on that one table; `cds.spawn` is the in-memory alternative that persists nothing. Outboxing a service by configuration and the `#succeeded` and `#failed` callbacks are Node.js only, the callbacks alpha.","where_it_stops":"At the table. A dead letter stays in `cds.outbox.Messages` for a person to revive or discard, through a query or a service the application defines; there is no console, no priority and no rate control, and Java has no callbacks yet. That is what the entries here add on top.","sources":[{"url":"https://cap.cloud.sap/docs/guides/events/event-queues","title":"Transactional Event Queues — capire","checked":"2026-09-27","quote":"Persist events and scheduled tasks in the same database transaction as your business data, then process them asynchronously with retries and a dead letter queue."},{"url":"https://cap.cloud.sap/docs/guides/events/event-queues","title":"Transactional Event Queues — capire","checked":"2026-09-27","quote":"The persistent queue is enabled by default, which means messages are stored in the cds.outbox.Messages table within the current transaction. The outbox namespace is historical and the table backs all three patterns."},{"url":"https://cap.cloud.sap/docs/guides/events/event-queues","title":"Transactional Event Queues — capire","checked":"2026-09-27","quote":"When processing fails, the system retries the message with exponentially increasing delays. After a configurable maximum number of attempts, the message is moved to the dead letter queue."},{"url":"https://cap.cloud.sap/docs/guides/events/event-queues","title":"Transactional Event Queues — capire","checked":"2026-09-27","quote":"These entries form the dead letter queue and require manual intervention, either to fix the underlying issue and retry, or to discard the message."},{"url":"https://cap.cloud.sap/docs/guides/events/event-queues","title":"Transactional Event Queues — capire","checked":"2026-09-27","quote":"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."},{"url":"https://cap.cloud.sap/docs/guides/events/event-queues","title":"Transactional Event Queues — capire","checked":"2026-09-27","quote":"Outboxing required services by configuration is available in Node.js only."},{"url":"https://cap.cloud.sap/docs/node.js/event-queues","title":"Event Queues in Node.js — capire","checked":"2026-09-27","quote":"cds.spawn runs a detached continuation, which means an in-memory background job in a fresh root transaction, optionally with every / after recurrence. It does not persist anything: a crash before the job completes loses it, and concurrent app instances each run their own copy."},{"url":"https://cap.cloud.sap/docs/guides/events/","title":"Events and Messaging — capire","checked":"2026-09-27","quote":"Transactional Event Queues let you persist events and scheduled tasks in the same database transaction as your business data, then process them asynchronously with retries and a dead letter queue."},{"url":"https://cap.cloud.sap/docs/guides/events/","title":"Events and Messaging — capire","checked":"2026-09-27","quote":"How CAP's Messaging Services connect to message brokers to exchange event messages with remote services, complementing CAP's intrinsic event support."}],"assessed_at":"2026-09-27","relationship":"narrow-by-design"},"changed_in":[{"version":"@sap/cds 7.4.0","date":"2023-11-14","applies_to":{"ecosystems":["cap"],"flavors":["node"]},"what_changed":"Before this, cds.requires.outbox: true gave an in-memory outbox — events waited in process memory until commit, then sent, with nothing surviving a crash before dispatch. The default flipped to persistent-outbox: messaging services and the audit-logging service now write to a database table before dispatch, and the old in-memory behaviour survives only as an explicit opt-out.","invalidates":"Guidance that says enabling cds.requires.outbox gives an in-memory-only queue, or that database-backed delivery needs its own separate configuration. Since November 2023, outbox: true already means persistent-outbox.","source":{"url":"https://cap.cloud.sap/docs/releases/2023/nov23","title":"CAP release notes, November 2023 — persistent outbox becomes the default","checked":"2026-09-08","quote":"The default outbox configuration has been changed to persistent-outbox. As a result, once cds.requires.outbox is set to true, all messaging services and the audit-logging service now first store outgoing messages in a database table before sending them to the respective platform service."}},{"version":"@sap/cds 9.5.1","date":"2025-12-01","applies_to":{"ecosystems":["cap"],"flavors":["node"]},"what_changed":"Before this, a tenant's outbox messages were only picked up by a background job that polled across all tenants on a fixed interval, bounding delivery latency by that poll cycle. The default processing strategy changed to trigger asynchronous, per-tenant processing as part of the request that submits the message, rather than a regular sweep over every tenant; the old polling strategy is still available by setting cds.outbox.persistent.scheduler.enabled: false.","invalidates":"Descriptions of outbox delivery as bound by a fixed cross-tenant poll interval — since this release the default path triggers processing from the submitting request instead.","source":{"url":"https://cap.cloud.sap/docs/releases/2025/nov25","title":"CAP release notes, November 2025 — outbox processing default changes","checked":"2026-09-08","quote":"Improved processing of outbox messages is now enabled by default. The improved processing avoids regularly iterating over all tenants."}},{"version":"@sap/cds 10.0","date":"2026-07-02","applies_to":{"ecosystems":["cap"],"flavors":["node"]},"what_changed":"The queue's runners coordinate through application-level locking: a picked-up message is marked processing and the row lock is released after selection. @sap/cds 8 did not check the status column, @sap/cds 9 held a row-level lock for the whole processing.","invalidates":"A rolling upgrade straight from @sap/cds 8 to 10, which the guide says can double-process messages; drain the queue or upgrade through 9.","source":{"url":"https://cap.cloud.sap/docs/guides/events/event-queues","title":"Transactional Event Queues — capire","checked":"2026-09-27","quote":"A rolling upgrade from @sap/cds 8 directly to 10 can therefore lead to double-processing of messages, because @sap/cds 8 instances pick up messages that an @sap/cds 10 instance has already marked processing."}}],"history":[{"date":"2026-08-31","field":"core_coverage.state","from":"left-open-on-purpose","to":"core-and-community","reason":"States renamed to describe who is present rather than to interpret intent. left-open-on-purpose asserted a motive; core-and-community states a fact, with relationship carrying the intent separately."},{"date":"2026-09-09","field":"ecosystems","from":"cap, abap, integration","to":"cap, abap, integration, btp","reason":"The BTP services answering this were in the corpus while the capability was not on the BTP map, so browse counted them behind the door and had no group to render them in. The BTP door is a reading of its own — a fallback to CAP's would assert something false about a service you bind rather than install."},{"date":"2026-09-14","field":"coverage_by_flavor.abap-cloud","from":null,"to":"core-only","reason":"No ABAP-door artifact carries a provides edge to this capability, so the reading rests on SAP's own documentation: ABAP Cloud runs deferred work through the released Background Processing Framework (bgPF), built on bgRFC and integrated with RAP's COMMIT WORK, and through the released application job framework, while bgRFC itself, CALL FUNCTION ... STARTING NEW TASK and SM36 batch jobs are Standard ABAP mechanisms that SAP-samples/abap-cheat-sheets places outside ABAP for Cloud Development."},{"date":"2026-09-27","field":"core_coverage","from":"an outbox that defers events until commit; stops before durable queues, retries, dead-lettering and scheduling","to":"the transactional event queue: outbox, inbox and scheduled tasks on one persistent table, retries and a dead letter queue","reason":"The paragraph was written from the messaging page's outbox section on 2026-08-31 and said the core stops before four things the Transactional Event Queues guide now documents as built in. Read from that guide; the @sap/cds edge for this capability is added at the same time, since only the Java runtime carried one and the Node.js flavor could confirm no SAP option."},{"date":"2026-09-27","field":"core_coverage","from":"without the page","to":"cites the page","reason":"capire audit 2026-09-27, proposed pages read a fourth time: the description draws the line between queued work and messaging, and the events index states that line in SAP's words."},{"date":"2026-10-05","field":"coverage_by_flavor.abap-cloud","from":"core-only","to":"core-and-community","reason":"ABAP-PRC is the first option here to state ABAP Cloud: its README says the framework core is written in ABAP for Cloud Development on released APIs, and it runs its steps through the background processing framework or as application jobs. The paragraph on SAP's own mechanisms is unchanged and keeps its 2026-09-14 assessment date; no survey of the other providers was made. Its README lists SAP BTP ABAP Environment and S/4HANA Cloud Public Edition as coming soon, and its Fiori apps are classic BSP objects."}],"coverage_by_ecosystem":{"btp":{"state":"core-only","assessed_at":"2026-09-09","where_it_stops":"At the queue. Whether work eventually happens is still decided in the application — the platform carries the message, it does not own the retry. Periodic work has its own answer here in [job scheduling](capability:job-scheduling).","note":"Every provider behind this door is an SAP BTP service, so core-only is a assessment of the corpus rather than a quote from the core. what_core_does is left empty: no page has been checked that states an intent here, and the services themselves carry their own descriptions and links."}},"framing_by_ecosystem":{"btp":{"description":"Deferred work on BTP is a service you bind rather than a queue you run: [Event Mesh](artifact:btp-event-mesh)'s managed queues are the transport underneath it."}},"coverage_by_flavor":{"abap-cloud":{"state":"core-and-community","assessed_at":"2026-09-14","what_core_does":"ABAP Cloud answers this with two released mechanisms: the Background Processing Framework (bgPF), built on bgRFC and paired with [RAP](capability:abap-transactional-model) to register a background process the moment RAP's own `COMMIT WORK` completes, and the application job framework, whose released `CL_APJ_RT_API` schedules a class for \"long-running, repeated jobs\" rather than short, frequent ones. A job scheduled from inside a RAP business object cannot use an immediate start, because the API itself performs an implicit `COMMIT WORK`.","where_it_stops":"It stops at Standard ABAP's own asynchronous mechanisms: bgRFC and `CALL FUNCTION ... STARTING NEW TASK` are function-module features [SAP-samples/abap-cheat-sheets](artifact:sap-samples-abap-cheat-sheets) places in Standard ABAP and not in ABAP for Cloud Development, and SM36 batch jobs run executable programs, which the same source states are not allowed in the restricted ABAP language scope.","sources":[{"url":"https://github.com/SAP-docs/btp-cloud-platform/blob/main/docs/30-development/background-processing-framework-0ad13bd.md","title":"SAP-docs/btp-cloud-platform: Background Processing Framework","checked":"2026-09-14","quote":"bgPF is built on the background remote function call (bgRFC). It supports both transactional and queued background processes. In conjunction with the ABAP RESTful Programming Model (RAP), bgPF provides transactional control to maintain data consistency. The framework offers several advantages, including transactional consistency and integration with various ABAP tools. It is part of the standard functionality in ABAP Cloud and supports easy code testing."},{"url":"https://github.com/SAP-samples/abap-platform-bgpf-appl-log-events-side-effects/blob/main/README.md","title":"SAP-samples/abap-platform-bgpf-appl-log-events-side-effects","checked":"2026-09-14","quote":"The background process is registered and being executed immediatley after the RAP framework has performed the COMMIT WORK statement."},{"url":"https://github.com/SAP-docs/btp-cloud-platform/blob/main/docs/30-development/application-jobs-0837d1e.md","title":"SAP-docs/btp-cloud-platform: Application Jobs","checked":"2026-09-14","quote":"The application job framework ideally defines long-running, repeated jobs. It's not recommended to use it to define short-running jobs with a high frequency."},{"url":"https://github.com/SAP-docs/btp-cloud-platform/blob/main/docs/30-development/maintaining-application-jobs-using-an-api-1491e6c.md","title":"SAP-docs/btp-cloud-platform: Maintaining Application Jobs Using an API","checked":"2026-09-14","quote":"The immediate start can't be used when being called from within a RAP business object because the underlying API performs an implicit COMMIT WORK."},{"url":"https://github.com/SAP-samples/abap-cheat-sheets/blob/main/13_Program_Flow_Logic.md","title":"SAP-samples/abap-cheat-sheets: Program Flow Logic","checked":"2026-09-14","quote":"Special function modules exist in Standard ABAP (and not in ABAP for Cloud Development), and for which special properties are specified in the Function Builder"},{"url":"https://github.com/SAP-samples/abap-cheat-sheets/blob/main/19_ABAP_for_Cloud_Development.md","title":"SAP-samples/abap-cheat-sheets: ABAP for Cloud Development","checked":"2026-09-14","quote":"Executable programs (reports) are not allowed in the restricted ABAP language scope."}],"relationship":"unassessed","community_adds":"[ABAP-PRC](artifact:brandeis-consulting-abap-prc) is a process framework on top of the two: it runs each processed object and each step as its own decoupled unit, through the background processing framework or as an application job, and a retry job resumes the objects that failed on a lock."}},"normative_relevance":[{"instrument":"instrument:sap-developer-license-3-2-cap","prominence":"prominent","sections":["1"],"applies_when":"A covered CAP application sends SAP product data through an external broker where it is copied, saved or processed in a non-SAP product.","note":"Messaging is not automatically mass extraction, but an external broker can cross the boundary named in section 1. The data flow, volume and interoperability purpose therefore need to be checked for the concrete design.","applies_to":{"ecosystems":["cap"]},"sources":[{"url":"https://cap.cloud.sap/resources/license/developer-license-3_2_CAP.txt","title":"SAP Developer License Agreement 3.2 CAP","checked":"2026-09-16","quote":"including use, modification, saving or other processing of such data"}]}],"drafted_with_ai":true},"sap_delivery":{"door":"cap","all":{"built_in":[{"ref":"artifact:sap-cds","name":"@sap/cds","json":"/artifacts/sap-cds.json"},{"ref":"artifact:cap-java-cds-services-bom","name":"com.sap.cds:cds-services-bom","json":"/artifacts/cap-java-cds-services-bom.json"}],"documented_pattern":[],"announced":[],"packages":[]},"by_flavor":{"node":{"built_in":[{"ref":"artifact:sap-cds","name":"@sap/cds","json":"/artifacts/sap-cds.json"}],"documented_pattern":[],"announced":[],"packages":[]},"java":{"built_in":[{"ref":"artifact:cap-java-cds-services-bom","name":"com.sap.cds:cds-services-bom","json":"/artifacts/cap-java-cds-services-bom.json"}],"documented_pattern":[],"announced":[],"packages":[]}}},"edges":{"use_cases":[],"shared_tasks":[],"related_tasks":[],"options":[{"ref":"artifact:cap-js-community-event-queue","name":"@cap-js-community/event-queue","json":"/artifacts/cap-js-community-event-queue.json","ecosystem":"cap","origin_ring":"community-org"},{"ref":"artifact:cap-js-community-sap-afc-sdk","name":"@cap-js-community/sap-afc-sdk","json":"/artifacts/cap-js-community-sap-afc-sdk.json","ecosystem":"cap","origin_ring":"community-org"},{"ref":"artifact:odatano-watch","name":"@odatano/watch","json":"/artifacts/odatano-watch.json","ecosystem":"cap","origin_ring":"independent"},{"ref":"artifact:sap-cds","name":"@sap/cds","json":"/artifacts/sap-cds.json","ecosystem":"cap","origin_ring":"sap-official"},{"ref":"artifact:brandeis-consulting-abap-prc","name":"ABAP-PRC","json":"/artifacts/brandeis-consulting-abap-prc.json","ecosystem":"abap","origin_ring":"independent"},{"ref":"artifact:chuckberrry-cds-event-monitoring","name":"cds-event-monitoring","json":"/artifacts/chuckberrry-cds-event-monitoring.json","ecosystem":"cap","origin_ring":"independent"},{"ref":"artifact:soontao-cds-nats","name":"cds-nats","json":"/artifacts/soontao-cds-nats.json","ecosystem":"cap","origin_ring":"independent"},{"ref":"artifact:cap-java-cds-services-bom","name":"com.sap.cds:cds-services-bom","json":"/artifacts/cap-java-cds-services-bom.json","ecosystem":"cap","origin_ring":"sap-official"},{"ref":"artifact:btp-event-mesh","name":"Event Mesh","json":"/artifacts/btp-event-mesh.json","ecosystem":"btp","origin_ring":"sap-official"}],"samples":[{"ref":"artifact:sap-samples-abap-platform-bgpf-appl-log-events-side-effects","name":"SAP-samples/abap-platform-bgpf-appl-log-events-side-effects","json":"/artifacts/sap-samples-abap-platform-bgpf-appl-log-events-side-effects.json"},{"ref":"artifact:sap-samples-abap-platform-rap-transactional-outbox-with-bgpf","name":"SAP-samples/abap-platform-rap-transactional-outbox-with-bgpf","json":"/artifacts/sap-samples-abap-platform-rap-transactional-outbox-with-bgpf.json"},{"ref":"artifact:sap-samples-teched2025-in163","name":"SAP-samples/teched2025-IN163","json":"/artifacts/sap-samples-teched2025-in163.json"}],"explained_by":[{"ref":"content:devtoberfest-2026-rap-side-effects","name":"Always in Sync — Field-level and event-driven side effects for reactive UIs in RAP","json":"/content/devtoberfest-2026-rap-side-effects.json"},{"ref":"content:devtoberfest-2026-how-to-build-application-jobs-abap-environment","name":"How to Build Application Jobs in SAP Business AI Platform, ABAP environment","json":"/content/devtoberfest-2026-how-to-build-application-jobs-abap-environment.json"},{"ref":"content:triggering-background-jobs-from-rap-actions-a-practical-guide","name":"Triggering Background Jobs from RAP Actions – A Practical Guide","json":"/content/triggering-background-jobs-from-rap-actions-a-practical-guide.json"},{"ref":"content:automate-btp-custom-domain-certificates-using-lets-encrypt","name":"Automate BTP Custom Domain certificates using Let's Encrypt","json":"/content/automate-btp-custom-domain-certificates-using-lets-encrypt.json"},{"ref":"content:real-time-architecture-in-cap-async-jobs-and-websockets","name":"Real-Time Architecture in SAP CAP: Mastering Asynchronous Jobs, Gateways with WebSockets","json":"/content/real-time-architecture-in-cap-async-jobs-and-websockets.json"},{"ref":"content:event-mesh-amqp-the-retry-trap-nobody-warns-you-about","name":"Event Mesh + AMQP: The Retry Trap Nobody Warns You About","json":"/content/event-mesh-amqp-the-retry-trap-nobody-warns-you-about.json"},{"ref":"content:cloud-native-with-abap-cloud-the-transactional-outbox-pattern","name":"Cloud-Native with ABAP Cloud – The Transactional Outbox Pattern","json":"/content/cloud-native-with-abap-cloud-the-transactional-outbox-pattern.json"},{"ref":"content:event-task-scheduling-in-cap-nodejs-alpha","name":"Quick tip: event/task scheduling in CAP Node.js (in alpha state)","json":"/content/event-task-scheduling-in-cap-nodejs-alpha.json"},{"ref":"content:diy-jdbc-sender-adapter-for-sap-integration-suite","name":"DIY JDBC Sender Adapter for SAP Integration Suite","json":"/content/diy-jdbc-sender-adapter-for-sap-integration-suite.json"},{"ref":"content:abap-code-to-wait-for-the-end-of-inbound-bgrfc-type-q-units","name":"ABAP code to wait for the end of \"inbound bgRFC type Q\" units","json":"/content/abap-code-to-wait-for-the-end-of-inbound-bgrfc-type-q-units.json"},{"ref":"content:beginners-guide-to-advanced-event-mesh","name":"Beginners Guide to Advanced Event Mesh","json":"/content/beginners-guide-to-advanced-event-mesh.json"},{"ref":"content:sap-cap-cloud-application-programming","name":"SAP CAP(Cloud Application Programming)开发框架概述","json":"/content/sap-cap-cloud-application-programming.json"},{"ref":"content:securing-a-cap-endpoint-called-by-the-job-scheduling-service","name":"SAP Job Scheduling Service + Cloud Application Programming Model application (CAP) + SAP Authorization and Trust Management Service (XSUAA)","json":"/content/securing-a-cap-endpoint-called-by-the-job-scheduling-service.json"}],"normative_context":[{"ref":"instrument:sap-developer-license-3-2-cap","name":"SAP Developer License Agreement","json":"/instruments/sap-developer-license-3-2-cap.json","prominence":"prominent","sections":["1"]}]}}