Skip to content

Commit

Permalink
clarify event handler max concurrency note
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonstreator committed Dec 22, 2023
1 parent 5877188 commit a99d56e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ export const processEvents = async <TxOBEventType extends string>(
_opts.logger?.debug(`processing event`, { eventId: lockedEvent.id });

// TODO: consider concurrently processing events handler with max concurrency configuration
//
// handlers are already concurrently executed but a configuration for max concurrency could be
// nice especially if a client has many handlers for a given event type
await Promise.allSettled(
Object.entries(eventHandlerMap).map(
async ([handlerName, handler]): Promise<void> => {
Expand Down

0 comments on commit a99d56e

Please sign in to comment.