diff --git a/README.md b/README.md index 7f8af03..f80da78 100644 --- a/README.md +++ b/README.md @@ -405,9 +405,10 @@ There are three properties for customizing this event locking on transmission: considered for transmission. The default is currently 60 seconds but might change in future releases. * **lock-size** (events): Defines the maximum amount of events which are loaded into memory and published in one run - (in one submission per event type). By default, *all* events are loaded into memory. In some future release, this - property will become mandatory. This should be set to a value which is not too high so out-of-memory situations - are avoided. + (in one submission per event type). By default, up to 1000 events are loaded into memory, but this default might + change in some future release. This should be set to a value which is low enough so out-of-memory situations + are avoided (depending on your typical event sizes), and high enough to allow the needed throughput. + Using the value 0 will disable the limit completely, but this is not recommended. Example: ```yaml diff --git a/nakadi-producer-spring-boot-starter/src/main/java/org/zalando/nakadiproducer/NakadiProducerAutoConfiguration.java b/nakadi-producer-spring-boot-starter/src/main/java/org/zalando/nakadiproducer/NakadiProducerAutoConfiguration.java index 6cd12cb..dc7dd12 100644 --- a/nakadi-producer-spring-boot-starter/src/main/java/org/zalando/nakadiproducer/NakadiProducerAutoConfiguration.java +++ b/nakadi-producer-spring-boot-starter/src/main/java/org/zalando/nakadiproducer/NakadiProducerAutoConfiguration.java @@ -146,7 +146,7 @@ public EventLogWriter eventLogWriter(EventLogRepository eventLogRepository, Obje @Bean public EventLogRepository eventLogRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate, - @Value("${nakadi-producer.lock-size:0}") int lockSize) { + @Value("${nakadi-producer.lock-size:1000}") int lockSize) { return new EventLogRepositoryImpl(namedParameterJdbcTemplate, lockSize); }