Kernel::System::Role::EmitsPushEvents

NAME

Kernel::System::Role::EmitsPushEvents – Role to emit push events.

PUBLIC INTERFACE

Provides methods to define the allowed push events and emit the push events.

requires RegisteredPushEvents

Method that returns the allowed push events. This values will be used to validate the emitted push events.

Push events should be defined like this:

    sub RegisteredPushEvents {
        return {
            TicketSubscribe => [
                'TicketID',
                'UserID',
            ],
            TicketUnsubscribe => [
                'TicketID',
                'UserID',
            ],
        };
    }

EmitPushEvent()

Emit a push event, which adds it to the event queue to be processed by the daemon.

    $Self->EmitPushEvent(
        EventName  => 'TicketSubscribe',
        Attributes => {
            TicketID => 123,
            UserID   => 12,
        },
    );
Scroll to Top