## protocols.daosub.DaoSubscriberProtocol

<span id="hexkit.protocols.daosub.DaoSubscriberProtocol"></span>


A protocol for consuming events published through the DaoPublisherFactoryProtocol.


Usage

``` python
protocols.daosub.DaoSubscriberProtocol()
```


In addition to the methods described below, implementations shall expose the the following attributes: event_topic: The name of the topic from which updates for the given resource are consumed. dto_model: A pydantic model representing the data transfer object (DTO) for the payload of changed events.

If the upstream provider using this protocol fails to convert the payload of a change event to the expected DTO model, it should raise a DtoValidationError.


## Methods

| Name | Description |
|----|----|
| [changed()](#changed) | Consume a change event (created or updated) for the resource with the given |
| [deleted()](#deleted) | Consume an event indicating the deletion of the resource with the given ID. |

<span id="hexkit.protocols.daosub.DaoSubscriberProtocol.changed"></span>


#### changed()


Consume a change event (created or updated) for the resource with the given


Usage

``` python
changed(resource_id, update)
```


ID.


<span id="hexkit.protocols.daosub.DaoSubscriberProtocol.deleted"></span>

------------------------------------------------------------------------


#### deleted()


Consume an event indicating the deletion of the resource with the given ID.


Usage

``` python
deleted(resource_id)
```
