[MaxMessagesProcessor] Don't wait new message to shutdown.

When ```max_messages``` is reached the process is awaiting an other message in order to shutdown.

Here is a simple way to solve this issue but maybe there is a better solution... The process function need to be executed before checking the ```max_messages``` value.

@odolbeau any idea ?