.setFlushCount(4) .setBatchingStrategy(BatchingStrategy.ONLY_EVENTS) .setMaxBatchSize(1024 * 1024)
.setFlushCount(4) .setBatchingStrategy(BatchingStrategy.ONLY_EVENTS) .setMaxBatchSize(1024 * 1024)
.setFlushCount(4) .setBatchingStrategy(BatchingStrategy.ONLY_EVENTS) .setMaxBatchSize(1024 * 1024)
private HttpPostEmitter manualFlushEmitterWithBasicAuthenticationAndNewlineSeparating(String authentication) { HttpEmitterConfig config = new HttpEmitterConfig.Builder(TARGET_URL) .setFlushMillis(Long.MAX_VALUE) .setFlushCount(Integer.MAX_VALUE) .setBasicAuthentication(authentication) .setBatchingStrategy(BatchingStrategy.NEWLINES) .setMaxBatchSize(1024 * 1024) .build(); HttpPostEmitter emitter = new HttpPostEmitter( config, httpClient, jsonMapper ); emitter.start(); return emitter; }
private HttpPostEmitter sizeBasedEmitter(int size) { HttpEmitterConfig config = new HttpEmitterConfig.Builder(TARGET_URL) .setFlushMillis(Long.MAX_VALUE) .setFlushCount(size) .build(); HttpPostEmitter emitter = new HttpPostEmitter( config, httpClient, jsonMapper ); emitter.start(); return emitter; }
private HttpPostEmitter timeBasedEmitter(long timeInMillis) { HttpEmitterConfig config = new HttpEmitterConfig.Builder(TARGET_URL) .setFlushMillis(timeInMillis) .setFlushCount(Integer.MAX_VALUE) .build(); HttpPostEmitter emitter = new HttpPostEmitter( config, httpClient, jsonMapper ); emitter.start(); return emitter; }
private HttpPostEmitter sizeBasedEmitterWithContentEncoding(int size, ContentEncoding encoding) { HttpEmitterConfig config = new HttpEmitterConfig.Builder(TARGET_URL) .setFlushMillis(Long.MAX_VALUE) .setFlushCount(size) .setContentEncoding(encoding) .build(); HttpPostEmitter emitter = new HttpPostEmitter( config, httpClient, jsonMapper ); emitter.start(); return emitter; }
private HttpPostEmitter manualFlushEmitterWithBatchSize(int batchSize) { HttpEmitterConfig config = new HttpEmitterConfig.Builder(TARGET_URL) .setFlushMillis(Long.MAX_VALUE) .setFlushCount(Integer.MAX_VALUE) .setMaxBatchSize(batchSize) .build(); HttpPostEmitter emitter = new HttpPostEmitter( config, httpClient, jsonMapper ); emitter.start(); return emitter; }