Semaphore Configuration

The unified upsert method is used to update the semaphore configuration. When passed data with an id property, it will update or create a semaphore with this id. Otherwise a semaphore with a new id will be created. The semaphore configuration object describes and sets the settings and is effective immediately for all events processed after an update.

Note that the options are equivalent to the individual semaphore settings in the semaphore settings section of the console.

Semaphore Configuration Object Details

PropertyDescriptionTypePossible Values
idThe ID of the semaphore.string
titleA descriptive title for the semaphore.string
isActiveEnables or disables processing.boolean
maxValueThe maximum value the semaphore can reach.number
maxValueScopeMaximum value scope.enum- 'channel': Each channel can reach the maxValue individually.
- 'total': The maxValue is applicable across all channels.
ownerThe owner of the semaphore (read-only).string
createdThe creation time of the semaphore (read-only).string
updatedThe update time of the semaphore (read-only).string
callbackHTTP Callback configuration.object
callback.protocolThe request protocol for the callback endpoint.string
callback.addressThe URL address of the callback endpoint.string
callback.isActiveEnables or disables the HTTP callback.boolean
callback.methodThe HTTP method to use for the callback endpoint.string
callback.onDeliveryErrorDefines the behavior in case of delivery error.enum- 'suspendProcessing': Stop processing while keeping ingress on.
- 'drop': Drop the message and continue processing.
websocketsWebsockets options.object
websockets.isActiveEnables or disables websockets usage.boolean
websockets.allowContinuedSessionsAllows websockets clients to restore session in case of reconnect.boolean
websockets.onClientDroppedDefines the behavior in case the client connection is dropped.enum- 'redriveToHttps': Redrive the message to the HTTP callback.
- 'drop': Drop the message.
- 'suspendProcessing': Stop processing.
mappingMapping options.object
mapping.isActiveEnables or disables mapping.boolean
mapping.maxExecutionTimeMaximum execution time for the mapping callback handler in seconds.number
mapping.canOverrideRoutingEnables or disables the ability of the callback handler to return alternative routing options.boolean
mapping.handlerThe mapping handler code.string
mapping.languageThe mapping language.string
mapping.inputDataSample input data for the mapping.string

Sample Semaphore Configuration

Loading...