Skip to content

Commit 224fae2

Browse files
author
Paŭlo Ebermann
authored
Merge pull request #143 from johannesknauft/#142-update-flyway-and-spring-boot
#142 Update many dependencies - Spring Boot 2.5 - Flyway 7 - JUnit 5 - tokens 0.14 → needs now Java 11+ - Fahrschein 0.24.0 → uses now HTTP compression
2 parents ff9e3bb + a5c860e commit 224fae2

31 files changed

+331
-261
lines changed

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ You may of course always setup a fresh system with the newest version.
4242

4343
## Prerequisites
4444

45-
This library was tested with Spring Boot 2.0.3.RELEASE and relies on an existing configured PostgreSQL DataSource.
45+
This library was tested with Java 11 (starting with 21.0.0), Spring Boot 2.5.6.RELEASE and Flyway 7.
46+
It relies on an existing configured PostgreSQL DataSource.
4647
**If you are still using Spring Boot 1.x, please use versions < 20.0.0, they are still actively maintained ([Documentation](https://github.com/zalando-nakadi/nakadi-producer-spring-boot-starter/tree/spring-boot-1)).**
4748

4849
This library also uses:
@@ -52,7 +53,7 @@ This library also uses:
5253
* [fahrschein](https://github.com/zalando-nakadi/fahrschein) Nakadi client library
5354
* jackson >= 2.7.0
5455
* (optional) Zalando's [tracer-spring-boot-starter](https://github.com/zalando/tracer)
55-
* (optional) Zalando's [tokens library](https://github.com/zalando/tokens) >= 0.10.0
56+
* (optional) Zalando's [tokens library](https://github.com/zalando/tokens) >= 0.14.0
5657
* Please note that [tokens-spring-boot-starter](https://github.com/zalando-stups/spring-boot-zalando-stups-tokens) 0.10.0 comes with tokens 0.9.9, which is not enough. You can manually add tokens 0.10.0 with that starter, though. To be used in zalando's k8s environment, you must at least use 0.11.0.
5758

5859

@@ -129,6 +130,21 @@ nakadi-producer:
129130
access-token-uri: https://token.auth.example.org/oauth2/access_token
130131
```
131132
133+
By default, the initialized Fahrschein Nakadi client uses the `SimpleRequestFactory` with `ContentEncoding.GZIP`.
134+
If you want to override this setting (e.g. to enable zstd compression), you can create an overwriting configuration property:
135+
```yaml
136+
nakadi-producer:
137+
content-encoding: ZSTD
138+
```
139+
If you want to disable compression completely:
140+
```yaml
141+
nakadi-producer:
142+
content-encoding: IDENTITY
143+
```
144+
As we gain experience, the default value might change in future versions of this library, so if you need to stay on gzip compression, use `content-encoding: GZIP`.
145+
146+
Alternatively, you can define your own bean of type `RequestFactory`, which will then be used instead of ours.
147+
132148
#### OAuth (scope) configuration in a non-Zalando environment
133149
Please consult the [manual of Zalando's tokens library](https://github.com/zalando/tokens) for more configuration options (like `CREDENTIALS_DIR` or via environment variables.
134150

nakadi-producer-loadtest/pom.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
66

7-
<groupId>org.zalando</groupId>
87
<artifactId>nakadi-producer-loadtest</artifactId>
98
<version>${project.parent.version}</version>
109

@@ -36,7 +35,7 @@
3635
<dependency>
3736
<groupId>org.zalando.stups</groupId>
3837
<artifactId>tokens</artifactId>
39-
<version>0.11.0</version>
38+
<version>0.14.0</version>
4039
</dependency>
4140
<dependency>
4241
<groupId>org.springframework.boot</groupId>
@@ -51,13 +50,13 @@
5150
<dependency>
5251
<groupId>org.testcontainers</groupId>
5352
<artifactId>testcontainers</artifactId>
54-
<version>1.10.6</version>
53+
<version>1.16.0</version>
5554
<scope>test</scope>
5655
</dependency>
5756
<dependency>
5857
<groupId>org.projectlombok</groupId>
5958
<artifactId>lombok</artifactId>
60-
<version>1.18.6</version>
59+
<version>1.18.22</version>
6160
<scope>provided</scope>
6261
</dependency>
6362
</dependencies>

nakadi-producer-spring-boot-starter/pom.xml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@
1919
<description>Spring Boot Auto Configuration for Nakadi event producer</description>
2020

2121
<properties>
22-
<maven.compiler.source>1.8</maven.compiler.source>
23-
<maven.compiler.target>1.8</maven.compiler.target>
24-
<java.version>1.8</java.version>
25-
<zalando-swagger-codegen-maven-plugin.version>0.4.24</zalando-swagger-codegen-maven-plugin.version>
22+
<maven.compiler.source>11</maven.compiler.source>
23+
<maven.compiler.target>11</maven.compiler.target>
24+
<java.version>11</java.version>
2625
</properties>
2726

2827
<dependencies>
@@ -53,13 +52,13 @@
5352
<dependency>
5453
<groupId>org.zalando</groupId>
5554
<artifactId>tracer-core</artifactId>
56-
<version>0.11.2</version>
55+
<version>0.17.2</version>
5756
<optional>true</optional>
5857
</dependency>
5958
<dependency>
6059
<groupId>org.zalando.stups</groupId>
6160
<artifactId>tokens</artifactId>
62-
<version>0.10.0</version>
61+
<version>0.14.0</version>
6362
<optional>true</optional>
6463
</dependency>
6564
<dependency>
@@ -110,6 +109,15 @@
110109
<groupId>org.springframework.boot</groupId>
111110
<artifactId>spring-boot-actuator-autoconfigure</artifactId>
112111
</dependency>
112+
<dependency>
113+
<groupId>org.springframework</groupId>
114+
<artifactId>spring-jdbc</artifactId>
115+
<version>5.3.12</version>
116+
</dependency>
117+
<dependency>
118+
<groupId>jakarta.annotation</groupId>
119+
<artifactId>jakarta.annotation-api</artifactId>
120+
</dependency>
113121
</dependencies>
114122

115123

0 commit comments

Comments
 (0)