BatchDispatcher
Defined in: packages/webhook/src/dispatcher/batch.dispatcher.ts:15
Webhook System 실시간 메시지 이벤트 알림 시스템
Extends
Section titled “Extends”EventEmitter
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new BatchDispatcher(
config?):BatchDispatcher
Defined in: packages/webhook/src/dispatcher/batch.dispatcher.ts:29
Parameters
Section titled “Parameters”config?
Section titled “config?”Partial<BatchConfig> = {}
Returns
Section titled “Returns”BatchDispatcher
Overrides
Section titled “Overrides”EventEmitter.constructor
Methods
Section titled “Methods”addJob()
Section titled “addJob()”addJob(
job):Promise<void>
Defined in: packages/webhook/src/dispatcher/batch.dispatcher.ts:38
배치 작업 추가
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<void>
addListener()
Section titled “addListener()”addListener(
eventName,listener):this
Defined in: packages/webhook/src/shared/event-emitter.ts:16
Parameters
Section titled “Parameters”eventName
Section titled “eventName”string
listener
Section titled “listener”Listener
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”EventEmitter.addListener
emit()
Section titled “emit()”emit(
eventName, …args):boolean
Defined in: packages/webhook/src/shared/event-emitter.ts:44
Parameters
Section titled “Parameters”eventName
Section titled “eventName”string
…unknown[]
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”EventEmitter.emit
getBatchStats()
Section titled “getBatchStats()”getBatchStats():
object
Defined in: packages/webhook/src/dispatcher/batch.dispatcher.ts:145
배치 통계 조회
Returns
Section titled “Returns”object
activeBatchesCount
Section titled “activeBatchesCount”activeBatchesCount:
number
averageQueueSize
Section titled “averageQueueSize”averageQueueSize:
number
endpointsWithPendingJobs
Section titled “endpointsWithPendingJobs”endpointsWithPendingJobs:
number
pendingJobsCount
Section titled “pendingJobsCount”pendingJobsCount:
number
getPendingJobCount()
Section titled “getPendingJobCount()”getPendingJobCount(
endpointId):number
Defined in: packages/webhook/src/dispatcher/batch.dispatcher.ts:168
특정 엔드포인트의 대기 중인 작업 수 조회
Parameters
Section titled “Parameters”endpointId
Section titled “endpointId”string
Returns
Section titled “Returns”number
off(
eventName,listener):this
Defined in: packages/webhook/src/shared/event-emitter.ts:20
Parameters
Section titled “Parameters”eventName
Section titled “eventName”string
listener
Section titled “listener”Listener
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”EventEmitter.off
on(
eventName,listener):this
Defined in: packages/webhook/src/shared/event-emitter.ts:9
Parameters
Section titled “Parameters”eventName
Section titled “eventName”string
listener
Section titled “listener”Listener
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”EventEmitter.on
once()
Section titled “once()”once(
eventName,listener):this
Defined in: packages/webhook/src/shared/event-emitter.ts:35
Parameters
Section titled “Parameters”eventName
Section titled “eventName”string
listener
Section titled “listener”Listener
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”EventEmitter.once
processAllBatches()
Section titled “processAllBatches()”processAllBatches():
Promise<WebhookBatch[]>
Defined in: packages/webhook/src/dispatcher/batch.dispatcher.ts:128
모든 대기 중인 배치 처리
Returns
Section titled “Returns”Promise<WebhookBatch[]>
processBatchForEndpoint()
Section titled “processBatchForEndpoint()”processBatchForEndpoint(
endpointId):Promise<WebhookBatch|null>
Defined in: packages/webhook/src/dispatcher/batch.dispatcher.ts:69
특정 엔드포인트의 배치 처리
Parameters
Section titled “Parameters”endpointId
Section titled “endpointId”string
Returns
Section titled “Returns”Promise<WebhookBatch | null>
removeAllListeners()
Section titled “removeAllListeners()”removeAllListeners(
eventName?):this
Defined in: packages/webhook/src/shared/event-emitter.ts:57
Parameters
Section titled “Parameters”eventName?
Section titled “eventName?”string
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”EventEmitter.removeAllListeners
removeListener()
Section titled “removeListener()”removeListener(
eventName,listener):this
Defined in: packages/webhook/src/shared/event-emitter.ts:31
Parameters
Section titled “Parameters”eventName
Section titled “eventName”string
listener
Section titled “listener”Listener
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”EventEmitter.removeListener
shutdown()
Section titled “shutdown()”shutdown():
Promise<void>
Defined in: packages/webhook/src/dispatcher/batch.dispatcher.ts:339
배치 처리기 정지
Returns
Section titled “Returns”Promise<void>