CDS pluginCDS plugintypeInstalls into a CAP project and extends the runtime. CAP loads it through cds.requires or the plugin hook.See every one →What this type is →by a community orgby a community orgoriginPublished by a community organisation, so it outlives any one maintainer.See every one →

@cap-js-community/event-queue

Transactional processing of asynchronous and periodic events, with instant dispatch over Redis Pub/Sub and load spread across every application instance.

Facts

Latestv2.3.2ReleasedLast pushLicenceApache-2.0

Where it sits

Lives in
Provides
Async processingCAPAsync processingcapabilityDoing 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.Job schedulingCAPJob schedulingcapabilityRunning something later, or on a cadence, without keeping a process alive to do it — a nightly job, a retry in an hour, a report on the first of the month — and knowing afterwards whether it ran.
Flavors
Node.jsfrom its runtime
Runs
Cloud FoundryKyma
Requires
RedisRedisoutside the atlasCarries events between application instances over publish/subscribe — the part that makes the queue load-balanced across a scaled app rather than per instance.

Who is behind it

cap-js-communitycap-js-communityOrganisationMaintains this
In the atlas: maintains 10
@cap-js-community
Oliver KlemenzOliver KlemenzPersonMaintains this
In the atlas: maintains 4, contributes to 6
@oklemenz2
maintainersChristian NeuPersonContributes to this
In the atlas: contributes to 5
@christianneu
Dr. David A. KunzPersonContributes to this
In the atlas: contributes to 16
@David-Kunz
Lothar BenderPersonContributes to this
In the atlas: contributes to 9
@LotharBender
Emanuel BahrPersonContributes to this
In the atlas: contributes to 3
@Phantomkeks
Pierre FritschPersonContributes to this
In the atlas: contributes to 5
@PierreFritsch
sjvansPersonContributes to this
In the atlas: contributes to 45
@sjvans
Max GruenfelderPersonContributes to this
In the atlas: contributes to 7
@soccermax
Tux240PersonContributes to this
In the atlas: contributes to 1
@Tux240
8 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.
SAP Developer License Agreement 3.2 CAP →

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 Mesh or Kafka. Without Redis, 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

Connections5

Install

npm add @cap-js-community/event-queue
The config you actually write
"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
Your CAP applicationdocumentedrequiresRedis, systemRedissystem@cap-js-community/event-queue, module@cap-js-community/ev…
SAPnot SAP's, or the project's owndocumented only

README

quoted from cap-js-community/event-queue under Apache-2.0, read
cap-js-community/event-queue/README.mdOn GitHub

@cap-js-community/event-queue

npm version monthly downloads REUSE status CI Main

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.

Apache-2.0, read

History

Latest

