Add consumer base class

Adds a base class for message consumers. Child classes implement the `predicate()` and `process()` methods.