Skullabs/kos

EventBus publishers doesn't handle well messages identified by its interface

Closed this issue · 0 comments

miere commented

At the time the publisher is created, it will ensure that there's an EventBus Codec in place to serialise the desired object. However, given it is designed, it will use the class reference used in the method signature to register this codec. This approach works nicely when you use the concrete implementation in the method signature but fails if you pass an object that has extended that class or if you use an interface to define its type.

Expected behaviour

Kos must be able to transparently handle this and abstract this complexity away.