Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
Merge pull request #736 from zalando/aruha-1083-fix-gzip-flush
Browse files Browse the repository at this point in the history
aruha-1083 fix gzip flush
  • Loading branch information
rcillo authored Aug 22, 2017
2 parents 833a1fb + c6fe850 commit fce3b29
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Fixed
- Sync flush batches when using gzip streams.

## [2.1.0] - 2017-08-21

### Changed
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/org/zalando/nakadi/config/JettyConfig.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.zalando.nakadi.config;

import org.eclipse.jetty.server.handler.gzip.GzipHandler;
import org.eclipse.jetty.util.thread.QueuedThreadPool;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.embedded.jetty.JettyEmbeddedServletContainerFactory;
Expand All @@ -22,6 +23,11 @@ public JettyEmbeddedServletContainerFactory jettyEmbeddedServletContainerFactory
threadPool.setMaxThreads(Integer.valueOf(maxThreads));
threadPool.setMinThreads(Integer.valueOf(minThreads));
threadPool.setIdleTimeout(Integer.valueOf(idleTimeout));

final GzipHandler gzipHandler = new GzipHandler();
gzipHandler.setHandler(server.getHandler());
gzipHandler.setSyncFlush(true);
server.setHandler(gzipHandler);
});
return factory;
}
Expand Down
3 changes: 0 additions & 3 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
server:
port: 8080
compression:
enabled: true
mime-types: text/plain,application/x-json-stream
management:
port: 7979
logging:
Expand Down

0 comments on commit fce3b29

Please sign in to comment.