Hi all,

We have two (albeit incomplete) PolarisEventListener implementations
today: one for JDBC and one for AWS CloudWatch.

Both enhance event payloads internally by adding a timestamp and user
data. These two attributes are indeed very common in event-oriented
systems.

The JDBC implementation also generates unique IDs internally. That's
because the PolarisEvent interface lacks an id() method, despite the
common need for event disambiguation.

Therefore, I propose promoting these three attributes (ID, timestamp,
user) to the PolarisEvent interface, by adding the following methods:

UUID id();
Instant timestamp();
PolarisPrincipal user();

This information is readily available at event instantiation sites,
and can be provided via CDI injection without hassle.

Let me know your thoughts.

Thanks,
Alex

Reply via email to