Integration Events
As described in Architecture Overview holi uses Google Cloud Pub/Sub to communicate asynchronously and reliably between applications.
Event Types
Emitter | Topic | Event Name | Description |
---|---|---|---|
okuna | okuna_$ENV | UserNameUpdated | Emitted when a user updates their username. |
okuna | okuna_$ENV | UserEmailUpdated | Emitted when a user updates their email address. |
okuna | okuna_$ENV | UserDeleted | Emitted when a user deletes their account. |
okuna | okuna_$ENV | SpaceCreated | Emitted when a user creates a space. |
okuna | okuna_$ENV | SpaceUpdated | Emitted when a user updates a spaces attributes (e.g. name /slug ) |
okuna | okuna_$ENV | SpaceUserAdded | Emitted when a user joins a space. |
okuna | okuna_$ENV | SpaceUserLeft | Emitted when a user leaves a space. |
okuna | okuna_$ENV | SpaceUserRemoved | Emitted when a user is removed from a space by a space administrator. |
okuna | okuna_$ENV | SpaceDeleted | Emitted when a space is deleted. |
okuna | okuna_$ENV | TaskCreated | Emitted when a space task is created. |
okuna | okuna_$ENV | TaskUpdated | Emitted when a space task is updated. |
okuna | okuna_$ENV | TaskDeleted | Emitted when a space task is deleted. |
donations crawler | donations_$ENV | DonationCreated | Emitted when the donation crawler finds a new donation project. |
donations crawler | donations_$ENV | DonationUpdated | Emitted when a previously known donation project was updated. |
donations crawler | donations_$ENV | DonationDeleted | Emitted when the donation crawler detects that a donation project was deleted. |
volunteering crawler | external-data-$ENV | VolunteeringDeleted | Emitted when the donation crawler detects that a donation project was deleted. |
Event Payloads
Messages on Google Cloud Pub/Sub follow this (exemplary) structure:
{
"message": {
"data": "<BASE64_ENCODED_PAYLOAD>",
"attributes": {
"eventType": "SpaceCreated",
"eventVersion": "1.0.0"
}
},
"subscription": "projects/MY-PROJECT/subscriptions/MY-SUB"
}
For every event emitted by a holi emitter two key/value pairs are to be added to the attributes object:
eventType
: name of the eventeventVersion
: version of the event (uses semantic versioning)
At this point of time, there's no dedicated documentation for the data
field of the event (which varies depending on eventType
).
Please refer to the publisher source code in
to learn more about the payloads.
Publish/Subscribe Topics
Currently, topics are separated per environment only: okuna_$ENVIRONMENT
(in which $ENVIRONMENT
is either staging
or production
).