@@ -269,7 +269,7 @@ const analytics = new Analytics({
269269 host: ' https://api.segment.io' ,
270270 path: ' /v1/batch' ,
271271 maxRetries: 3,
272- maxEventsInBatch : 15,
272+ flushAt : 15,
273273 flushInterval: 10000,
274274 // ... and more!
275275 })
@@ -281,7 +281,7 @@ Setting | Details
281281`host` _string_ | The base URL of the API. The default is: "https://api.segment.io"
282282`path` _string_ | The API path route. The default is: "/v1/batch"
283283`maxRetries` _number_ | The number of times to retry flushing a batch. The default is: `3`
284- `maxEventsInBatch ` _number_ | The number of messages to enqueue before flushing. The default is: `15`
284+ `flushAt ` _number_ | The number of messages to enqueue before flushing. The default is: `15`
285285`flushInterval` _number_ | The number of milliseconds to wait before flushing the queue automatically. The default is: `10000`
286286`httpRequestTimeout` _number_ | The maximum number of milliseconds to wait for an http request. The default is: `10000`
287287`disable` _boolean_ | Disable the analytics library for testing. The default is: `false`
@@ -534,17 +534,17 @@ Every method you call **doesn't** result in a HTTP request, but is queued in mem
534534
535535By default, Segment' s library will flush:
536536
537- - Every 15 messages (controlled by ` settings.maxEventsInBatch ` ).
537+ - Every 15 messages (controlled by ` settings.flushAt ` ).
538538 - If 10 seconds has passed since the last flush (controlled by ` settings.flushInterval` )
539539
540540There is a maximum of ` 500KB` per batch request and ` 32KB` per call.
541541
542- If you don' t want to batch messages, you can turn batching off by setting the `maxEventsInBatch ` setting to `1`, like so:
542+ If you don' t want to batch messages, you can turn batching off by setting the `flushAt ` setting to `1`, like so:
543543
544544```javascript
545545const analytics = new Analytics({
546546 ...
547- maxEventsInBatch : 1
547+ flushAt : 1
548548});
549549```
550550
0 commit comments