It seems pretty straightforward to define a tiny object for each message,
which has a method to emit the message and a dup counter. (These objects
would all live just for each file or whatever granularity we want for
considering messages to be duplicates.)