Add maxBuffer as configuration option