Released on 2017-09-04.
A little over 6 months in the making, Ratpack 1.5.0 is now available. This release adds many new features and capabilities, squashes copious bugs and refines and optimizes many internals. Ratpack 1.5.0 is bigger, badder and faster.
The following core dependencies have been upgraded:
- Jackson 2.7.5 → 2.8.7
- Netty 4.1.4.Final → 4.1.9.Final
- Guava 19.0 → 21.0
- Caffeine 2.3.1 → 2.4.0
- Slf4j 1.7.21 → 1.7.28
ratpack-jdbc-tx module adds support for
Promise based JDBC transactions. It centers around the new
ratpack-consul modules provides the
ratpack.consul.RatpackConsulConfig factory for creating configuration sources backed by Consul. This is a convenient way to centralize configuration for your app and separate it from deployment.
Promise.flatMapIf methods allowing supplying an “else” to a promise transform.
Promise.retry methods allowing retrying a failed promise with various strategies.
Promise.defer methods make it more convenient to delay yielding a promise.
Promise.cacheResultFor method (and friends) make it easier to have more sophisticated caching policies for async values.
Promise.close method makes it easier to perform async cleanup/disposal.
Various new utilities have been added to the
Streams class such as
flatten(). These utilities enable more patterns for working with async data streams.
ByteBufStreams class provides utilities for dealing with streams of Netty
Execution.sleep() methods provide a non blocking analog to
You can now specify an idle timeout for server connections. This affects active connections and inactive connections (i.e. keepalive). It can also be overridden on a per request basis, which is particularly useful when streaming a lot of data, or streaming eternally.
Ratpack's HTTP client now supports SSL connections leveraging SNI. No extra config is required.
ReadWriteAccess utility is an analog of the JDK's
FileIo utility provides non blocking filesystem read/write access.
It is now possible to use Netty's SSL support via ServerConfigBuilder.ssl. Netty's SSL implementation is far more efficient in environments where OpenSSL is available. All users currently using SSL with Ratpack should migrate to using this new method.
If the client connecting to the server identified itself, you can now obtain its certificate via
There are also many other new convenience methods, bug fixes and generally cool stuff added in this release. Thanks to all who contributed.
We hope you enjoy Ratpack 1.5.
Pull Requests (35)
-  - Add ability to control content negotiation when client doesn't provide Accept header (davidmc24)
-  - ServerConfig.address is configurable (JonasHavers)
-  - Docs Fix: change reference to deprecated module (aaronzirbes)
-  - Adding method to install handlers and chains from registry, and chains by instantiation (drmaas)
-  - Added Missing `@Override` (AndrewReitz)
-  - Include URL query string in NCSA request log (mkavanagh)
-  - Add Promise.nextOpIf(Predicate<? super T> predicate, Function<? super T,? extends Operation> function) (brucenunk)
-  - Manual: Expand on HTTP Request parsing (danthegoodman)
-  - Remove extranous @Nullable annotation (danthegoodman)
-  - Manual: Reorganize handler introduction for better flow (danthegoodman)
-  - Provide if/else constructs on Promise and Chain. (felipefzdz)
-  - Surface error when request bodyStream is closed unexpectedly (danveloper)
-  - Add `Promise.retry` (rhart)
-  - Add `Streams.concat` (rhart)
-  - CharSequence for Body Type (beckje01)
-  - Remove <op>IfOrElse in favor of Function.applyIfOrElse. (johnrengelman)
-  - Enable SSL SNI support in default http client (carhartl)
-  - Fix issue with metrics truncating seconds from request time measurement (jeff-blaisdell)
-  - Upgrade dependencies (jackson & snakeyaml) (niwinz)
-  - Extends 'by method handler' builder with handler class/instance arguments (timic)
-  - Point to non-deprecated method `Promise#async` instead of `Promise#of` (mkobit)
-  - Use noneMatch instead of negating anyMatch (kamilszymanski)
-  - fix shell scripts classpath (katoquro)
-  - Change ConfigDataLoader to ignore null sourceNodes on merge (pschilli)
-  - Use jar archive name as pattern in shell script fix. (katoquro)
-  - Check for presence of error before debug log (jonmort)
-  - Fixed NotInRegistryException (swiftrs)
-  - Update Hikari to 2.6.2 (beckje01)
-  - Upgrade to Handlebars.java v4.0.6 (rainboyan)
-  - Update DefaultRequestFixture.java (ean5533)
-  - Fix Download Links (beckje01)
-  - Fix path binding in request fixture (tomdcc)
-  - provide a default connect timeout for http client, closes #1230 (drmaas)
-  - Use https repo url instead of http. (tylerbenson)
-  - Bump hystrix version to 1.5.13 (rpalcolea)
Resolved Issues (50)
-  - Add support for read/write timeouts
-  - ByMethodSpec and ByContentSpec should have `Handler` accepting overloads of `Block` methods.
-  - Support for gracefully dealing with session deserialisation failures.
-  - Add Promise.cacheFor(Function<ExecResult<T>, Duration> cacheFor) for conditionally caching with variable TTLs
-  - Add ability to control content negotiation when client doesn't provide Accept header
-  - ServerConfig.address should be configurable via environment variable and system property
-  - Add support for transactional promises with JDBC
-  - Proxied compressed EOF framed message never completes
-  - Add Promise.nextOpIf(Predicate<? super T> predicate, Function<? super T,? extends Operation> function)
-  - Provide if/else constructs on Promise and Chain
-  - FileRenderer only works with GET requests
-  - Request.getBodyStream is never completed if client drops connection
-  - Flexibility for autoCloseable in Promise and Operation
-  - HttpClient read timeouts are not propagated correctly from streamed responses.
-  - Add Promise.retry
-  - Add Streams.take
-  - Add Streams.concat
-  - Configurable SO_BACKLOG
-  - Groovy GString values are ignored by props() in ServerConfigImposition
-  - Support null result in MultiEntryRegistry#maybeGet
-  - HTTPS client certificate access
-  - Leak with streamedResponse.forwardTo(context.getResponse())
-  - Upgrade to Jackson 2.8.x
-  - Should implicitly drain request body if responding without reading it
-  - Provide api to allow changing Ssl implementation
-  - Executions may incorrectly terminate when immediately resumed from a different thread.
-  - Add promise based version of ReadWriteLock
-  - Provide utilities for working with files in a non blocking manner
-  - Update to Netty 4.1.9
-  - Config item bindings cannot be overridden in user modules
-  - Reading a too large request body should raise a 413 response by default
-  - RequestOutcome.getDuration throws NPE if never sent
-  - HttpClient connections not released from the pool when channel goes inactive
-  - Allow configuring the chunk size when streaming a response with the HTTP client
-  - Content length header should not be sent on 1xx, 204 or 304 responses.
-  - Upgrade to Handlebars.java 4.0.x
-  - Upgrade to Thymeleaf 2.1.5
-  - Support emitting comments with server sent events
-  - Add renderer for Rocker templates
-  - Upgrade to Guava 21
-  - Upgrade to Caffeine 2.4.0
-  - Service dependencies on legacy service types are ignored
-  - Wrong CLASSPATH in shell scripts (trivial)
-  - Empty yaml and json configuration files cause NullPointerException
-  - Json config test contains a typo
-  - Debug log states an error on post when there is no error
-  - NotInRegistryException thrown in ratpack.pac4j.internal.RatpackWebContext
-  - Provide configurable default connect timeout for http client
-  - Warning is always logged at debug about error draining request body
-  - HTTP client incorrectly follows 301 and 302 redirects with original verb