@cap-js-community/event-queue
Transactional processing of asynchronous and periodic events, with instant dispatch over RedisRedisAn in-memory data store. For the things here it is the shared cache, the queue or the pub/sub channel that lets several application instances behave as one. Pub/Sub and load spread across every application instance.
Facts
Where it sits
Who is behind it
In the atlas: maintains 10@cap-js-communityOliver KlemenzOliver KlemenzMaintains this
In the atlas: maintains 4, contributes to 6@oklemenz2maintainersChristian NeuContributes to this
In the atlas: contributes to 5@christianneuDr. David A. KunzContributes to this
In the atlas: contributes to 16@David-KunzLothar BenderContributes to this
In the atlas: contributes to 9@LotharBenderEmanuel BahrContributes to this
In the atlas: contributes to 3@PhantomkeksPierre FritschContributes to this
In the atlas: contributes to 5@PierreFritschsjvansContributes to this
In the atlas: contributes to 45@sjvansMax GruenfelderContributes to this
In the atlas: contributes to 7@soccermaxTux240Contributes to this
In the atlas: contributes to 1@Tux2408 contributors
Before choosing this
Conditions
LicenceSAP Developer License Agreement 3.2 CAP§ 1, 2, 3A cds-plugin is used with SAP CAP materials, or an artifact is explicitly identified as a CAP plugin or application.
- § 1 License. Productive customer applications are limited to SAP BTP or another SAP-licensed platform, and mass extraction to a non-SAP product is restricted except where solely required for SAP interoperability.
- § 2 Intellectual Property. The agreement retains SAP's rights in the covered materials and limits making APIs, tools or software available to third parties, while preserving ownership of customer applications subject to SAP's underlying rights.
- § 3 Artificial Intelligence Training. The agreement prohibits use of the covered materials and customer applications for training artificial-intelligence models or systems.
Also, from Async processing§ 1: 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.
PracticalFunctional boundary
If you need sub-second fan-out to external consumers this is the wrong layer — reach for Event MeshEvent MeshManaged queues and topics over AMQP, MQTT and a REST gateway, and the bus SAP's own applications publish their business events to.sap official, btp or Kafka. Without RedisRedisAn in-memory data store. For the things here it is the shared cache, the queue or the pub/sub channel that lets several application instances behave as one., periodic processing still works but instant dispatch degrades to polling.
What it declares
Every artifact
- Type
- CDS plugin
- Origin
- By a community org
- Runtime
- Node.js
- Runs on
- Cloud FoundryKyma
As a CDS plugin
- Multitenancy
- safe
- Distributed through
- does not say
Connections
Kafka adapter exposing topics as a CDS messaging service
Doing work outside the request that triggered it, with retries
Running something later or on a cadence, and knowing it ran
Managed Redis from the hyperscaler via a BTP service binding
An in-memory data store. For the things here it is the shared cache, the queue or the pub/sub channel that lets several application instances behave as one.
Download
Install
npm add @cap-js-community/event-queue"cds": {
"requires": {
"eventQueue": {
"impl": "@cap-js-community/event-queue",
"configFilePath": "./srv/eventQueueConfig.yml"
}
}
}- Periodic events fire on every instance unless singleton is set. The most common misconfiguration.
- The YAML config path is relative to the project root, not to srv/. Agents get this wrong constantly.
Derived from the package name. No recipe recorded; the README has the configuration.
Where it sits in your app
Download
README
quoted from cap-js-community/event-queue under Apache-2.0, read@cap-js-community/event-queue
The Event-Queue is a framework built on top of CAP Node.js, designed specifically for efficient and streamlined asynchronous event processing. With a focus on load balancing, this package ensures optimal event distribution across all available application instances. By providing managed transactions similar to CAP handlers, the Event-Queue framework simplifies event processing, enhancing the overall performance of your application.
Additionally, Event-Queue provides support for periodic events, allowing for processing at defined intervals. This feature further extends its capabilities in load balancing and transaction management, ensuring that even regularly occurring tasks are handled efficiently and effectively without overloading any single instance. This makes it an ideal solution for applications needing consistent, reliable event processing.
Getting Started
Dive right in and check out the getting started documentation.
Features
Learn more about features in the documentation. To compare the event-queue with other SAP products head over to Distinction from other solutions.
- load balancing and concurrency control of event processing across app instances
- periodic events similar to running cron jobs for business processes
- managed transactions for event processing
- async processing of processing intensive tasks for better UI responsiveness
- push/pull mechanism for reducing delay between publish an event and processing
- cluster published events during processing (e.g. for combining multiple E-Mail events to one E-Mail)
- plug and play via cds-plugin
Documentation
Head over to our Documentation to learn more.
Support, Feedback, Contributing
This project is open to feature requests/suggestions, bug reports etc. via GitHub issues. Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our Contribution Guidelines.
Code of Conduct
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. By participating in this project, you agree to abide by its Code of Conduct at all times.
Licensing
Copyright 2023 SAP SE or an SAP affiliate company and @cap-js-community/event-queue contributors. Please see
our LICENSE for copyright and license information. Detailed information including third-party components and
their licensing/copyright information is
available via the REUSE tool.
History
Fixes 5
Notes
Fixed
- Saga follow-ups (
#succeeded,#failed,#done) are now reliably assigned to the transaction of the event which created them when events are processed in parallel. This prevents missing follow-ups and duplicate key errors. - Improved follow-up handling for transaction mode
alwaysCommitandalwaysRollback, so that all follow-ups of a chunk with multiple events are inserted. - Improved error handling in transaction mode
isolated: a failing event transaction now only sets its own events to error and triggers#failedfor them. Other events of the chunk keep their status. - With
insertEventsBeforeCommit: false,#succeededand#donefollow-ups are now also inserted if the business transaction is rolled back. - Without Redis, scheduled event processing (e.g. the next tick of a periodic event) no longer nests into the context of the previous run. The growing context chain could cause
Maximum call stack size exceededon long running instances.
Changed 1, Fixes 6
Notes
Fixed
- Without Redis the scheduled runner (single tenant) run was not guarded against errors. A failing database call — a pool acquire timeout for example — rejected a promise which nobody awaited, so Node reported an unhandled rejection and CAP shut the server down. The run is now guarded like all other runner modes, and the scheduler logs a failing run instead of discarding its promise.
- The keep-alive renewed a different lock key than the one acquired for processing, so the lock of an event type was never extended and expired after
keepAliveMaxInProgressTime. Another instance could then process the same type and subtype in parallel, and every renew left an orphan row insap.eventqueue.Lock. Present since v2.0.0. - Broadcasting an event via Redis built the lock key with the namespace twice and therefore never detected a running processing run, so the broadcast was not skipped while the event type was already being processed.
- The lock list of the admin service reported
namespaceandtenantswapped, which made releasing a lock from that list address a key which does not exist. - On PostgreSQL an existing lock in the database could never be taken over. The failed INSERT aborted the transaction, so the takeover in the same transaction failed with
current transaction is aborted. The INSERT and the takeover now run in separate transactions. executeInNewTransactionreused an already open transaction of the caller on every database except HANA. On PostgreSQL this silently turnedtx.rollback()into a no-op, so transactions which must be rolled back were committed instead. Only SQLite reuses the transaction now, because it allows a single open transaction only.
Changed
- Distributed locks carry an ownership token: renew and release only affect the lock of the processing run which acquired it. A run which lost its lock stops processing further chunks.
Changed 1, Fixes 1
Notes
Changed
- Adjustments for CDS 10: upgraded to
@sap/cds10 and@cap-js/db-service,@cap-js/hana, and@cap-js/sqlite3, and disabled the CDSschedulingservice (cds.requires.scheduling: false) as the event-queue provides its own periodic event scheduling. Remaining runtime and dev dependencies were refreshed to their latest versions.
Fixed
- Periodic events could get permanently stuck after a long downtime (~30 days or more). The runner only selects events whose
createdAtorstartAfteris within the last 30 days, butcheckAndInsertPeriodicEventsstill treated the staleOpenoccurrence as valid and never re-inserted it, so the event was neither processed nor rescheduled. Stale periodic events that fall outside this window are now refreshed with a new occurrence on startup so they resume processing.
- Adjustments for CDS 10: upgraded to
Features 1
Notes
Added
- New tenant filter callback
tenantIdFilterEventProcessingGlobalfor globally excluding tenants from event processing. Unlike the instance-specifictenantIdFilterEventProcessing(which intentionally skips the master-runner lock for sticky-tenant setups, causing every instance to act as a master runner), the global filter returns the same answer on every instance and therefore keeps the master-runner lock. This lets you exclude tenants from processing entirely without increasing the number of open database connections. Both callbacks can be combined; a tenant is processed only if both returntrue. See documentation.
- New tenant filter callback
Fixes 2
Notes
Fixed
- Periodic cron events could be executed twice if a processing run picked up the event slightly early (within the 3-second start headroom). The next occurrence was calculated based on the current time, which was still before the occurrence that had just been processed, so the same occurrence was scheduled and executed again. The calculation is now based on the planned start time of the processed event if it was picked up early.
- The in-memory scheduling of the next cron occurrence is now based on the actual time until the next occurrence instead of always being armed. This avoids redundant long-running timers for infrequent cron events and prevents a
setTimeoutoverflow (which triggered a spurious immediate processing run) for cron cadences greater than ~24.8 days.
Features 2
Notes
Added
- [CAP Queue] Support
cds.env.requires[<SERVICE>].outboxedas an additional configuration alias alongsideoutboxandqueued. Properties fromoutboxedoverrideoutbox(and are themselves overridden byqueued), enabling per-service configuration when a service is registered via theoutboxedkey. - New initialize option
authCacheExpiryReductionMaxPercent(also configurable viacds.env.eventQueue.authCacheExpiryReductionMaxPercent). Shortens the cached XSUAA token TTL by a random percentage in[0, value]per token fetch, providing a safety margin against using nearly-expired tokens and avoiding synchronized expiry across tenants that would otherwise stampede the XSUAA token endpoint. Default10; allowed range[0, 80](values outside this range throw on initialization).
- [CAP Queue] Support
Features 4
Notes
Added
- [CAP Queue] Add support for event chaining: register
#succeededand#failedsuccessor handlers that are automatically triggered based on the outcome of an event handler. See documentation. - [CAP Queue] Add
#doneunconditional successor — fires after every event regardless of success or failure, analogous to afinallyblock. Useful for cleanup that must always run (releasing locks, audit events, etc.). - [CAP Queue] Successor handlers (
#succeeded,#failed,#done) can be configured independently in theeventssection of the service'squeuedconfiguration, including event-specific variants (e.g.orderCreated/#succeeded). - [Telemetry] Add opt-in event queue metrics (
collectEventQueueMetrics). When enabled together with Redis and an OpenTelemetry MeterProvider, the module publishescap.event_queue.jobs.pending,cap.event_queue.jobs.in_progress, andcap.event_queue.stats.refresh_ageas Observable Gauges, broken down by namespace. See documentation.
- [CAP Queue] Add support for event chaining: register
Features 1, Fixes 2
Notes
Added
- [CAP Queue] Allow to propagate cds.context properties (e.g. features). This can be configured per event (
cds.env.requires[<SERVICE>].queued.propagateContextProperties = ["features"])
Fixed
- The event property
retryOpenAfternow works as expected. - [CAP Queue] req.query is not correctly serialized if a cds context with a more complex query is queued/outboxed
- [CAP Queue] Allow to propagate cds.context properties (e.g. features). This can be configured per event (
Fixes 3
Notes
Fixed
- [Admin Service] Remove impl annotation
- [Namespaces] Remove old events only in the processing namespaces
- [Processing] Fix select query that could fail for old HANA DB-Adapter
Features 1, Fixes 3
Notes
Added
- [CAP Queue] Configuration is initialized by CDS bootstrap instead of lazy initialization on first use.
Fixed
- [Admin Service] Correctly return open locks after adding namespace to locks
- [Admin Service] Publish events improved error handling
- [Event Processing] In some cases where more delayed events than the
selectMaxChunkSizeexisted, the processing of open events was delayed.
Fixes 1
Notes
Fixed
- Acquiring the lock in the single-tenant, non-Redis use case did not always work
Breaking 2, Features 6
Notes
Breaking Changes
- Removed
redisNamespace: TheredisNamespaceparameter has been replaced by the newnamespaceconcept. Use thenamespaceparameter to achieve the same functionality. - Legacy Event Processor behavior change: Events without a returned status are now treated as successfully processed (instead of erroneous). This prevents multiple processing attempts for the same event.
Added
- Namespace support for multi-service setups: Introduced namespaces to support scenarios where multiple microservices share the same database (HDI Container). See documentation.
- Enhanced CAP outbox service return values: CAP outbox services can now return more detailed information. In addition to the event status, you can now update the
startAfteranderrorfields of an event. See documentation. - Configurable reprocessing for 'Open' event status: With the event configuration property
When an event status ofOpenis returned, you can now configure when such events should be reprocessed. This allows you to mark event processing as invalid without increasing the attempt counter. - CDS namespace support in service names: Service names now support CDS namespaces, e.g.,
cds.env.requires["cds.xt.DeploymentService"]. - Support for
cds.queued: Added support for thecds.queuedproperty. - [Admin Service] allow to publish events via Admin Service to all or a defined list of tenants
- Removed
Features 1
Notes
Added
- [Event Configuration]
propagateHeadersallows forwarding headers from the original CDS context to the outbox call by specifying their names in an array.
- [Event Configuration]
Features 2
Notes
Added
- Added
authInfoto cds.User as CDS 9.3 deprecatedtokenInfo. - Disable the automatic processing of suspended tenants. Can be turned off using
disableProcessingOfSuspendedTenants.
- Added
Fixes 1
Notes
Fixed
- [CAP outbox] adding periodic events of CAP services with the same action name
Features 1, Fixes 1
Notes
Fixed
- [CAP outbox] broadcasting of open events did not work in some cases - 2
Added
- Remove locks via admin service
Features 1, Fixes 2
Notes
Added
- Added trace context to clustered events when all events share the same trace context
Fixed
- correctly account for the random offset of periodic events when checking whether events need to be updated
- improved error handling during Redis broadcast of open events when a database transaction cannot be opened for a tenant
Fixes 2
Notes
Fixed
- [CAP outbox] keepAlive time was not correctly calculated for action specific configuration of a CAP service
- [general] distributed locks where not correctly released in some cases during shutdown of an application server
Features 1
Notes
Added
- [CAP outbox] add support for
cds.queuedandcds.unqueued - [Event Processing] add offset to schedule next run
- [Telemetry] add more telemetry information for event processing
Fixed
- [Timezone] server timezone was not always correctly considered starting with version 1.9.4
- [CAP outbox] add support for
Features 3, Fixes 1
Notes
Added
- [CAP outbox] add support for
cds.queuedandcds.unqueued - [Event Processing] add offset to schedule next run
- [Telemetry] add more telemetry information for event processing
Fixed
- [Timezone] server timezone was not always correctly considered starting with version 1.9.4
- [CAP outbox] add support for
Fixes 1
Notes
Fixed
- [CAP outbox] redis pub/sub for periodic events of CAP outbox services did not work in special cases
Features 1, Fixes 1
Notes
Added
- [Event Configuration] randomOffsetPeriodicEvents (global default) + randomOffset: This property allows adding a random offset in seconds to periodic events to stagger their start times and reduce load spikes on the application server.
Fixed
- [CAP outbox] correctly connect to service in combination with redis and service specific configuration
Features 7, Changed 1
Notes
Added
- [CAP outbox] the features below bring feature parity to CAP outbox services in comparison to EventQueue Classes. Starting from v1.10.0 it's recommend to use CAP outbox services instead of EventQueue Classes.
- [CAP outbox] periodic events for actions/events in CAP outbox services Documentation
- [CAP outbox] allow to specify specific event settings of every action in the CAP service Documentation
- [CAP outbox] enable event clustering with convince helper functions Documentation
- [CAP outbox] enable exceeded retry hook Documentation
- [Event Configuration] timeBucket: This property allows events of the same type to be grouped and processed in batches.
The value of this property is a cron pattern.
Example:
*/30 * * * * *— This means all events published within 30 seconds are processed together. - [Event Configuration] AppNames (apps on which an event should be processed) now supports regex expressions. Example: /srv-backend/i
Changed
- [CAP outbox]
req.context._eventQueuehas moved toreq.eventQueue
Features 1
Notes
Added
- [CONFIG] Added redisNamespace option to prefix Redis interactions, useful when multiple microservices share the same Redis instance.
Features 1, Changed 1, Fixes 2
Notes
Added
- propagate W3TraceContext from event creation to event-processing
Changed
- Updated cron-parser to major version ^5.0.0
Fixed
- fixed keep alive for some edge cases
- fix after deployments - parallel checking of changes to periodic events and processing of open events
Fixes 2
Notes
Fixed
- Do not require yaml config file if events are defined via configuration
- Renew redis lock is expired and no new lock exists
Features 3
Notes
Added
- CAP outbox: allow to return the event status. Documentation
- Keep alive handling to reduce the time after which events are restarted after a server crash.
- Allow to define events and periodic events by configuration. Documentation
Features 1
Notes
Added
- added event option increasePriorityOverTime to disable the automatic increase of priority for long-waiting events
Features 1, Fixes 2
Notes
Added
- stringify payload in
publishEventif payload is not already a string
Fixed
- reduced XSUAA error message to minimum
- request
tokenInfoonly in multi-tenancy case
- stringify payload in
Features 1, Fixes 2
Notes
Added
- Introduced the ability to configure a tenant filter for event processing, enabling features like sticky tenant processing and dedicated application instances.
Fixed
- Resolved an issue with transaction handling where an event handler attaching an
on-succeededcallback would throw an exception. - Prevented error logs from being generated when event configurations are missing.
Fixes 2
Notes
Fixed
- introduced a shutdown timeout to ensure the server stops even if Redis clients fail to close
- better connection handling for redis
Features 1
Notes
Added
- allow to override more redis options e.g. to connect to a remote redis-instance via SSH tunnel
Features 2, Changed 1, Fixes 2
Notes
Added
multiInstanceProcessingallows to process the same event type/subtype on multiple application instances- adding logs for shutdown handler of redis connections
Fixed
- Addressed an orphaned usage of
isRunnerDeactivated. - Resolved a memory leak in the distributed locking mechanism, which occurred when tracking existing locks for a large number of events.
Changed
- Different way of rollback transaction to avoid errors in open telemetry
Features 2, Changed 1, Fixes 2
Notes
Added
- Added a suspended status for events. Events in this status won't be processed until changed back to open. Useful for delaying processing when the event isn't ready.
- Added an option to filter tenant lists when checking for open events. Published events are still processed for all tenants, but periodic events can be filtered. Distributed events via Redis that are not part of the current configuration to support DWC use cases where the same app might have different software states.
Changed
- replace
req.user.authInfowithreq.user.tokenInfoto following the standard of CAP Node.js
Fixed
- long blocked event-loop could lead to stop processing of events
- Redis integration: PX values for keys require integer input. Values are longer automatically rounded.
Features 3
Notes
Added
- allow redis mode for single tenant applications
- error message if redis is not available during connection check
- add option
crashOnRedisUnavailableto crash the app if redis is not available during the connection check
Features 3, Fixes 1
Notes
Added
- Added support for defining periodic event schedules using cron expressions, providing more flexible and precise scheduling options beyond simple intervals in seconds. See documentation.
triggerEventProcessingRedisis a public api now. This can trigger the processing of multiple events via redis.- The central configuration property
publishEventBlockListhas been introduced, enabling the option to disable the publication of the event block list to all application instances. The default value is set totrueto prevent immediate impact on existing functionality.
Fixed
- do not initialize the event-queue during cds build/compile steps
Features 2
Notes
Added
- Enhanced the configuration options to specify not only the application name but also the instance index where the event should be processed. See documentation.
- Enable more event publish properties for CDS outboxed service. See documentation.
Fixes 1
Notes
Fixed
- In some cases the event broadcasting is delayed if a periodic event can't obtain the processing lock
Features 2
Notes
Added
- Introduced the
retryFailedAfterconfiguration option, allowing you to specify the interval (in milliseconds) after which failed events should be retried, provided the retry limit has not been exceeded. - Increased test coverage for fetching authInfo with @sap/xssec
- Introduced the
Features 1
Notes
Added
- [outbox] add option to use defined user for event-queue also for CAP outboxed services
Fixes 2
Notes
Fixed
- [openTelemetry] avoid empty traces for persist-event-status
- [openTelemetry] more resilient for finished spans
Features 3, Changed 2
Notes
Changed
- upgrade to @sap/xssec 4
- Testing with cds 8
Added
- Export
WorkerQueuefor monitoring purposes to provide insights into the running load of the application. - JSDocs: added addEntryToProcessingMap for EventQueueProcessorBase
- Enhanced Event Processing: Events will continue to be processed even if the initial processing time is exceeded. Events are now broadcast, allowing different application instances to pick them up. The existing worker queue is used to ensure proper load balancing.
Features 1, Fixes 2
Notes
Added
- Added an option to events to specify which application instance should process the event. See documentation.
Fixed
- Avoid issues with not connected CAP service and open events
- fix clear timeout tenant unsubscribe
Features 1, Changed 1
Notes
Changed
- single tenant performance improvements
Added
- better test coverage for single tenant
Features 1, Fixes 1
Notes
Added
- Added tracing to redis pub/sub
Fixed
- Workaround for memory issues due to bug in node.js with timers: https://github.com/nodejs/node/pull/53337
Fixes 2
Notes
Fixed
- Bug in CDS 7.9.2: Introduced a bug affecting the instant processing of events. This release includes a temporary workaround until the bug is fixed.
- Memory Leaks: Fixed memory leaks caused by setTimeout returning an object instead of a primitive value
Features 3, Fixes 2
Notes
Added
- Telemetry instrumentation for processing events. This can be enabled with the
enableCAPTelemetrysetting. - Additional types.
- allow to use
skipInsertEventsBeforeCommitinpublishEventfunction.
Fixed
cds.build.registermay be undefined if@sap/cds-dkis not installed locally or globally.- Double release of locks for periodic event processing.
- Telemetry instrumentation for processing events. This can be enabled with the
Features 2, Fixes 1
Notes
Added
- federate unsubscribe events via redis to all application instances and allow to register custom handler for unsubscribe events
- types for event-queue config
Fixed
- upgrade dependencies
Features 2, Changed 1
Notes
Added
- typescript types for the most common functions
- add subdomain for logging of broadcasting events via redis
Changed
- the getter of eventType cuts the periodic event suffix and returns the exact name of the event definition
Features 3, Fixes 1
Notes
Added
- [cds-outboxed] Add eventQueue processor, key, queueEntries, and payload to req (can be accessed via req.context._eventQueue)
- Add option
insertEventsBeforeCommitto improve performance forpublishEvent. - Add cds shutdown handler to clear existing redis locks before shutdown of the instance.
Fixed
- [cds-outboxed] Call cds.connect.to for open outboxed events
Changed 2
Notes
Changed
- Removed authInfo from context.http.req and moved to a full-fledged xssec/xsuaa authInfo attached to context.user.authInfo
- [cds-plugin] return promise for init for cds to wait until plugin is fully initialized
Features 1, Changed 2
Notes
Added
- add to supply custom redis options for create client.
Changed
- Reworked periodic processing of all events to be more efficient and to reduce the load on the database and use less database connections.
- Removed support for custom tables. The event-queue now uses always the provided tables.
Fixes 1
Notes
Fixed
- In instances of overlapping intervals, periodic events may fall behind schedule.
Features 1, Changed 1
Notes
Added
- Trigger processing again if time is exceeded for event processing.
Changed
- removed CF check to enable redis to allow using redis even if process.env.USER is not vcap.
Changed 3
Notes
Changed
- Default for runInterval changed from 5 minutes to 25 minutes. This is to reduce the load on the database.
- The load of the internal periodic event DELETE_EVENTS is increased to 20 to only process 5 tenants in parallel. This is to reduce the load on the database.
- The max processing time for the event-queue is set to the runInterval.
Features 1, Fixes 1
Notes
Added
- option for delayed events for cds outboxed services: documentation
Fixed
- Delay registration of processors until the database connection is established.
Changed 2, Fixes 1
Notes
Fixed
- Log message for blocked events
Changed
- Reduce log severity for skip publish redis event as no lock is available to debug
- Only do etag checks after a processing time of 10 minutes to improve performance
Features 2, Fixes 1
Notes
Added
- add option to block ad-hoc events. More information in documentation.
- Define priorities for event types. More information in documentation.
Fixed
- In more cases the global cds.context was not set correctly because the async-chain could break in high load scenarios.
Fixes 1
Notes
Fixed
- In some cases the global cds.context was not set correctly because the async-chain could break in high load scenarios.
Features 1, Changed 1, Fixes 1
Notes
Added
- The
cleanupLocksAndEventsForDevparameter allows for the cleanup of all locks and events in progress during server start. This option is intended for development purposes.
Fixed
- Allow to initialize event-queue without config.yml in case of usage as CAP outbox
Changed
- The parameter
runIntervalis checked during init. Only values greater than 10 seconds are allowed.
- The
Features 1, Changed 1
Notes
Added
- option to set user for all created cds contexts and with that the user for updating the managed database fields.
Changed
- rework initialization via cds-plugin.
Features 1
Notes
Added
- enable event-queue to work as CAP outbox. The flag
useAsCAPOutboxreplaces the CAP implementation by the event-queue.
- enable event-queue to work as CAP outbox. The flag
Fixes 2
Notes
Fixed
- update tenant hash for newly onboarded tenants
- consider running periodic events during update of periodic events
Features 1
Notes
Added
- introduced
thresholdLoggingEventProcessingconfig variable to adjust logging threshold for event processing documentation
- introduced
Features 6, Changed 3, Fixes 2
Notes
Added
- block the run of periodic events via config documentation
- Add a label to the workerQueue. This will help in understanding which events were throttled in case of throttling.
- The
isEventQueueActiveconfiguration can now be used to deactivate the runtime processing of all events. - with the function
getLastSuccessfulRunTimestampthe timestamp of the last successful run for a periodic event can be requested. documentation - Added a performance tracer for periodic events. This will log any processing that takes longer than 50ms.
- Added type and subtype to all performance traces.
Fixed
- Catch exception during Redis channel subscription
- Endless running if event status open is returned and checkForNextChunk is activated
Changed
- Refactored the deletion process for completed events. The default setting for deleting processed events has now been updated to a 7-day timeframe. documentation
- the configuration variable
isRunnerDeactivatedis renamed toisEventQueueActive. - Reduced the log severity to debug for "Selected event queue entries for processing" during periodic events.
Changed 3, Fixes 2
Notes
Changed
- Removed the
instanceLoadLimitparameter. The limit is now statically set to 100. The event load should henceforth be specified as a percentage. - Upgrade docs dependencies
- Adjusted workerQueue logging thresholds for waiting time
Fixed
- fix transaction handling for periodic events
- set cds.context correctly for periodic runner
- Removed the
Features 1, Changed 2, Fixes 1
Notes
Added
- logger get setter for better providing own logger
Changed
- new documentation
- improve logging
Fixed
- small bug fixes and improvements for periodic events
Features 1, Changed 1
Notes
Added
- further improve periodic events
Changed
- rework of load management and concurrency control
Features 3
Notes
Added
- implementation of delayed events, which allows to publish events that should be processed at a later point in time
- option to disable redis + refactoring of config
- improved HANA integration test setup
Features 1, Changed 1, Fixes 1
Notes
Added
- example project
Fixed
- small bug fixes for local mode
Changed
- better documentation
Features 1, Fixes 1
Notes
Added
- allow to distribute config via redis to instances
Fixed
- move loggers from top-level to functions because cds 7 has different require orders. This the event-queue to use the custom project loggers
Features 2, Fixes 2
Notes
Added
- Delete event entries after defined number of days
- improve exceeded event handling
Fixed
- fix model loading for cds-plugin
- fix setInterval clock drift
Features 2
Notes
Added
- new transaction modes
- register rollback of transaction in combination with returning successful event processing status
Others providing
- cds-kafkacds-kafkaA Kafka adapter for CAP that registers Kafka topics as a CDS messaging service over KafkaJS, so emit and on work unchanged, with per-message keys, partitions and topics set through headers.independent, capKafka adapter exposing topics as a CDS messaging service
- Event MeshEvent MeshManaged queues and topics over AMQP, MQTT and a REST gateway, and the bus SAP's own applications publish their business events to.sap official, btpManaged queues and topics over AMQP, MQTT and REST
- com.sap.cds:cds-services-bomcom.sap.cds:cds-services-bomThe Maven bill of materials for CAP Java, pinning every com.sap.cds module in a release, from the API and core runtime to the Spring Boot starters and the CQN engine, to the same version.sap official, capMaven bill of materials pinning CAP Java module versions
- @cap-js-community/sap-afc-sdk@cap-js-community/sap-afc-sdkSDK for building SAP Advanced Financial Closing scheduling providers on CDS.community org, capSDK for SAP Advanced Financial Closing scheduling providers on CDS
- cds-event-monitoringcds-event-monitoringA CAP plugin that stores every event received on its configured messaging topics in a table, with a Fiori-annotated service to browse them, resend events and drain a dead-message queue.independent, capStores, browses and resends messages a CAP service receives
- @odatano/watch@odatano/watchWatches Cardano addresses, payment credentials and minting policies from inside CAP, emitting events with full UTxO payloads and persisting them so a missed window can be replayed.independent, capCAP plugin watching Cardano addresses and emitting events
- @sap/cds@sap/cdsThe CAP Node.js runtime, which compiles the CDS model, serves the services declared in it, answers generic requests before any handler runs, and loads every cds-plugin.sap official, capCAP Node.js runtime
- cds-natscds-natsNATS as a messaging service for the CAP Node.js runtime, the broker behind cds.connect for emit and subscribe, for teams already running NATS rather than Event Mesh or Redis.independent, capNATS messaging service for the CAP Node.js runtime
- SAP Job Scheduling serviceSAP Job Scheduling serviceCalls an application's endpoint on a schedule or once at a time and keeps the log of every run — cron without a process of your own to keep alive.sap official, btpCalls an application endpoint on a schedule and logs each run
- @sap/cds@sap/cdsThe CAP Node.js runtime, which compiles the CDS model, serves the services declared in it, answers generic requests before any handler runs, and loads every cds-plugin.sap official, capCAP Node.js runtime
Details
Sources
Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.
Compatibility and provenance
Contributors
History in the atlas
- Verdict rings retired. What the ring compressed now lives in readings derived from facts (liveness, compatibility, reach) and in the description fields, so a thing can be dead as a dependency and still worth reading. VISION §9.
- First seen.
For your agent
- Ref
artifact:cap-js-community-event-queue- JSON
- /artifacts/cap-js-community-event-queue.json
- MCP
- Connecting an agent