Skip to content

Commit acdc268

Browse files
committed
Upgrades and doc fixes
* Upgrade Gradle to 5.2.1, assertj - 3.12.0, SonarQube - 2.7, asciidoctor - 1.5.10 * Fix docs for proper version rendering * Move "What's New" to the `changes-since-1.0.adoc` and news for current `2.3`
1 parent 1721d9e commit acdc268

File tree

9 files changed

+216
-197
lines changed

9 files changed

+216
-197
lines changed

build.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ buildscript {
1111
}
1212

1313
plugins {
14-
id 'org.sonarqube' version '2.6.2'
1514
id 'base'
1615
id 'project-report'
1716
id 'idea'
18-
id 'org.asciidoctor.convert' version '1.5.9.2'
17+
id "org.sonarqube" version '2.7'
18+
id 'org.asciidoctor.convert' version '1.5.10'
1919
id 'org.ajoberstar.grgit' version '3.0.0'
2020
}
2121

@@ -69,7 +69,7 @@ subprojects { subproject ->
6969
}
7070

7171
ext {
72-
assertjVersion = '3.11.1'
72+
assertjVersion = '3.12.0'
7373
googleJsr305Version = '3.0.2'
7474
hamcrestVersion = '1.3'
7575
hibernateValidationVersion = '6.0.14.Final'
@@ -93,7 +93,7 @@ subprojects { subproject ->
9393
eclipse.project.natures += 'org.springframework.ide.eclipse.core.springnature'
9494

9595
jacoco {
96-
toolVersion = '0.8.1'
96+
toolVersion = '0.8.2'
9797
}
9898

9999
// dependencies that are common across all java projects
@@ -174,7 +174,7 @@ subprojects { subproject ->
174174
}
175175
}
176176

177-
processResources.dependsOn updateCopyrights
177+
compileKotlin.dependsOn updateCopyrights
178178

179179
task sourcesJar(type: Jar) {
180180
classifier = 'sources'
@@ -362,12 +362,12 @@ task docsZip(type: Zip, dependsOn: [reference]) {
362362
}
363363

364364
from ('build/asciidoc/html5') {
365-
into 'reference'
365+
into 'reference/html'
366366
}
367367

368368
from ('build/asciidoc/pdf') {
369369
include 'index.pdf'
370-
into 'reference'
370+
into 'reference/pdf'
371371
}
372372
}
373373

gradle/wrapper/gradle-wrapper.jar

-987 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

gradlew

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ APP_NAME="Gradle"
2828
APP_BASE_NAME=`basename "$0"`
2929

3030
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31-
DEFAULT_JVM_OPTS=""
31+
DEFAULT_JVM_OPTS='"-Xmx64m"'
3232

3333
# Use the maximum available, or set MAX_FD != -1 to use that value.
3434
MAX_FD="maximum"

gradlew.bat

Lines changed: 84 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,84 @@
1-
@if "%DEBUG%" == "" @echo off
2-
@rem ##########################################################################
3-
@rem
4-
@rem Gradle startup script for Windows
5-
@rem
6-
@rem ##########################################################################
7-
8-
@rem Set local scope for the variables with windows NT shell
9-
if "%OS%"=="Windows_NT" setlocal
10-
11-
set DIRNAME=%~dp0
12-
if "%DIRNAME%" == "" set DIRNAME=.
13-
set APP_BASE_NAME=%~n0
14-
set APP_HOME=%DIRNAME%
15-
16-
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17-
set DEFAULT_JVM_OPTS=
18-
19-
@rem Find java.exe
20-
if defined JAVA_HOME goto findJavaFromJavaHome
21-
22-
set JAVA_EXE=java.exe
23-
%JAVA_EXE% -version >NUL 2>&1
24-
if "%ERRORLEVEL%" == "0" goto init
25-
26-
echo.
27-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28-
echo.
29-
echo Please set the JAVA_HOME variable in your environment to match the
30-
echo location of your Java installation.
31-
32-
goto fail
33-
34-
:findJavaFromJavaHome
35-
set JAVA_HOME=%JAVA_HOME:"=%
36-
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37-
38-
if exist "%JAVA_EXE%" goto init
39-
40-
echo.
41-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42-
echo.
43-
echo Please set the JAVA_HOME variable in your environment to match the
44-
echo location of your Java installation.
45-
46-
goto fail
47-
48-
:init
49-
@rem Get command-line arguments, handling Windows variants
50-
51-
if not "%OS%" == "Windows_NT" goto win9xME_args
52-
53-
:win9xME_args
54-
@rem Slurp the command line arguments.
55-
set CMD_LINE_ARGS=
56-
set _SKIP=2
57-
58-
:win9xME_args_slurp
59-
if "x%~1" == "x" goto execute
60-
61-
set CMD_LINE_ARGS=%*
62-
63-
:execute
64-
@rem Setup the command line
65-
66-
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67-
68-
@rem Execute Gradle
69-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70-
71-
:end
72-
@rem End local scope for the variables with windows NT shell
73-
if "%ERRORLEVEL%"=="0" goto mainEnd
74-
75-
:fail
76-
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77-
rem the _cmd.exe /c_ return code!
78-
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79-
exit /b 1
80-
81-
:mainEnd
82-
if "%OS%"=="Windows_NT" endlocal
83-
84-
:omega
1+
@if "%DEBUG%" == "" @echo off
2+
@rem ##########################################################################
3+
@rem
4+
@rem Gradle startup script for Windows
5+
@rem
6+
@rem ##########################################################################
7+
8+
@rem Set local scope for the variables with windows NT shell
9+
if "%OS%"=="Windows_NT" setlocal
10+
11+
set DIRNAME=%~dp0
12+
if "%DIRNAME%" == "" set DIRNAME=.
13+
set APP_BASE_NAME=%~n0
14+
set APP_HOME=%DIRNAME%
15+
16+
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17+
set DEFAULT_JVM_OPTS="-Xmx64m"
18+
19+
@rem Find java.exe
20+
if defined JAVA_HOME goto findJavaFromJavaHome
21+
22+
set JAVA_EXE=java.exe
23+
%JAVA_EXE% -version >NUL 2>&1
24+
if "%ERRORLEVEL%" == "0" goto init
25+
26+
echo.
27+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28+
echo.
29+
echo Please set the JAVA_HOME variable in your environment to match the
30+
echo location of your Java installation.
31+
32+
goto fail
33+
34+
:findJavaFromJavaHome
35+
set JAVA_HOME=%JAVA_HOME:"=%
36+
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37+
38+
if exist "%JAVA_EXE%" goto init
39+
40+
echo.
41+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42+
echo.
43+
echo Please set the JAVA_HOME variable in your environment to match the
44+
echo location of your Java installation.
45+
46+
goto fail
47+
48+
:init
49+
@rem Get command-line arguments, handling Windows variants
50+
51+
if not "%OS%" == "Windows_NT" goto win9xME_args
52+
53+
:win9xME_args
54+
@rem Slurp the command line arguments.
55+
set CMD_LINE_ARGS=
56+
set _SKIP=2
57+
58+
:win9xME_args_slurp
59+
if "x%~1" == "x" goto execute
60+
61+
set CMD_LINE_ARGS=%*
62+
63+
:execute
64+
@rem Setup the command line
65+
66+
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67+
68+
@rem Execute Gradle
69+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70+
71+
:end
72+
@rem End local scope for the variables with windows NT shell
73+
if "%ERRORLEVEL%"=="0" goto mainEnd
74+
75+
:fail
76+
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77+
rem the _cmd.exe /c_ return code!
78+
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79+
exit /b 1
80+
81+
:mainEnd
82+
if "%OS%"=="Windows_NT" endlocal
83+
84+
:omega

src/reference/asciidoc/changes-since-1.0.adoc

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,118 @@
11
[[migration]]
2+
=== Changes between 2.1 and 2.2
3+
4+
[[kafka-client-2.0]]
5+
==== Kafka Client Version
6+
7+
This version requires the 2.0.0 `kafka-clients` or higher.
8+
9+
==== Class and Package Changes
10+
11+
The `ContainerProperties` class has been moved from `org.springframework.kafka.listener.config` to `org.springframework.kafka.listener`.
12+
13+
The `AckMode` enum has been moved from `AbstractMessageListenerContainer` to `ContainerProperties`.
14+
15+
The `setBatchErrorHandler()` and `setErrorHandler()` methods have been moved from `ContainerProperties` to both `AbstractMessageListenerContainer` and `AbstractKafkaListenerContainerFactory`.
16+
17+
==== After Rollback Processing
18+
19+
A new `AfterRollbackProcessor` strategy is provided.
20+
See <<after-rollback>> for more information.
21+
22+
==== `ConcurrentKafkaListenerContainerFactory` Changes
23+
24+
You can now use the `ConcurrentKafkaListenerContainerFactory` to create and configure any `ConcurrentMessageListenerContainer`, not only those for `@KafkaListener` annotations.
25+
See <<container-factory>> for more information.
26+
27+
==== Listener Container Changes
28+
29+
A new container property (`missingTopicsFatal`) has been added.
30+
See <<kafka-container>> for more information.
31+
32+
A `ConsumerStoppedEvent` is now emitted when a consumer terminates.
33+
See <<thread-safety>> for more information.
34+
35+
Batch listeners can optionally receive the complete `ConsumerRecords<?, ?>` object instead of a `List<ConsumerRecord<?, ?>`.
36+
See <<batch-listeners>> for more information.
37+
38+
The `DefaultAfterRollbackProcessor` and `SeekToCurrentErrorHandler` can now recover (skip) records that keep failing, and, by default, does so after 10 failures.
39+
They can be configured to publish failed records to a dead-letter topic.
40+
41+
Starting with version 2.2.4, the consumer's group ID can be used while selecting the dead letter topic name.
42+
43+
See <<after-rollback>>, <<seek-to-current>>, and <<dead-letters>> for more information.
44+
45+
The `ConsumerStoppingEvent` has been added.
46+
See <<events>> for more information.
47+
48+
The `SeekToCurrentErrorHandler` can now be configured to commit the offset of a recovered record when the container is configured with `AckMode.MANUAL_IMMEDIATE` (since 2.2.4).
49+
See <<seek-to-current>> for more information.
50+
51+
==== @KafkaListener Changes
52+
53+
You can now override the `concurrency` and `autoStartup` properties of the listener container factory by setting properties on the annotation.
54+
You can now add configuration to determine which headers (if any) are copied to a reply message.
55+
See <<kafka-listener-annotation>> for more information.
56+
57+
You can now use `@KafkaListener` as a meta-annotation on your own annotations.
58+
See <<kafka-listener-meta>> for more information.
59+
60+
It is now easier to configure a `Validator` for `@Payload` validation.
61+
See <<kafka-validation>> for more information.
62+
63+
You can now specify kafka consumer properties directly on the annotation; these will override any properties with the same name defined in the consumer factory (since version 2.2.4).
64+
See <<annotation-properties>> for more information.
65+
66+
==== Header Mapping Changes
67+
68+
Headers of type `MimeType` and `MediaType` are now mapped as simple strings in the `RecordHeader` value.
69+
Previously, they were mapped as JSON and only `MimeType` was decoded.
70+
`MediaType` could not be decoded.
71+
They are now simple strings for interoperability.
72+
73+
Also, the `DefaultKafkaHeaderMapper` has a new `addToStringClasses` method, allowing the specification of types that should be mapped by using `toString()` instead of JSON.
74+
See <<headers>> for more information.
75+
76+
==== Embedded Kafka Changes
77+
78+
The `KafkaEmbedded` class and its `KafkaRule` interface have been deprecated in favor of the `EmbeddedKafkaBroker` and its JUnit 4 `EmbeddedKafkaRule` wrapper.
79+
The `@EmbeddedKafka` annotation now populates an `EmbeddedKafkaBroker` bean instead of the deprecated `KafkaEmbedded`.
80+
This change allows the use of `@EmbeddedKafka` in JUnit 5 tests.
81+
The `@EmbeddedKafka` annotation now has the attribute `ports` to specify the port that populates the `EmbeddedKafkaBroker`.
82+
See <<testing>> for more information.
83+
84+
==== JsonSerializer/Deserializer Enhancements
85+
86+
You can now provide type mapping information by using producer and consumer properties.
87+
88+
New constructors are available on the deserializer to allow overriding the type header information with the supplied target type.
89+
90+
The `JsonDeserializer` now removes any type information headers by default.
91+
92+
You can now configure the `JsonDeserializer` to ignore type information headers by using a Kafka property (since 2.2.3).
93+
94+
See <<serdes>> for more information.
95+
96+
==== Kafka Streams Changes
97+
98+
The streams configuration bean must now be a `KafkaStreamsConfiguration` object instead of a `StreamsConfig` object.
99+
100+
The `StreamsBuilderFactoryBean` has been moved from package `...core` to `...config`.
101+
102+
The `KafkaStreamBrancher` has been introduced for better end-user experience when conditional branches are built on top of `KStream` instance.
103+
104+
See <<kafka-streams>> and <<streams-config>> for more information.
105+
106+
107+
==== Transactional ID
108+
109+
When a transaction is started by the listener container, the `transactional.id` is now the `transactionIdPrefix` appended with `<group.id>.<topic>.<partition>`.
110+
This change allows proper fencing of zombies, https://www.confluent.io/blog/transactions-apache-kafka/[as described here].
111+
112+
2113
=== Changes between 2.0 and 2.1
3114

115+
[[kafka-client-1.0]]
4116
==== Kafka Client Version
5117

6118
This version requires the 1.0.0 `kafka-clients` or higher.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<style>
2+
#header #revnumber {
3+
display: none
4+
}
5+
</style>

src/reference/asciidoc/index.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
:hide-uri-scheme:
88
Gary Russell; Artem Bilan; Biju Kunjummen; Jay Bryant
99

10+
ifdef::backend-html5[]
1011
*{project-version}*
12+
endif::[]
1113

1214
(C) 2016 - 2019 by Pivotal Software, Inc.
1315

0 commit comments

Comments
 (0)