v2.3.2

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 alwaysCommit and alwaysRollback, 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 #failed for them. Other events of the chunk keep their status.
  • With insertEventsBeforeCommit: false, #succeeded and #done follow-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 exceeded on long running instances.
  1. v2.3.1

    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 in sap.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 namespace and tenant swapped, 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.
    • executeInNewTransaction reused an already open transaction of the caller on every database except HANA. On PostgreSQL this silently turned tx.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.
  2. v2.3.0

    Changed 1, Fixes 1

    Notes
    Changed
    • Adjustments for CDS 10: upgraded to @sap/cds 10 and @cap-js/db-service, @cap-js/hana, and @cap-js/sqlite 3, and disabled the CDS scheduling service (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 createdAt or startAfter is within the last 30 days, but checkAndInsertPeriodicEvents still treated the stale Open occurrence 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.
  3. v2.2.0

    Features 1

    Notes
    Added
    • New tenant filter callback tenantIdFilterEventProcessingGlobal for globally excluding tenants from event processing. Unlike the instance-specific tenantIdFilterEventProcessing (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 return true. See documentation.
  4. v2.1.2

    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 setTimeout overflow (which triggered a spurious immediate processing run) for cron cadences greater than ~24.8 days.
  5. v2.1.1

    Features 2

    Notes
    Added
    • [CAP Queue] Support cds.env.requires[<SERVICE>].outboxed as an additional configuration alias alongside outbox and queued. Properties from outboxed override outbox (and are themselves overridden by queued), enabling per-service configuration when a service is registered via the outboxed key.
    • New initialize option authCacheExpiryReductionMaxPercent (also configurable via cds.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. Default 10; allowed range [0, 80] (values outside this range throw on initialization).
  6. v2.1.0

    Features 4

    Notes
    Added
    • [CAP Queue] Add support for event chaining: register #succeeded and #failed successor handlers that are automatically triggered based on the outcome of an event handler. See documentation.
    • [CAP Queue] Add #done unconditional successor — fires after every event regardless of success or failure, analogous to a finally block. Useful for cleanup that must always run (releasing locks, audit events, etc.).
    • [CAP Queue] Successor handlers (#succeeded, #failed, #done) can be configured independently in the events section of the service's queued configuration, 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 publishes cap.event_queue.jobs.pending, cap.event_queue.jobs.in_progress, and cap.event_queue.stats.refresh_age as Observable Gauges, broken down by namespace. See documentation.
  7. v2.0.5

    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 retryOpenAfter now works as expected.
    • [CAP Queue] req.query is not correctly serialized if a cds context with a more complex query is queued/outboxed
  8. v2.0.4

    Fixes 1

    Notes
    Fixed
    • Fix for deprecated model reflection
  9. v2.0.3

    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
  10. v2.0.2

    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 selectMaxChunkSize existed, the processing of open events was delayed.
  11. v2.0.1

    Fixes 1

    Notes
    Fixed
    • Acquiring the lock in the single-tenant, non-Redis use case did not always work
  12. v2.0.0dated in the atlas

    Breaking 2, Features 6

    Notes
    Breaking Changes
    • Removed redisNamespace: The redisNamespace parameter has been replaced by the new namespace concept. Use the namespace parameter 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 startAfter and error fields of an event. See documentation.
    • Configurable reprocessing for 'Open' event status: With the event configuration property When an event status of Open is 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 the cds.queued property.
    • [Admin Service] allow to publish events via Admin Service to all or a defined list of tenants
  13. v1.11.1

    Features 1

    Notes
    Added
    • [Event Configuration] propagateHeaders allows forwarding headers from the original CDS context to the outbox call by specifying their names in an array.
  14. v1.11.0

    Features 2

    Notes
    Added
    • Added authInfo to cds.User as CDS 9.3 deprecated tokenInfo.
    • Disable the automatic processing of suspended tenants. Can be turned off using disableProcessingOfSuspendedTenants.
  15. v1.10.10

    Fixes 1

    Notes
    Fixed
    • [CAP outbox] adding periodic events of CAP services with the same action name
  16. v1.10.9

    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
  17. v1.10.8

    Fixes 1

    Notes
    Fixed
    • [CAP outbox] broadcasting of open events did not work in some cases
  18. v1.10.7

    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
  19. v1.10.6

    Other 1

    Notes
    • [admin-service] fix admin service skip persistence
  20. v1.10.5

    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
  21. v1.10.4

    Features 1

    Notes
    Added
    • [CAP outbox] add support for cds.queued and cds.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
  22. v1.10.4

    Features 3, Fixes 1

    Notes
    Added
    • [CAP outbox] add support for cds.queued and cds.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
  23. v1.10.3

    Fixes 1

    Notes
    Fixed
    • [CAP outbox] redis pub/sub for periodic events of CAP outbox services did not work in special cases
  24. v1.10.2

    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
  25. v1.10.1

    Fixes 1

    Notes
    Fixed
    • [CAP outbox] tokenInfo was not correctly exposed on req.user.tokenInfo
  26. v1.10.0

    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._eventQueue has moved to req.eventQueue
  27. v1.9.4

    Features 1

    Notes
    Added
    • [CONFIG] Added redisNamespace option to prefix Redis interactions, useful when multiple microservices share the same Redis instance.
  28. v1.9.3

    Fixes 1

    Notes
    Fixed
    • removed not wanted info log statements
  29. v1.9.2

    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
  30. v1.9.1

    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
  31. v1.9.0

    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
  32. v1.8.7

    Features 1

    Notes
    Added
    • added event option increasePriorityOverTime to disable the automatic increase of priority for long-waiting events
  33. v1.8.6

    Features 1, Fixes 2

    Notes
    Added
    • stringify payload in publishEvent if payload is not already a string
    Fixed
    • reduced XSUAA error message to minimum
    • request tokenInfo only in multi-tenancy case
  34. v1.8.5

    Features 1

    Notes
    Added
    • added more event configuration parameters for the CAP outbox
  35. v1.8.4

    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-succeeded callback would throw an exception.
    • Prevented error logs from being generated when event configurations are missing.
  36. v1.8.3

    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
  37. v1.8.2

    Features 1

    Notes
    Added
  38. v1.8.1

    Features 2, Changed 1, Fixes 2

    Notes
    Added
    • multiInstanceProcessing allows 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
  39. v1.8.0

    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.authInfo with req.user.tokenInfo to 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.
  40. v1.7.3

    Features 3

    Notes
    Added
    • allow redis mode for single tenant applications
    • error message if redis is not available during connection check
    • add option crashOnRedisUnavailable to crash the app if redis is not available during the connection check
  41. v1.7.2

    Fixes 2

    Notes
    Fixed
    • calculation of changed cron patterns
    • fix init event-queue if no config
  42. v1.7.1

    Fixes 1

    Notes
    Fixed
    • typo in useCronTimezone
  43. v1.7.0

    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.
    • triggerEventProcessingRedis is a public api now. This can trigger the processing of multiple events via redis.
    • The central configuration property publishEventBlockList has been introduced, enabling the option to disable the publication of the event block list to all application instances. The default value is set to true to prevent immediate impact on existing functionality.
    Fixed
    • do not initialize the event-queue during cds build/compile steps
  44. v1.6.7

    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.
  45. v1.6.6

    Fixes 1

    Notes
    Fixed
    • In some cases the event broadcasting is delayed if a periodic event can't obtain the processing lock
  46. v1.6.5

    Features 2

    Notes
    Added
    • Introduced the retryFailedAfter configuration 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
  47. v1.6.4

    Features 1

    Notes
    Added
    • [outbox] add option to use defined user for event-queue also for CAP outboxed services
  48. v1.6.3

    Fixes 2

    Notes
    Fixed
    • [openTelemetry] avoid empty traces for persist-event-status
    • [openTelemetry] more resilient for finished spans
  49. v1.6.2

    Fixes 1

    Notes
    Fixed
    • pass correct tenant to fetch authInfo
  50. v1.6.1

    Features 3, Changed 2

    Notes
    Changed
    • upgrade to @sap/xssec 4
    • Testing with cds 8
    Added
    • Export WorkerQueue for 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.
  51. v1.6.0

    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
  52. v1.5.3

    Features 1, Changed 1

    Notes
    Changed
    • single tenant performance improvements
    Added
    • better test coverage for single tenant
  53. v1.5.2

    Features 1, Fixes 1

    Notes
    Added
    • Added tracing to redis pub/sub
    Fixed
  54. v1.5.1

    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
  55. v1.5.0

    Features 3, Fixes 2

    Notes
    Added
    • Telemetry instrumentation for processing events. This can be enabled with the enableCAPTelemetry setting.
    • Additional types.
    • allow to use skipInsertEventsBeforeCommit in publishEvent function.
    Fixed
    • cds.build.register may be undefined if @sap/cds-dk is not installed locally or globally.
    • Double release of locks for periodic event processing.
  56. v1.4.6

    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
  57. v1.4.5

    Fixes 1

    Notes
    Fixed
    • add xssec authInfo to CDS user also for CAP outbox
  58. v1.4.4

    Fixes 1

    Notes
    Fixed
    • insertEventsBeforeCommit did not commit all events in certain scenarios.
  59. v1.4.3

    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
  60. v1.4.2

    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 insertEventsBeforeCommit to improve performance for publishEvent.
    • 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
  61. v1.4.1

    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
  62. v1.4.0

    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.
  63. v1.3.6

    Fixes 1

    Notes
    Fixed
    • Redis reconnects
  64. v1.3.5

    Fixes 1

    Notes
    Fixed
    • In instances of overlapping intervals, periodic events may fall behind schedule.
  65. v1.3.4

    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.
  66. v1.3.3

    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.
  67. v1.3.2

    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.
  68. v1.3.1

    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
  69. v1.3.0

    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.
  70. v1.2.6

    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.
  71. v1.2.5

    Features 1, Changed 1, Fixes 1

    Notes
    Added
    • The cleanupLocksAndEventsForDev parameter 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 runInterval is checked during init. Only values greater than 10 seconds are allowed.
  72. v1.2.4

    Changed 1

    Notes
    Changed
    • Optimize promise handling
  73. v1.2.3

    Changed 1

    Notes
    Changed
    • update redis to 4.6.13
  74. v1.2.2

    Features 2

    Notes
    Added
    • improved logging
    • better tenant subdomain caching
  75. v1.2.1

    Fixes 1

    Notes
    Fixed
    • fix registration of db-handler
  76. v1.2.0

    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.
  77. v1.1.0

    Features 1

    Notes
    Added
    • enable event-queue to work as CAP outbox. The flag useAsCAPOutbox replaces the CAP implementation by the event-queue.
  78. v1.0.3

    Fixes 2

    Notes
    Fixed
    • update tenant hash for newly onboarded tenants
    • consider running periodic events during update of periodic events
  79. v1.0.2

    Features 1

    Notes
    Added
    • filter out not invalid tenant ids during processing
  80. v1.0.1

    Features 1

    Notes
    Added
    • introduced thresholdLoggingEventProcessing config variable to adjust logging threshold for event processing documentation
  81. v1.0.0

    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 isEventQueueActive configuration can now be used to deactivate the runtime processing of all events.
    • with the function getLastSuccessfulRunTimestamp the 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 isRunnerDeactivated is renamed to isEventQueueActive.
    • Reduced the log severity to debug for "Selected event queue entries for processing" during periodic events.
  82. v0.3.0

    Changed 3, Fixes 2

    Notes
    Changed
    • Removed the instanceLoadLimit parameter. 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
  83. v0.2.5

    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
  84. v0.2.4

    Features 1, Changed 1

    Notes
    Added
    • further improve periodic events
    Changed
    • rework of load management and concurrency control
  85. v0.2.3

    Fixes 1

    Notes
    Fixed
    • fixes and improvements for periodic events
  86. v0.2.2

    Features 1

    Notes
    Added
    • periodic events - use event-queue to process periodic jobs
  87. v0.2.1

    Features 2

    Notes
    Added
    • cds shutdown - close redis clients
    • add redis cluster support
  88. v0.2.0

    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
  89. v0.1.58

    Changed 2

    Notes
    Changed
    • update dependencies
    • remove uuid dependency
  90. v0.1.56

    Features 1, Changed 1, Fixes 1

    Notes
    Added
    • example project
    Fixed
    • small bug fixes for local mode
    Changed
    • better documentation
  91. v0.1.55

    Fixes 1

    Notes
    Fixed
    • fix redis connect client
  92. v0.1.54

    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
  93. v0.1.53

    Features 1

    Notes
    Added
    • more resilient for small clock shifts in setInterval
  94. v0.1.52

    Fixes 1

    Notes
    Fixed
    • fix missing catch for isOutdatedAndKeepalive
  95. v0.1.51

    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
  96. v0.1.50

    Features 2

    Notes
    Added
    • new transaction modes
    • register rollback of transaction in combination with returning successful event processing status
  97. v0.1.49

    Features 1

    Notes
    Added
    • first npm release after internal development
2,268downloads per week, npm
Weekly downloads for @cap-js-community/event-queue26 complete calendar weeks from 2026-04-20 to 2026-10-18; the latest total is 2268.20 Apr – 26 Apr: 43827 Apr – 3 May: 6134 May – 10 May: 96111 May – 17 May: 92018 May – 24 May: 40325 May – 31 May: 8091 Jun – 7 Jun: 8768 Jun – 14 Jun: 97815 Jun – 21 Jun: 1,24322 Jun – 28 Jun: 1,09029 Jun – 5 Jul: 7876 Jul – 12 Jul: 58213 Jul – 19 Jul: 70620 Jul – 26 Jul: 71027 Jul – 2 Aug: 8903 Aug – 9 Aug: 87110 Aug – 16 Aug: 83317 Aug – 23 Aug: 3,15524 Aug – 30 Aug: 2,77931 Aug – 6 Sept: 2,7727 Sept – 13 Sept: 3,12014 Sept – 20 Sept: 4,11721 Sept – 27 Sept: 2,52828 Sept – 4 Oct: 3,3935 Oct – 11 Oct: 3,04712 Oct – 18 Oct: 2,268

Others providing9

Declared alternative
  1. cds-kafkaKafka adapter exposing topics as a CDS messaging service
Async processing
  1. ABAP-PRCFramework for multi-step ABAP processes with monitoringfrom ABAP
  2. Event MeshManaged queues and topics over AMQP, MQTT and RESTfrom BTP/BAIP
  3. com.sap.cds:cds-services-bomMaven bill of materials pinning CAP Java module versionsfrom CAP
  4. @cap-js-community/sap-afc-sdkSDK for SAP Advanced Financial Closing scheduling providers on CDSfrom CAP
  5. cds-event-monitoringStores, browses and resends messages a CAP service receivesfrom CAP
  6. @odatano/watchCAP plugin watching Cardano addresses and emitting eventsfrom CAP
  7. @sap/cdsCAP Node.js runtimefrom CAP
  8. cds-natsNATS messaging service for the CAP Node.js runtimefrom CAP
Job scheduling
  1. SAP Job Scheduling serviceCalls an application endpoint on a schedule and logs each runfrom BTP/BAIP
  2. @sap/cdsCAP Node.js runtimefrom CAP

Details

Sources6
npm registrydiscovered herechecked
GitHub APIdiscovered here, cap-js-communitychecked
bestofcapjsdiscovered herechecked
npm registry, @cap-js-community/event-queueversion, releases, installschecked
github.com/git+https://github.com/cap-js-community/event-queue.gittree, pushes, contributors, CIchecked
README.mdquoted, and what the entry declareschecked

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
runtimesnode
multitenancysafe
deploymentCloud Foundry, Kyma
latestv2.3.2
first release
releases and cadence130, ~15d median
discovered vianpm registry, GitHub API · cap-js-community, bestofcapjs
first seen in the atlas
ecosystem and domaincap, integration-and-messaging
Contributors8
History in the atlas2
  1. 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.
  2. First seen.
For your agent
Ref
artifact:cap-js-community-event-queue
JSON
/artifacts/cap-js-community-event-queue.json
MCP
Connecting an agent