Customer Service subscribes to Order Created event
Order Service publishes Order Approved event
SqlTableBasedDuplicateMessageDetector in Customer Service records that Order Approved has been "processed" even though its ignored.
This happens because MessageConsumer subscribes to channels but DomainEventHandler is only interested in certain events within the channel.
This results in more DB inserts.
One solution would be for MessageHandler to implement boolean isInteresting(Message m) so that SqlTableBasedDuplicateMessageDetector can ignore boring messages.
e.g.
Customer Service
subscribes toOrder Created
eventOrder Service
publishesOrder Approved
eventSqlTableBasedDuplicateMessageDetector
inCustomer Service
records thatOrder Approved
has been "processed" even though its ignored.This happens because MessageConsumer subscribes to channels but DomainEventHandler is only interested in certain events within the channel.
This results in more DB inserts.
One solution would be for MessageHandler to implement
boolean isInteresting(Message m)
so thatSqlTableBasedDuplicateMessageDetector
can ignore boring messages.