Gateway only stores up to 50 messages for recovery

above this we'll purge the messages.

Fixed #20