Destroy
When you are done using the bus layer, you can send this event to destroy the bus layer and release all the resources.
It's recommended to send this event when the user logs out of your app.
{
"type": "BUS.DESTROY",
"payload": {
"services": "String[]!"
}
}
note
This event is not required to be sent when the user session expires (when you receive ) .
Usage
{
"type": "BUS.DESTROY",
"payload": {
"services": ["DIALER"]
}
}
As a result we receive a BUS.DESTROY_FULFILLED event.
{
"type": "BUS.DESTROY_FULFILLED"
}
note
This event will only destroy the services that you specify in the payload.
danger
If you don't send this event, you might receive duplicated events from the bus layer.