public static <K extends Message> MessageListener<K> from(DigitalChannel channel, Consumer<K> consumer) {
        return new ConsumerMessageListener<>(channel, consumer);
    }
public static < K extends Message > MessageListener < K > from ( DigitalChannel channel , Consumer < K > consumer ) { return new ConsumerMessageListener < > ( channel , consumer ) ; }
Lambda support. Takes in a consumer and wraps a MessageListener object around it, since the message listener is
not a functional interface.
@param channel DigitalChannel identifier of the channel to listen to.
@param consumer Lambda logic to be run against the received message.
@param <K> Message type to listen for.
@return New MessageListener for the given type and logic.