Channel Update Event

Published to the sdk-management.updates Pub/Sub topic with eventType=channel-update whenever a channel changes state.

Trigger Operations

Operation Description

create

A new channel is created and attached to an application.

update

An existing channel’s configuration is modified.

activate

A channel is activated and becomes live.

deactivate

A channel is deactivated and taken offline.

archive

A channel is archived and can no longer be used.

Message Schema

{
  "operation": "update",
  "channelId": 7,
  "tenantId": 123456,
  "channelType": "push_firebase",
  "eventTime": "2025-01-15T11:00:00.000Z"
}

Fields

Field Type Description

operation

string

The operation that triggered the event. One of: create, update, activate, deactivate, archive.

channelId

number

The unique identifier of the channel.

tenantId

number

The identifier of the tenant that owns the channel.

channelType

string

The type of channel (e.g. push-firebase, push-apns, push-huawei, push-vapid, embedded-messaging).

eventTime

string (ISO 8601)

The timestamp when the operation occurred (derived from the channel’s updatedAt field).

Downstream Consumer

The sdk-management.application-channel-update-event-publisher subscription filters for eventType=channel-update messages and is consumed by the Application Channel Update Event Publisher worker process. That process derives ApplicationChannelUpdateEvents from each channel update.

Source

The event is constructed by the publishChannelUpdateEventCommand, which maps a Channel entity and the triggering operation to the event payload. It is then published via the ChannelUpdateEventPublisher interface, backed by PubSubUpdateEventPublisher in production.

Validation Schema

The channel update event is validated against a Zod schema on the consumer side, ensuring all fields conform to expected types before processing:

{
  operation: z.enum(['create', 'update', 'activate', 'deactivate', 'archive']),
  channelId: channelSchema.id,
  tenantId: tenantIdSchema,
  channelType: channelSchema.type,
  eventTime: dateSchema,
}