From 02e1fec3b4520125e2f4c6d8d3e79a9c87d1744b Mon Sep 17 00:00:00 2001 From: Soby Chacko Date: Mon, 4 Feb 2019 18:11:10 -0500 Subject: [PATCH] Checkstyle upgrade Upgrade checkstyle plugin to use the rules from spring-cloud-build. Fix all the new checkstyle errors from the new rules. Resolves #540 --- .mvn/wrapper/MavenWrapperDownloader.java | 110 ++ .mvn/wrapper/maven-wrapper.jar | Bin 49502 -> 48337 bytes .mvn/wrapper/maven-wrapper.properties | 2 +- mvnw | 169 ++- mvnw.cmd | 306 ++-- pom.xml | 48 +- .../JaasLoginModuleConfiguration.java | 4 +- .../properties/KafkaAdminProperties.java | 3 +- .../KafkaBinderConfigurationProperties.java | 58 +- .../properties/KafkaBindingProperties.java | 1 + .../properties/KafkaConsumerProperties.java | 5 + .../KafkaExtendedBindingProperties.java | 8 +- .../properties/KafkaProducerProperties.java | 11 +- .../properties/KafkaTopicProperties.java | 2 +- .../provisioning/KafkaTopicProvisioner.java | 307 ++-- .../binder/kafka/utils/KafkaTopicUtils.java | 16 +- .../KafkaTopicProvisionerTests.java | 63 +- .../kafka/streams/GlobalKTableBinder.java | 57 +- .../GlobalKTableBinderConfiguration.java | 35 +- .../GlobalKTableBoundElementFactory.java | 49 +- .../streams/InteractiveQueryService.java | 51 +- .../binder/kafka/streams/KStreamBinder.java | 91 +- .../streams/KStreamBinderConfiguration.java | 67 +- .../streams/KStreamBoundElementFactory.java | 45 +- ...KStreamStreamListenerParameterAdapter.java | 16 +- .../KStreamStreamListenerResultAdapter.java | 12 +- .../binder/kafka/streams/KTableBinder.java | 63 +- .../streams/KTableBinderConfiguration.java | 35 +- .../streams/KTableBoundElementFactory.java | 40 +- ...msApplicationSupportAutoConfiguration.java | 9 +- ...StreamsBinderSupportAutoConfiguration.java | 173 ++- .../streams/KafkaStreamsBinderUtils.java | 41 +- ...fkaStreamsBindingInformationCatalogue.java | 32 +- .../streams/KafkaStreamsDlqDispatch.java | 68 +- ...KafkaStreamsMessageConversionDelegate.java | 177 ++- .../kafka/streams/KafkaStreamsRegistry.java | 4 +- ...StreamListenerSetupMethodOrchestrator.java | 432 +++--- .../kafka/streams/KeyValueSerdeResolver.java | 77 +- .../kafka/streams/QueryableStoreRegistry.java | 17 +- .../kafka/streams/SendToDlqAndContinue.java | 44 +- .../streams/StreamsBuilderFactoryManager.java | 53 +- .../annotations/KafkaStreamsProcessor.java | 19 +- .../annotations/KafkaStreamsStateStore.java | 31 +- ...kaStreamsApplicationSupportProperties.java | 11 +- ...aStreamsBinderConfigurationProperties.java | 17 +- .../KafkaStreamsBindingProperties.java | 6 +- .../KafkaStreamsConsumerProperties.java | 2 +- ...KafkaStreamsExtendedBindingProperties.java | 10 +- .../KafkaStreamsProducerProperties.java | 1 + .../KafkaStreamsStateStoreProperties.java | 8 +- .../serde/CompositeNonNativeSerde.java | 93 +- .../KafkaStreamsBinderBootstrapTest.java | 34 +- ...serializationErrorHandlerByKafkaTests.java | 111 +- ...serializtionErrorHandlerByBinderTests.java | 130 +- ...aStreamsBinderMultipleInputTopicsTest.java | 89 +- ...rPojoInputAndPrimitiveTypeOutputTests.java | 59 +- ...treamsBinderWordCountIntegrationTests.java | 104 +- ...reamsInteractiveQueryIntegrationTests.java | 83 +- ...fkaStreamsNativeEncodingDecodingTests.java | 81 +- ...afkaStreamsStateStoreIntegrationTests.java | 79 +- ...PojoInputStringOutputIntegrationTests.java | 61 +- .../PerRecordAvroContentTypeTests.java | 59 +- ...eamToGlobalKTableJoinIntegrationTests.java | 233 +-- .../StreamToTableJoinIntegrationTests.java | 325 ++-- ...CountMultipleBranchesIntegrationTests.java | 143 +- .../integration/utils/TestAvroSerializer.java | 15 +- .../serde/CompositeNonNativeSerdeTest.java | 18 +- .../binder/kafka/BinderHeaderMapper.java | 111 +- .../KafkaBinderEnvironmentPostProcessor.java | 46 +- .../kafka/KafkaBinderHealthIndicator.java | 35 +- .../binder/kafka/KafkaBinderMetrics.java | 46 +- .../kafka/KafkaBindingRebalanceListener.java | 21 +- .../kafka/KafkaMessageChannelBinder.java | 622 ++++---- ...gHandlerMappingsProviderConfiguration.java | 14 +- .../config/KafkaBinderConfiguration.java | 35 +- ...fkaBinderHealthIndicatorConfiguration.java | 24 +- .../binder/kafka/AbstractKafkaTestBinder.java | 5 +- .../stream/binder/kafka/AdminConfigTests.java | 34 +- .../kafka/AutoCreateTopicDisabledTests.java | 54 +- ...BinderAutoConfigurationPropertiesTest.java | 89 +- ...afkaBinderConfigurationPropertiesTest.java | 59 +- .../kafka/KafkaBinderConfigurationTest.java | 13 +- .../kafka/KafkaBinderHealthIndicatorTest.java | 56 +- ...afkaBinderJaasInitializerListenerTest.java | 100 +- .../binder/kafka/KafkaBinderMetricsTest.java | 121 +- .../stream/binder/kafka/KafkaBinderTests.java | 1306 ++++++++++------- .../binder/kafka/KafkaBinderUnitTests.java | 114 +- .../stream/binder/kafka/KafkaTestBinder.java | 25 +- .../binder/kafka/KafkaTransactionTests.java | 33 +- .../kafka/RawKafkaPartitionTestSupport.java | 5 +- .../binder/kafka/TestKafkaProperties.java | 2 +- .../bootstrap/KafkaBinderBootstrapTest.java | 13 +- .../integration/KafkaBinderActuatorTests.java | 34 +- .../KafkaBinderExtendedPropertiesTest.java | 106 +- 94 files changed, 4714 insertions(+), 3032 deletions(-) create mode 100755 .mvn/wrapper/MavenWrapperDownloader.java mode change 100644 => 100755 .mvn/wrapper/maven-wrapper.jar mode change 100644 => 100755 .mvn/wrapper/maven-wrapper.properties mode change 100644 => 100755 mvnw.cmd diff --git a/.mvn/wrapper/MavenWrapperDownloader.java b/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100755 index 000000000..fa4f7b499 --- /dev/null +++ b/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,110 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +*/ + +import java.net.*; +import java.io.*; +import java.nio.channels.*; +import java.util.Properties; + +public class MavenWrapperDownloader { + + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = + "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if(mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if(mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: : " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if(!outputFile.getParentFile().exists()) { + if(!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar old mode 100644 new mode 100755 index 5fd4d5023f1463b5ba3970e33c460c1eb26d748d..01e67997377a393fd672c7dcde9dccbedf0cb1e9 GIT binary patch literal 48337 zcmbTe1CV9Qwl>;j+wQV$+qSXFw%KK)%eHN!%U!l@+x~l>b1vR}@9y}|TM-#CBjy|< zb7YRpp)Z$$Gzci_H%LgxZ{NNV{%Qa9gZlF*E2<($D=8;N5Asbx8se{Sz5)O13x)rc z5cR(k$_mO!iis+#(8-D=#R@|AF(8UQ`L7dVNSKQ%v^P|1A%aF~Lye$@HcO@sMYOb3 zl`5!ThJ1xSJwsg7hVYFtE5vS^5UE0$iDGCS{}RO;R#3y#{w-1hVSg*f1)7^vfkxrm!!N|oTR0Hj?N~IbVk+yC#NK} z5myv()UMzV^!zkX@O=Yf!(Z_bF7}W>k*U4@--&RH0tHiHY0IpeezqrF#@8{E$9d=- z7^kT=1Bl;(Q0k{*_vzz1Et{+*lbz%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f|ZL4*w`O!41NfJAE&N>zi#R(&V#)+FzyN% z_g90{z|?BLiTfv@hp{u@$1u7B_-1N#iJ#RBzM2BR!2c8QKQ->n9NpJB+kXlz_@(`y zApg-W%GVs=-$=u6Jp_Mfr34rf;5=qxnT`lG`0>Z&B#n)_ODW`1+jPPicN} zhgOBZJau)7R=(j9e&@_!Y{d>iX#+|6|i>`&Q={(}Kji+O zpFcjFOMd9Ss|3O?C362PVeDvZY6)PztKhZE=cg?HTJXn${I25H4xgVwR(eM*+@Z8Irh^0H1^@(vM%fLB8x9<0IcS*cf20Th OJOEd-=rxTO#Qy`$*1Hh^ diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties old mode 100644 new mode 100755 index eb9194764..00d32aab1 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -1 +1 @@ -distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.3/apache-maven-3.3.3-bin.zip \ No newline at end of file +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip \ No newline at end of file diff --git a/mvnw b/mvnw index 0a7dac221..5551fde8e 100755 --- a/mvnw +++ b/mvnw @@ -54,38 +54,16 @@ case "`uname`" in CYGWIN*) cygwin=true ;; MINGW*) mingw=true;; Darwin*) darwin=true - # - # Look for the Apple JDKs first to preserve the existing behaviour, and then look - # for the new JDKs provided by Oracle. - # - if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK ] ; then - # - # Apple JDKs - # - export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home - fi - - if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Java/JavaVirtualMachines/CurrentJDK ] ; then - # - # Apple JDKs - # - export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home - fi - - if [ -z "$JAVA_HOME" ] && [ -L "/Library/Java/JavaVirtualMachines/CurrentJDK" ] ; then - # - # Oracle JDKs - # - export JAVA_HOME=/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home - fi - - if [ -z "$JAVA_HOME" ] && [ -x "/usr/libexec/java_home" ]; then - # - # Apple JDKs - # - export JAVA_HOME=`/usr/libexec/java_home` - fi - ;; + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + export JAVA_HOME="`/usr/libexec/java_home`" + else + export JAVA_HOME="/Library/Java/Home" + fi + fi + ;; esac if [ -z "$JAVA_HOME" ] ; then @@ -130,7 +108,7 @@ if $cygwin ; then CLASSPATH=`cygpath --path --unix "$CLASSPATH"` fi -# For Migwn, ensure paths are in UNIX format before anything is touched +# For Mingw, ensure paths are in UNIX format before anything is touched if $mingw ; then [ -n "$M2_HOME" ] && M2_HOME="`(cd "$M2_HOME"; pwd)`" @@ -184,27 +162,28 @@ fi CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher -# For Cygwin, switch paths to Windows format before running java -if $cygwin; then - [ -n "$M2_HOME" ] && - M2_HOME=`cygpath --path --windows "$M2_HOME"` - [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` - [ -n "$CLASSPATH" ] && - CLASSPATH=`cygpath --path --windows "$CLASSPATH"` -fi - # traverses directory structure from process work directory to filesystem root # first directory with .mvn subdirectory is considered project base directory find_maven_basedir() { - local basedir=$(pwd) - local wdir=$(pwd) + + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" while [ "$wdir" != '/' ] ; do if [ -d "$wdir"/.mvn ] ; then basedir=$wdir break fi - wdir=$(cd "$wdir/.."; pwd) + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround done echo "${basedir}" } @@ -216,30 +195,92 @@ concat_lines() { fi } -export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-$(find_maven_basedir)} +BASE_DIR=`find_maven_basedir "$(pwd)"` +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" + while IFS="=" read key value; do + case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $jarUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + + if command -v wget > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + fi + wget "$jarUrl" -O "$wrapperJarPath" + elif command -v curl > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + fi + curl -o "$wrapperJarPath" "$jarUrl" + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + if [ -e "$javaClass" ]; then + if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaClass") + fi + if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" -# Provide a "standardized" way to retrieve the CLI args that will -# work with both Windows and non-Windows executions. -MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" -export MAVEN_CMD_LINE_ARGS +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain -echo "Running version check" -VERSION=$( sed '\!//' -e 's!.*$!!' ) -echo "The found version is [${VERSION}]" - -if echo $VERSION | egrep -q 'M|RC'; then - echo Activating \"milestone\" profile for version=\"$VERSION\" - echo $MAVEN_ARGS | grep -q milestone || MAVEN_ARGS="$MAVEN_ARGS -Pmilestone" -else - echo Deactivating \"milestone\" profile for version=\"$VERSION\" - echo $MAVEN_ARGS | grep -q milestone && MAVEN_ARGS=$(echo $MAVEN_ARGS | sed -e 's/-Pmilestone//') -fi - exec "$JAVACMD" \ $MAVEN_OPTS \ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ - ${WRAPPER_LAUNCHER} ${MAVEN_ARGS} "$@" + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/mvnw.cmd b/mvnw.cmd old mode 100644 new mode 100755 index b0dc0e7e9..48363fa60 --- a/mvnw.cmd +++ b/mvnw.cmd @@ -1,145 +1,161 @@ -@REM ---------------------------------------------------------------------------- -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. -@REM ---------------------------------------------------------------------------- - -@REM ---------------------------------------------------------------------------- -@REM Maven2 Start Up Batch script -@REM -@REM Required ENV vars: -@REM JAVA_HOME - location of a JDK home dir -@REM -@REM Optional ENV vars -@REM M2_HOME - location of maven2's installed home dir -@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands -@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending -@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven -@REM e.g. to debug Maven itself, use -@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files -@REM ---------------------------------------------------------------------------- - -@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' -@echo off -@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on' -@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% - -@REM set %HOME% to equivalent of $HOME -if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") - -@REM Execute a user defined script before this one -if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre -@REM check for pre script, once with legacy .bat ending and once with .cmd ending -if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" -if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" -:skipRcPre - -@setlocal - -set ERROR_CODE=0 - -@REM To isolate internal variables from possible post scripts, we use another setlocal -@setlocal - -@REM ==== START VALIDATION ==== -if not "%JAVA_HOME%" == "" goto OkJHome - -echo. -echo Error: JAVA_HOME not found in your environment. >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -:OkJHome -if exist "%JAVA_HOME%\bin\java.exe" goto init - -echo. -echo Error: JAVA_HOME is set to an invalid directory. >&2 -echo JAVA_HOME = "%JAVA_HOME%" >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -@REM ==== END VALIDATION ==== - -:init - -set MAVEN_CMD_LINE_ARGS=%* - -@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". -@REM Fallback to current working directory if not found. - -set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% -IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir - -set EXEC_DIR=%CD% -set WDIR=%EXEC_DIR% -:findBaseDir -IF EXIST "%WDIR%"\.mvn goto baseDirFound -cd .. -IF "%WDIR%"=="%CD%" goto baseDirNotFound -set WDIR=%CD% -goto findBaseDir - -:baseDirFound -set MAVEN_PROJECTBASEDIR=%WDIR% -cd "%EXEC_DIR%" -goto endDetectBaseDir - -:baseDirNotFound -set MAVEN_PROJECTBASEDIR=%EXEC_DIR% -cd "%EXEC_DIR%" - -:endDetectBaseDir - -IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig - -@setlocal EnableExtensions EnableDelayedExpansion -for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a -@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% - -:endReadAdditionalConfig - -SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" - -set WRAPPER_JAR="".\.mvn\wrapper\maven-wrapper.jar"" -set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CMD_LINE_ARGS% -if ERRORLEVEL 1 goto error -goto end - -:error -set ERROR_CODE=1 - -:end -@endlocal & set ERROR_CODE=%ERROR_CODE% - -if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost -@REM check for post script, once with legacy .bat ending and once with .cmd ending -if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" -if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" -:skipRcPost - -@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' -if "%MAVEN_BATCH_PAUSE%" == "on" pause - -if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% - -exit /B %ERROR_CODE% +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven2 Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" +if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" +FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO ( + IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + echo Found %WRAPPER_JAR% +) else ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %DOWNLOAD_URL% + powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')" + echo Finished downloading %WRAPPER_JAR% +) +@REM End of extension + +%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" +if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%" == "on" pause + +if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% + +exit /B %ERROR_CODE% diff --git a/pom.xml b/pom.xml index 8351a07fa..4601c93c7 100644 --- a/pom.xml +++ b/pom.xml @@ -16,6 +16,9 @@ 3.1.0.RELEASE 2.0.0 2.2.0.BUILD-SNAPSHOT + true + true + true spring-cloud-stream-binder-kafka @@ -142,35 +145,14 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + org.apache.maven.plugins + maven-checkstyle-plugin + + + io.spring.javaformat + spring-javaformat-maven-plugin + @@ -237,4 +219,12 @@ + + + + org.apache.maven.plugins + maven-checkstyle-plugin + + + diff --git a/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/JaasLoginModuleConfiguration.java b/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/JaasLoginModuleConfiguration.java index e249a1868..63fa68b56 100644 --- a/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/JaasLoginModuleConfiguration.java +++ b/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/JaasLoginModuleConfiguration.java @@ -54,7 +54,8 @@ public class JaasLoginModuleConfiguration { public void setControlFlag(String controlFlag) { Assert.notNull(controlFlag, "cannot be null"); - this.controlFlag = KafkaJaasLoginModuleInitializer.ControlFlag.valueOf(controlFlag.toUpperCase()); + this.controlFlag = KafkaJaasLoginModuleInitializer.ControlFlag + .valueOf(controlFlag.toUpperCase()); } public Map getOptions() { @@ -64,4 +65,5 @@ public class JaasLoginModuleConfiguration { public void setOptions(Map options) { this.options = options; } + } diff --git a/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaAdminProperties.java b/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaAdminProperties.java index 0cf2e40e1..afd4984fb 100644 --- a/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaAdminProperties.java +++ b/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaAdminProperties.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,6 @@ import java.util.Map; * * @author Gary Russell * @since 2.0 - * * @deprecated in favor of {@link KafkaTopicProperties} */ @Deprecated diff --git a/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaBinderConfigurationProperties.java b/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaBinderConfigurationProperties.java index cfe2f974b..d90b1dd09 100644 --- a/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaBinderConfigurationProperties.java +++ b/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaBinderConfigurationProperties.java @@ -40,8 +40,8 @@ import org.springframework.util.ObjectUtils; import org.springframework.util.StringUtils; /** - * Configuration properties for the Kafka binder. - * The properties in this class are prefixed with spring.cloud.stream.kafka.binder. + * Configuration properties for the Kafka binder. The properties in this class are + * prefixed with spring.cloud.stream.kafka.binder. * * @author David Turanski * @author Ilayaperumal Gopinathan @@ -127,11 +127,11 @@ public class KafkaBinderConfigurationProperties { private JaasLoginModuleConfiguration jaas; /** - * The bean name of a custom header mapper to use instead of a {@link org.springframework.kafka.support.DefaultKafkaHeaderMapper}. + * The bean name of a custom header mapper to use instead of a + * {@link org.springframework.kafka.support.DefaultKafkaHeaderMapper}. */ private String headerMapperBeanName; - public KafkaBinderConfigurationProperties(KafkaProperties kafkaProperties) { Assert.notNull(kafkaProperties, "'kafkaProperties' cannot be null"); this.kafkaProperties = kafkaProperties; @@ -328,9 +328,8 @@ public class KafkaBinderConfigurationProperties { } /** - * Converts an array of host values to a comma-separated String. - * It will append the default port value, if not already specified. - * + * Converts an array of host values to a comma-separated String. It will append the + * default port value, if not already specified. * @param hosts host string * @param defaultPort port * @return formatted connection string @@ -526,15 +525,18 @@ public class KafkaBinderConfigurationProperties { Map consumerConfiguration = new HashMap<>(); consumerConfiguration.putAll(this.kafkaProperties.buildConsumerProperties()); // Copy configured binder properties that apply to consumers - for (Map.Entry configurationEntry : this.configuration.entrySet()) { + for (Map.Entry configurationEntry : this.configuration + .entrySet()) { if (ConsumerConfig.configNames().contains(configurationEntry.getKey())) { - consumerConfiguration.put(configurationEntry.getKey(), configurationEntry.getValue()); + consumerConfiguration.put(configurationEntry.getKey(), + configurationEntry.getValue()); } } consumerConfiguration.putAll(this.consumerProperties); // Override Spring Boot bootstrap server setting if left to default with the value // configured in the binder - return getConfigurationWithBootstrapServer(consumerConfiguration, ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG); + return getConfigurationWithBootstrapServer(consumerConfiguration, + ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG); } /** @@ -547,18 +549,22 @@ public class KafkaBinderConfigurationProperties { Map producerConfiguration = new HashMap<>(); producerConfiguration.putAll(this.kafkaProperties.buildProducerProperties()); // Copy configured binder properties that apply to producers - for (Map.Entry configurationEntry : this.configuration.entrySet()) { + for (Map.Entry configurationEntry : this.configuration + .entrySet()) { if (ProducerConfig.configNames().contains(configurationEntry.getKey())) { - producerConfiguration.put(configurationEntry.getKey(), configurationEntry.getValue()); + producerConfiguration.put(configurationEntry.getKey(), + configurationEntry.getValue()); } } producerConfiguration.putAll(this.producerProperties); // Override Spring Boot bootstrap server setting if left to default with the value // configured in the binder - return getConfigurationWithBootstrapServer(producerConfiguration, ProducerConfig.BOOTSTRAP_SERVERS_CONFIG); + return getConfigurationWithBootstrapServer(producerConfiguration, + ProducerConfig.BOOTSTRAP_SERVERS_CONFIG); } - private Map getConfigurationWithBootstrapServer(Map configuration, String bootstrapServersConfig) { + private Map getConfigurationWithBootstrapServer( + Map configuration, String bootstrapServersConfig) { if (ObjectUtils.isEmpty(configuration.get(bootstrapServersConfig))) { configuration.put(bootstrapServersConfig, getKafkaConnectionString()); } @@ -568,7 +574,8 @@ public class KafkaBinderConfigurationProperties { @SuppressWarnings("unchecked") List bootStrapServers = (List) configuration .get(bootstrapServersConfig); - if (bootStrapServers.size() == 1 && bootStrapServers.get(0).equals("localhost:9092")) { + if (bootStrapServers.size() == 1 + && bootStrapServers.get(0).equals("localhost:9092")) { configuration.put(bootstrapServersConfig, getKafkaConnectionString()); } } @@ -616,9 +623,10 @@ public class KafkaBinderConfigurationProperties { } /** - * An combination of {@link ProducerProperties} and {@link KafkaProducerProperties} - * so that common and kafka-specific properties can be set for the transactional + * An combination of {@link ProducerProperties} and {@link KafkaProducerProperties} so + * that common and kafka-specific properties can be set for the transactional * producer. + * * @since 2.1 */ public static class CombinedProducerProperties { @@ -643,8 +651,10 @@ public class KafkaBinderConfigurationProperties { return this.producerProperties.getPartitionSelectorExpression(); } - public void setPartitionSelectorExpression(Expression partitionSelectorExpression) { - this.producerProperties.setPartitionSelectorExpression(partitionSelectorExpression); + public void setPartitionSelectorExpression( + Expression partitionSelectorExpression) { + this.producerProperties + .setPartitionSelectorExpression(partitionSelectorExpression); } public @Min(value = 1, message = "Partition count should be greater than zero.") int getPartitionCount() { @@ -663,11 +673,13 @@ public class KafkaBinderConfigurationProperties { this.producerProperties.setRequiredGroups(requiredGroups); } - public @AssertTrue(message = "Partition key expression and partition key extractor class properties are mutually exclusive.") boolean isValidPartitionKeyProperty() { + public @AssertTrue(message = "Partition key expression and partition key extractor class properties " + + "are mutually exclusive.") boolean isValidPartitionKeyProperty() { return this.producerProperties.isValidPartitionKeyProperty(); } - public @AssertTrue(message = "Partition selector class and partition selector expression properties are mutually exclusive.") boolean isValidPartitionSelectorProperty() { + public @AssertTrue(message = "Partition selector class and partition selector expression " + + "properties are mutually exclusive.") boolean isValidPartitionSelectorProperty() { return this.producerProperties.isValidPartitionSelectorProperty(); } @@ -700,7 +712,8 @@ public class KafkaBinderConfigurationProperties { } public void setPartitionKeyExtractorName(String partitionKeyExtractorName) { - this.producerProperties.setPartitionKeyExtractorName(partitionKeyExtractorName); + this.producerProperties + .setPartitionKeyExtractorName(partitionKeyExtractorName); } public String getPartitionSelectorName() { @@ -788,6 +801,7 @@ public class KafkaBinderConfigurationProperties { public KafkaProducerProperties getExtension() { return this.kafkaProducerProperties; } + } } diff --git a/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaBindingProperties.java b/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaBindingProperties.java index 121b4612b..8dbb7e782 100644 --- a/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaBindingProperties.java +++ b/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaBindingProperties.java @@ -45,4 +45,5 @@ public class KafkaBindingProperties implements BinderSpecificPropertiesProvider public void setProducer(KafkaProducerProperties producer) { this.producer = producer; } + } diff --git a/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaConsumerProperties.java b/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaConsumerProperties.java index b1f0ff010..94abdb7cd 100644 --- a/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaConsumerProperties.java +++ b/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaConsumerProperties.java @@ -40,6 +40,7 @@ public class KafkaConsumerProperties { * Enumeration for starting consumer offset. */ public enum StartOffset { + /** * Starting from earliest offset. */ @@ -58,12 +59,14 @@ public class KafkaConsumerProperties { public long getReferencePoint() { return this.referencePoint; } + } /** * Standard headers for the message. */ public enum StandardHeaders { + /** * No headers. */ @@ -80,6 +83,7 @@ public class KafkaConsumerProperties { * Indicating both ID and timestamp headers. */ both + } private boolean ackEachRecord; @@ -223,6 +227,7 @@ public class KafkaConsumerProperties { public void setDlqProducerProperties(KafkaProducerProperties dlqProducerProperties) { this.dlqProducerProperties = dlqProducerProperties; } + public StandardHeaders getStandardHeaders() { return this.standardHeaders; } diff --git a/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaExtendedBindingProperties.java b/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaExtendedBindingProperties.java index c1ef8daf8..41ba1697b 100644 --- a/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaExtendedBindingProperties.java +++ b/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaExtendedBindingProperties.java @@ -21,7 +21,8 @@ import org.springframework.cloud.stream.binder.AbstractExtendedBindingProperties import org.springframework.cloud.stream.binder.BinderSpecificPropertiesProvider; /** - * Kafka specific extended binding properties class that extends from {@link AbstractExtendedBindingProperties}. + * Kafka specific extended binding properties class that extends from + * {@link AbstractExtendedBindingProperties}. * * @author Marius Bogoevici * @author Gary Russell @@ -29,8 +30,8 @@ import org.springframework.cloud.stream.binder.BinderSpecificPropertiesProvider; * @author Oleg Zhurakousky */ @ConfigurationProperties("spring.cloud.stream.kafka") -public class KafkaExtendedBindingProperties - extends AbstractExtendedBindingProperties { +public class KafkaExtendedBindingProperties extends + AbstractExtendedBindingProperties { private static final String DEFAULTS_PREFIX = "spring.cloud.stream.kafka.default"; @@ -43,4 +44,5 @@ public class KafkaExtendedBindingProperties public Class getExtendedPropertiesEntryClass() { return KafkaBindingProperties.class; } + } diff --git a/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaProducerProperties.java b/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaProducerProperties.java index c930f6ced..26ab0a031 100644 --- a/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaProducerProperties.java +++ b/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaProducerProperties.java @@ -159,14 +159,15 @@ public class KafkaProducerProperties { snappy, /** - * lz4 compression + * lz4 compression. */ lz4, - // /** // TODO: uncomment and fix docs when kafka-clients 2.1.0 or newer is the default - // * zstd compression - // */ - // zstd + // /** // TODO: uncomment and fix docs when kafka-clients 2.1.0 or newer is the + // default + // * zstd compression + // */ + // zstd } diff --git a/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaTopicProperties.java b/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaTopicProperties.java index 1124ca797..65a591b0f 100644 --- a/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaTopicProperties.java +++ b/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/properties/KafkaTopicProperties.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 the original author or authors. + * Copyright 2019-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/provisioning/KafkaTopicProvisioner.java b/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/provisioning/KafkaTopicProvisioner.java index be2ab30e7..88a127c0f 100644 --- a/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/provisioning/KafkaTopicProvisioner.java +++ b/spring-cloud-stream-binder-kafka-core/src/main/java/org/springframework/cloud/stream/binder/kafka/provisioning/KafkaTopicProvisioner.java @@ -75,8 +75,11 @@ import org.springframework.util.StringUtils; * @author Oleg Zhurakousky * @author Aldo Sinanaj */ -public class KafkaTopicProvisioner implements ProvisioningProvider, - ExtendedProducerProperties>, InitializingBean { +public class KafkaTopicProvisioner implements + // @checkstyle:off + ProvisioningProvider, ExtendedProducerProperties>, + // @checkstyle:on + InitializingBean { private static final int DEFAULT_OPERATION_TIMEOUT = 30; @@ -90,17 +93,18 @@ public class KafkaTopicProvisioner implements ProvisioningProvider> all = describeTopicsResult.all(); + DescribeTopicsResult describeTopicsResult = adminClient + .describeTopics(Collections.singletonList(name)); + KafkaFuture> all = describeTopicsResult + .all(); Map topicDescriptions = null; try { topicDescriptions = all.get(this.operationTimeout, TimeUnit.SECONDS); } catch (Exception ex) { - throw new ProvisioningException("Problems encountered with partitions finding", ex); + throw new ProvisioningException( + "Problems encountered with partitions finding", ex); } TopicDescription topicDescription = topicDescriptions.get(name); partitions = topicDescription.partitions().size(); @@ -155,7 +163,8 @@ public class KafkaTopicProvisioner implements ProvisioningProvider properties) { if (!properties.isMultiplex()) { return doProvisionConsumerDestination(name, group, properties); @@ -169,7 +178,8 @@ public class KafkaTopicProvisioner implements ProvisioningProvider properties) { if (properties.getExtension().isDestinationIsPattern()) { @@ -191,18 +201,24 @@ public class KafkaTopicProvisioner implements ProvisioningProvider> all = describeTopicsResult.all(); + DescribeTopicsResult describeTopicsResult = adminClient + .describeTopics(Collections.singletonList(name)); + KafkaFuture> all = describeTopicsResult + .all(); try { - Map topicDescriptions = all.get(this.operationTimeout, TimeUnit.SECONDS); + Map topicDescriptions = all + .get(this.operationTimeout, TimeUnit.SECONDS); TopicDescription topicDescription = topicDescriptions.get(name); int partitions = topicDescription.partitions().size(); - consumerDestination = createDlqIfNeedBe(adminClient, name, group, properties, anonymous, partitions); + consumerDestination = createDlqIfNeedBe(adminClient, name, group, + properties, anonymous, partitions); if (consumerDestination == null) { - consumerDestination = new KafkaConsumerDestination(name, partitions); + consumerDestination = new KafkaConsumerDestination(name, + partitions); } } catch (Exception ex) { @@ -218,22 +234,24 @@ public class KafkaTopicProvisioner implements ProvisioningProvider adminProps, KafkaProperties bootProps, - KafkaBinderConfigurationProperties binderProps) { + private void normalalizeBootPropsWithBinder(Map adminProps, + KafkaProperties bootProps, KafkaBinderConfigurationProperties binderProps) { // First deal with the outlier String kafkaConnectionString = binderProps.getKafkaConnectionString(); - if (ObjectUtils.isEmpty(adminProps.get(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG)) - || !kafkaConnectionString.equals(binderProps.getDefaultKafkaConnectionString())) { - adminProps.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, kafkaConnectionString); + if (ObjectUtils + .isEmpty(adminProps.get(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG)) + || !kafkaConnectionString + .equals(binderProps.getDefaultKafkaConnectionString())) { + adminProps.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, + kafkaConnectionString); } // Now override any boot values with binder values Map binderProperties = binderProps.getConfiguration(); @@ -246,21 +264,24 @@ public class KafkaTopicProvisioner implements ProvisioningProvider properties, - boolean anonymous, int partitions) { + private ConsumerDestination createDlqIfNeedBe(AdminClient adminClient, String name, + String group, ExtendedConsumerProperties properties, + boolean anonymous, int partitions) { if (properties.getExtension().isEnableDlq() && !anonymous) { - String dlqTopic = StringUtils.hasText(properties.getExtension().getDlqName()) ? - properties.getExtension().getDlqName() : "error." + name + "." + group; + String dlqTopic = StringUtils.hasText(properties.getExtension().getDlqName()) + ? properties.getExtension().getDlqName() + : "error." + name + "." + group; try { createTopicAndPartitions(adminClient, dlqTopic, partitions, - properties.getExtension().isAutoRebalanceEnabled(), properties.getExtension().getTopic()); + properties.getExtension().isAutoRebalanceEnabled(), + properties.getExtension().getTopic()); } catch (Throwable throwable) { if (throwable instanceof Error) { @@ -275,29 +296,34 @@ public class KafkaTopicProvisioner implements ProvisioningProvider> namesFutures = listTopicsResult.names(); @@ -323,54 +351,71 @@ public class KafkaTopicProvisioner implements ProvisioningProvider names = namesFutures.get(this.operationTimeout, TimeUnit.SECONDS); if (names.contains(topicName)) { // only consider minPartitionCount for resizing if autoAddPartitions is true - int effectivePartitionCount = this.configurationProperties.isAutoAddPartitions() - ? Math.max(this.configurationProperties.getMinPartitionCount(), partitionCount) - : partitionCount; - DescribeTopicsResult describeTopicsResult = adminClient.describeTopics(Collections.singletonList(topicName)); - KafkaFuture> topicDescriptionsFuture = describeTopicsResult.all(); - Map topicDescriptions = topicDescriptionsFuture.get(this.operationTimeout, TimeUnit.SECONDS); + int effectivePartitionCount = this.configurationProperties + .isAutoAddPartitions() + ? Math.max( + this.configurationProperties.getMinPartitionCount(), + partitionCount) + : partitionCount; + DescribeTopicsResult describeTopicsResult = adminClient + .describeTopics(Collections.singletonList(topicName)); + KafkaFuture> topicDescriptionsFuture = describeTopicsResult + .all(); + Map topicDescriptions = topicDescriptionsFuture + .get(this.operationTimeout, TimeUnit.SECONDS); TopicDescription topicDescription = topicDescriptions.get(topicName); int partitionSize = topicDescription.partitions().size(); if (partitionSize < effectivePartitionCount) { if (this.configurationProperties.isAutoAddPartitions()) { - CreatePartitionsResult partitions = adminClient.createPartitions( - Collections.singletonMap(topicName, NewPartitions.increaseTo(effectivePartitionCount))); + CreatePartitionsResult partitions = adminClient + .createPartitions(Collections.singletonMap(topicName, + NewPartitions.increaseTo(effectivePartitionCount))); partitions.all().get(this.operationTimeout, TimeUnit.SECONDS); } else if (tolerateLowerPartitionsOnBroker) { - this.logger.warn("The number of expected partitions was: " + partitionCount + ", but " - + partitionSize + (partitionSize > 1 ? " have " : " has ") + "been found instead." - + "There will be " + (effectivePartitionCount - partitionSize) + " idle consumers"); + this.logger.warn("The number of expected partitions was: " + + partitionCount + ", but " + partitionSize + + (partitionSize > 1 ? " have " : " has ") + + "been found instead." + "There will be " + + (effectivePartitionCount - partitionSize) + + " idle consumers"); } else { - throw new ProvisioningException("The number of expected partitions was: " + partitionCount + ", but " - + partitionSize + (partitionSize > 1 ? " have " : " has ") + "been found instead." - + "Consider either increasing the partition count of the topic or enabling " + - "`autoAddPartitions`"); + throw new ProvisioningException( + "The number of expected partitions was: " + partitionCount + + ", but " + partitionSize + + (partitionSize > 1 ? " have " : " has ") + + "been found instead." + + "Consider either increasing the partition count of the topic or enabling " + + "`autoAddPartitions`"); } } } else { // always consider minPartitionCount for topic creation - final int effectivePartitionCount = Math.max(this.configurationProperties.getMinPartitionCount(), - partitionCount); + final int effectivePartitionCount = Math.max( + this.configurationProperties.getMinPartitionCount(), partitionCount); this.metadataRetryOperations.execute((context) -> { NewTopic newTopic; - Map> replicasAssignments = topicProperties.getReplicasAssignments(); - if (replicasAssignments != null && replicasAssignments.size() > 0) { - newTopic = new NewTopic(topicName, topicProperties.getReplicasAssignments()); + Map> replicasAssignments = topicProperties + .getReplicasAssignments(); + if (replicasAssignments != null && replicasAssignments.size() > 0) { + newTopic = new NewTopic(topicName, + topicProperties.getReplicasAssignments()); } else { newTopic = new NewTopic(topicName, effectivePartitionCount, topicProperties.getReplicationFactor() != null ? topicProperties.getReplicationFactor() - : this.configurationProperties.getReplicationFactor()); + : this.configurationProperties + .getReplicationFactor()); } if (topicProperties.getProperties().size() > 0) { newTopic.configs(topicProperties.getProperties()); } - CreateTopicsResult createTopicsResult = adminClient.createTopics(Collections.singletonList(newTopic)); + CreateTopicsResult createTopicsResult = adminClient + .createTopics(Collections.singletonList(newTopic)); try { createTopicsResult.all().get(this.operationTimeout, TimeUnit.SECONDS); } @@ -378,7 +423,8 @@ public class KafkaTopicProvisioner implements ProvisioningProvider getPartitionsForTopic(final int partitionCount, - final boolean tolerateLowerPartitionsOnBroker, - final Callable> callable, - final String topicName) { + final boolean tolerateLowerPartitionsOnBroker, + final Callable> callable, final String topicName) { try { - return this.metadataRetryOperations - .execute((context) -> { - Collection partitions = Collections.emptyList(); + return this.metadataRetryOperations.execute((context) -> { + Collection partitions = Collections.emptyList(); - try { - //This call may return null or throw an exception. - partitions = callable.call(); + try { + // This call may return null or throw an exception. + partitions = callable.call(); + } + catch (Exception ex) { + // The above call can potentially throw exceptions such as timeout. If + // we can determine + // that the exception was due to an unknown topic on the broker, just + // simply rethrow that. + if (ex instanceof UnknownTopicOrPartitionException) { + throw ex; + } + this.logger.error("Failed to obtain partition information", ex); + } + if (CollectionUtils.isEmpty(partitions)) { + final AdminClient adminClient = AdminClient + .create(this.adminClientProperties); + final DescribeTopicsResult describeTopicsResult = adminClient + .describeTopics(Collections.singletonList(topicName)); + try { + describeTopicsResult.all().get(); + } + catch (ExecutionException ex) { + if (ex.getCause() instanceof UnknownTopicOrPartitionException) { + throw (UnknownTopicOrPartitionException) ex.getCause(); } - catch (Exception ex) { - //The above call can potentially throw exceptions such as timeout. If we can determine - //that the exception was due to an unknown topic on the broker, just simply rethrow that. - if (ex instanceof UnknownTopicOrPartitionException) { - throw ex; - } - this.logger.error("Failed to obtain partition information", ex); + else { + logger.warn("No partitions have been retrieved for the topic " + + "(" + topicName + + "). This will affect the health check."); } - if (CollectionUtils.isEmpty(partitions)) { - final AdminClient adminClient = AdminClient.create(this.adminClientProperties); - final DescribeTopicsResult describeTopicsResult = adminClient.describeTopics(Collections.singletonList(topicName)); - try { - describeTopicsResult.all().get(); - } - catch (ExecutionException ex) { - if (ex.getCause() instanceof UnknownTopicOrPartitionException) { - throw (UnknownTopicOrPartitionException)ex.getCause(); - } else { - logger.warn("No partitions have been retrieved for the topic (" + topicName + "). This will affect the health check."); - } - } - } - // do a sanity check on the partition set - int partitionSize = partitions.size(); - if (partitionSize < partitionCount) { - if (tolerateLowerPartitionsOnBroker) { - this.logger.warn("The number of expected partitions was: " + partitionCount + ", but " - + partitionSize + (partitionSize > 1 ? " have " : " has ") + "been found instead." - + "There will be " + (partitionCount - partitionSize) + " idle consumers"); - } - else { - throw new IllegalStateException("The number of expected partitions was: " - + partitionCount + ", but " + partitionSize - + (partitionSize > 1 ? " have " : " has ") + "been found instead"); - } - } - return partitions; - }); + } + } + // do a sanity check on the partition set + int partitionSize = partitions.size(); + if (partitionSize < partitionCount) { + if (tolerateLowerPartitionsOnBroker) { + this.logger.warn("The number of expected partitions was: " + + partitionCount + ", but " + partitionSize + + (partitionSize > 1 ? " have " : " has ") + + "been found instead." + "There will be " + + (partitionCount - partitionSize) + " idle consumers"); + } + else { + throw new IllegalStateException( + "The number of expected partitions was: " + partitionCount + + ", but " + partitionSize + + (partitionSize > 1 ? " have " : " has ") + + "been found instead"); + } + } + return partitions; + }); } catch (Exception ex) { this.logger.error("Cannot initialize Binder", ex); @@ -477,11 +532,10 @@ public class KafkaTopicProvisioner implements ProvisioningProvider= 'a') && (b <= 'z') || (b >= 'A') && (b <= 'Z') || (b >= '0') && (b <= '9') || (b == '.') - || (b == '-') || (b == '_'))) { + if (!((b >= 'a') && (b <= 'z') || (b >= 'A') && (b <= 'Z') + || (b >= '0') && (b <= '9') || (b == '.') || (b == '-') + || (b == '_'))) { throw new IllegalArgumentException( - "Topic name can only have ASCII alphanumerics, '.', '_' and '-', but was: '" + topicName - + "'"); + "Topic name can only have ASCII alphanumerics, '.', '_' and '-', but was: '" + + topicName + "'"); } } } @@ -51,4 +50,5 @@ public final class KafkaTopicUtils { throw new AssertionError(ex); // Can't happen } } + } diff --git a/spring-cloud-stream-binder-kafka-core/src/test/java/org/springframework/cloud/stream/binder/kafka/provisioning/KafkaTopicProvisionerTests.java b/spring-cloud-stream-binder-kafka-core/src/test/java/org/springframework/cloud/stream/binder/kafka/provisioning/KafkaTopicProvisionerTests.java index 335c9c31d..d4e8c4c90 100644 --- a/spring-cloud-stream-binder-kafka-core/src/test/java/org/springframework/cloud/stream/binder/kafka/provisioning/KafkaTopicProvisionerTests.java +++ b/spring-cloud-stream-binder-kafka-core/src/test/java/org/springframework/cloud/stream/binder/kafka/provisioning/KafkaTopicProvisionerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,7 +35,6 @@ import org.springframework.kafka.test.utils.KafkaTestUtils; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; - /** * @author Gary Russell * @since 2.0 @@ -47,18 +46,27 @@ public class KafkaTopicProvisionerTests { @Test public void bootPropertiesOverriddenExceptServers() throws Exception { KafkaProperties bootConfig = new KafkaProperties(); - bootConfig.getProperties().put(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, "PLAINTEXT"); + bootConfig.getProperties().put(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, + "PLAINTEXT"); bootConfig.setBootstrapServers(Collections.singletonList("localhost:1234")); - KafkaBinderConfigurationProperties binderConfig = new KafkaBinderConfigurationProperties(bootConfig); - binderConfig.getConfiguration().put(AdminClientConfig.SECURITY_PROTOCOL_CONFIG, "SSL"); + KafkaBinderConfigurationProperties binderConfig = new KafkaBinderConfigurationProperties( + bootConfig); + binderConfig.getConfiguration().put(AdminClientConfig.SECURITY_PROTOCOL_CONFIG, + "SSL"); ClassPathResource ts = new ClassPathResource("test.truststore.ks"); - binderConfig.getConfiguration().put(SslConfigs.SSL_TRUSTSTORE_LOCATION_CONFIG, ts.getFile().getAbsolutePath()); + binderConfig.getConfiguration().put(SslConfigs.SSL_TRUSTSTORE_LOCATION_CONFIG, + ts.getFile().getAbsolutePath()); binderConfig.setBrokers("localhost:9092"); - KafkaTopicProvisioner provisioner = new KafkaTopicProvisioner(binderConfig, bootConfig); + KafkaTopicProvisioner provisioner = new KafkaTopicProvisioner(binderConfig, + bootConfig); AdminClient adminClient = provisioner.createAdminClient(); - assertThat(KafkaTestUtils.getPropertyValue(adminClient, "client.selector.channelBuilder")).isInstanceOf(SslChannelBuilder.class); - Map configs = KafkaTestUtils.getPropertyValue(adminClient, "client.selector.channelBuilder.configs", Map.class); - assertThat(((List) configs.get(CommonClientConfigs.BOOTSTRAP_SERVERS_CONFIG)).get(0)).isEqualTo("localhost:1234"); + assertThat(KafkaTestUtils.getPropertyValue(adminClient, + "client.selector.channelBuilder")).isInstanceOf(SslChannelBuilder.class); + Map configs = KafkaTestUtils.getPropertyValue(adminClient, + "client.selector.channelBuilder.configs", Map.class); + assertThat( + ((List) configs.get(CommonClientConfigs.BOOTSTRAP_SERVERS_CONFIG)).get(0)) + .isEqualTo("localhost:1234"); adminClient.close(); } @@ -66,33 +74,44 @@ public class KafkaTopicProvisionerTests { @Test public void bootPropertiesOverriddenIncludingServers() throws Exception { KafkaProperties bootConfig = new KafkaProperties(); - bootConfig.getProperties().put(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, "PLAINTEXT"); + bootConfig.getProperties().put(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, + "PLAINTEXT"); bootConfig.setBootstrapServers(Collections.singletonList("localhost:9092")); - KafkaBinderConfigurationProperties binderConfig = new KafkaBinderConfigurationProperties(bootConfig); - binderConfig.getConfiguration().put(AdminClientConfig.SECURITY_PROTOCOL_CONFIG, "SSL"); + KafkaBinderConfigurationProperties binderConfig = new KafkaBinderConfigurationProperties( + bootConfig); + binderConfig.getConfiguration().put(AdminClientConfig.SECURITY_PROTOCOL_CONFIG, + "SSL"); ClassPathResource ts = new ClassPathResource("test.truststore.ks"); - binderConfig.getConfiguration().put(SslConfigs.SSL_TRUSTSTORE_LOCATION_CONFIG, ts.getFile().getAbsolutePath()); + binderConfig.getConfiguration().put(SslConfigs.SSL_TRUSTSTORE_LOCATION_CONFIG, + ts.getFile().getAbsolutePath()); binderConfig.setBrokers("localhost:1234"); - KafkaTopicProvisioner provisioner = new KafkaTopicProvisioner(binderConfig, bootConfig); + KafkaTopicProvisioner provisioner = new KafkaTopicProvisioner(binderConfig, + bootConfig); AdminClient adminClient = provisioner.createAdminClient(); - assertThat(KafkaTestUtils.getPropertyValue(adminClient, "client.selector.channelBuilder")).isInstanceOf(SslChannelBuilder.class); - Map configs = KafkaTestUtils.getPropertyValue(adminClient, "client.selector.channelBuilder.configs", Map.class); - assertThat(((List) configs.get(CommonClientConfigs.BOOTSTRAP_SERVERS_CONFIG)).get(0)).isEqualTo("localhost:1234"); + assertThat(KafkaTestUtils.getPropertyValue(adminClient, + "client.selector.channelBuilder")).isInstanceOf(SslChannelBuilder.class); + Map configs = KafkaTestUtils.getPropertyValue(adminClient, + "client.selector.channelBuilder.configs", Map.class); + assertThat( + ((List) configs.get(CommonClientConfigs.BOOTSTRAP_SERVERS_CONFIG)).get(0)) + .isEqualTo("localhost:1234"); adminClient.close(); } @Test public void brokersInvalid() throws Exception { KafkaProperties bootConfig = new KafkaProperties(); - KafkaBinderConfigurationProperties binderConfig = new KafkaBinderConfigurationProperties(bootConfig); - binderConfig.getConfiguration().put(CommonClientConfigs.BOOTSTRAP_SERVERS_CONFIG, "localhost:1234"); + KafkaBinderConfigurationProperties binderConfig = new KafkaBinderConfigurationProperties( + bootConfig); + binderConfig.getConfiguration().put(CommonClientConfigs.BOOTSTRAP_SERVERS_CONFIG, + "localhost:1234"); try { new KafkaTopicProvisioner(binderConfig, bootConfig); fail("Expected illegal state"); } catch (IllegalStateException e) { - assertThat(e.getMessage()) - .isEqualTo("Set binder bootstrap servers via the 'brokers' property, not 'configuration'"); + assertThat(e.getMessage()).isEqualTo( + "Set binder bootstrap servers via the 'brokers' property, not 'configuration'"); } } diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/GlobalKTableBinder.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/GlobalKTableBinder.java index ab2a07c3e..444e5e8fd 100644 --- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/GlobalKTableBinder.java +++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/GlobalKTableBinder.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,27 +36,35 @@ import org.springframework.util.StringUtils; /** * An {@link AbstractBinder} implementation for {@link GlobalKTable}. - * - * Provides only consumer binding for the bound {@link GlobalKTable}. - * Output bindings are not allowed on this binder. + *

+ * Provides only consumer binding for the bound {@link GlobalKTable}. Output bindings are + * not allowed on this binder. * * @author Soby Chacko * @since 2.1.0 */ public class GlobalKTableBinder extends + // @checkstyle:off AbstractBinder, ExtendedConsumerProperties, ExtendedProducerProperties> - implements ExtendedPropertiesBinder, KafkaStreamsConsumerProperties, KafkaStreamsProducerProperties> { + implements + ExtendedPropertiesBinder, KafkaStreamsConsumerProperties, KafkaStreamsProducerProperties> { + // @checkstyle:on private final KafkaStreamsBinderConfigurationProperties binderConfigurationProperties; private final KafkaTopicProvisioner kafkaTopicProvisioner; private final Map kafkaStreamsDlqDispatchers; + // @checkstyle:off private KafkaStreamsExtendedBindingProperties kafkaStreamsExtendedBindingProperties = new KafkaStreamsExtendedBindingProperties(); - public GlobalKTableBinder(KafkaStreamsBinderConfigurationProperties binderConfigurationProperties, KafkaTopicProvisioner kafkaTopicProvisioner, - Map kafkaStreamsDlqDispatchers) { + // @checkstyle:on + + public GlobalKTableBinder( + KafkaStreamsBinderConfigurationProperties binderConfigurationProperties, + KafkaTopicProvisioner kafkaTopicProvisioner, + Map kafkaStreamsDlqDispatchers) { this.binderConfigurationProperties = binderConfigurationProperties; this.kafkaTopicProvisioner = kafkaTopicProvisioner; this.kafkaStreamsDlqDispatchers = kafkaStreamsDlqDispatchers; @@ -64,31 +72,39 @@ public class GlobalKTableBinder extends @Override @SuppressWarnings("unchecked") - protected Binding> doBindConsumer(String name, String group, GlobalKTable inputTarget, - ExtendedConsumerProperties properties) { + protected Binding> doBindConsumer(String name, + String group, GlobalKTable inputTarget, + ExtendedConsumerProperties properties) { if (!StringUtils.hasText(group)) { group = this.binderConfigurationProperties.getApplicationId(); } - KafkaStreamsBinderUtils.prepareConsumerBinding(name, group, getApplicationContext(), - this.kafkaTopicProvisioner, - this.binderConfigurationProperties, properties, this.kafkaStreamsDlqDispatchers); + KafkaStreamsBinderUtils.prepareConsumerBinding(name, group, + getApplicationContext(), this.kafkaTopicProvisioner, + this.binderConfigurationProperties, properties, + this.kafkaStreamsDlqDispatchers); return new DefaultBinding<>(name, group, inputTarget, null); } @Override - protected Binding> doBindProducer(String name, GlobalKTable outboundBindTarget, - ExtendedProducerProperties properties) { - throw new UnsupportedOperationException("No producer level binding is allowed for GlobalKTable"); + protected Binding> doBindProducer(String name, + GlobalKTable outboundBindTarget, + ExtendedProducerProperties properties) { + throw new UnsupportedOperationException( + "No producer level binding is allowed for GlobalKTable"); } @Override - public KafkaStreamsConsumerProperties getExtendedConsumerProperties(String channelName) { - return this.kafkaStreamsExtendedBindingProperties.getExtendedConsumerProperties(channelName); + public KafkaStreamsConsumerProperties getExtendedConsumerProperties( + String channelName) { + return this.kafkaStreamsExtendedBindingProperties + .getExtendedConsumerProperties(channelName); } @Override - public KafkaStreamsProducerProperties getExtendedProducerProperties(String channelName) { - throw new UnsupportedOperationException("No producer binding is allowed and therefore no properties"); + public KafkaStreamsProducerProperties getExtendedProducerProperties( + String channelName) { + throw new UnsupportedOperationException( + "No producer binding is allowed and therefore no properties"); } @Override @@ -98,7 +114,8 @@ public class GlobalKTableBinder extends @Override public Class getExtendedPropertiesEntryClass() { - return this.kafkaStreamsExtendedBindingProperties.getExtendedPropertiesEntryClass(); + return this.kafkaStreamsExtendedBindingProperties + .getExtendedPropertiesEntryClass(); } } diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/GlobalKTableBinderConfiguration.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/GlobalKTableBinderConfiguration.java index 8db2bd5af..60555c316 100644 --- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/GlobalKTableBinderConfiguration.java +++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/GlobalKTableBinderConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,26 +42,35 @@ public class GlobalKTableBinderConfiguration { @ConditionalOnBean(name = "outerContext") public static BeanFactoryPostProcessor outerContextBeanFactoryPostProcessor() { return (beanFactory) -> { - // It is safe to call getBean("outerContext") here, because this bean is registered as first + // It is safe to call getBean("outerContext") here, because this bean is + // registered as first // and as independent from the parent context. - ApplicationContext outerContext = (ApplicationContext) beanFactory.getBean("outerContext"); - beanFactory.registerSingleton(KafkaStreamsBinderConfigurationProperties.class.getSimpleName(), outerContext - .getBean(KafkaStreamsBinderConfigurationProperties.class)); - beanFactory.registerSingleton(KafkaStreamsBindingInformationCatalogue.class.getSimpleName(), outerContext - .getBean(KafkaStreamsBindingInformationCatalogue.class)); + ApplicationContext outerContext = (ApplicationContext) beanFactory + .getBean("outerContext"); + beanFactory.registerSingleton( + KafkaStreamsBinderConfigurationProperties.class.getSimpleName(), + outerContext + .getBean(KafkaStreamsBinderConfigurationProperties.class)); + beanFactory.registerSingleton( + KafkaStreamsBindingInformationCatalogue.class.getSimpleName(), + outerContext.getBean(KafkaStreamsBindingInformationCatalogue.class)); }; } @Bean - public KafkaTopicProvisioner provisioningProvider(KafkaBinderConfigurationProperties binderConfigurationProperties, - KafkaProperties kafkaProperties) { + public KafkaTopicProvisioner provisioningProvider( + KafkaBinderConfigurationProperties binderConfigurationProperties, + KafkaProperties kafkaProperties) { return new KafkaTopicProvisioner(binderConfigurationProperties, kafkaProperties); } @Bean - public GlobalKTableBinder GlobalKTableBinder(KafkaStreamsBinderConfigurationProperties binderConfigurationProperties, - KafkaTopicProvisioner kafkaTopicProvisioner, - @Qualifier("kafkaStreamsDlqDispatchers") Map kafkaStreamsDlqDispatchers) { - return new GlobalKTableBinder(binderConfigurationProperties, kafkaTopicProvisioner, kafkaStreamsDlqDispatchers); + public GlobalKTableBinder GlobalKTableBinder( + KafkaStreamsBinderConfigurationProperties binderConfigurationProperties, + KafkaTopicProvisioner kafkaTopicProvisioner, + @Qualifier("kafkaStreamsDlqDispatchers") Map kafkaStreamsDlqDispatchers) { + return new GlobalKTableBinder(binderConfigurationProperties, + kafkaTopicProvisioner, kafkaStreamsDlqDispatchers); } + } diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/GlobalKTableBoundElementFactory.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/GlobalKTableBoundElementFactory.java index f68a98da7..9219422a2 100644 --- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/GlobalKTableBoundElementFactory.java +++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/GlobalKTableBoundElementFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,14 +27,16 @@ import org.springframework.cloud.stream.config.BindingServiceProperties; import org.springframework.util.Assert; /** - * {@link org.springframework.cloud.stream.binding.BindingTargetFactory} for {@link GlobalKTable} + * {@link org.springframework.cloud.stream.binding.BindingTargetFactory} for + * {@link GlobalKTable} * * Input bindings are only created as output bindings on GlobalKTable are not allowed. * * @author Soby Chacko * @since 2.1.0 */ -public class GlobalKTableBoundElementFactory extends AbstractBindingTargetFactory { +public class GlobalKTableBoundElementFactory + extends AbstractBindingTargetFactory { private final BindingServiceProperties bindingServiceProperties; @@ -45,12 +47,17 @@ public class GlobalKTableBoundElementFactory extends AbstractBindingTargetFactor @Override public GlobalKTable createInput(String name) { - ConsumerProperties consumerProperties = this.bindingServiceProperties.getConsumerProperties(name); - //Always set multiplex to true in the kafka streams binder + ConsumerProperties consumerProperties = this.bindingServiceProperties + .getConsumerProperties(name); + // Always set multiplex to true in the kafka streams binder consumerProperties.setMultiplex(true); + // @checkstyle:off GlobalKTableBoundElementFactory.GlobalKTableWrapperHandler wrapper = new GlobalKTableBoundElementFactory.GlobalKTableWrapperHandler(); - ProxyFactory proxyFactory = new ProxyFactory(GlobalKTableBoundElementFactory.GlobalKTableWrapper.class, GlobalKTable.class); + // @checkstyle:on + ProxyFactory proxyFactory = new ProxyFactory( + GlobalKTableBoundElementFactory.GlobalKTableWrapper.class, + GlobalKTable.class); proxyFactory.addAdvice(wrapper); return (GlobalKTable) proxyFactory.getProxy(); @@ -58,17 +65,21 @@ public class GlobalKTableBoundElementFactory extends AbstractBindingTargetFactor @Override public GlobalKTable createOutput(String name) { - throw new UnsupportedOperationException("Outbound operations are not allowed on target type GlobalKTable"); + throw new UnsupportedOperationException( + "Outbound operations are not allowed on target type GlobalKTable"); } /** * Wrapper for GlobalKTable proxy. */ public interface GlobalKTableWrapper { + void wrap(GlobalKTable delegate); + } - private static class GlobalKTableWrapperHandler implements GlobalKTableBoundElementFactory.GlobalKTableWrapper, MethodInterceptor { + private static class GlobalKTableWrapperHandler implements + GlobalKTableBoundElementFactory.GlobalKTableWrapper, MethodInterceptor { private GlobalKTable delegate; @@ -80,17 +91,25 @@ public class GlobalKTableBoundElementFactory extends AbstractBindingTargetFactor @Override public Object invoke(MethodInvocation methodInvocation) throws Throwable { - if (methodInvocation.getMethod().getDeclaringClass().equals(GlobalKTable.class)) { - Assert.notNull(this.delegate, "Trying to prepareConsumerBinding " + methodInvocation - .getMethod() + " but no delegate has been set."); - return methodInvocation.getMethod().invoke(this.delegate, methodInvocation.getArguments()); + if (methodInvocation.getMethod().getDeclaringClass() + .equals(GlobalKTable.class)) { + Assert.notNull(this.delegate, + "Trying to prepareConsumerBinding " + methodInvocation.getMethod() + + " but no delegate has been set."); + return methodInvocation.getMethod().invoke(this.delegate, + methodInvocation.getArguments()); } - else if (methodInvocation.getMethod().getDeclaringClass().equals(GlobalKTableBoundElementFactory.GlobalKTableWrapper.class)) { - return methodInvocation.getMethod().invoke(this, methodInvocation.getArguments()); + else if (methodInvocation.getMethod().getDeclaringClass() + .equals(GlobalKTableBoundElementFactory.GlobalKTableWrapper.class)) { + return methodInvocation.getMethod().invoke(this, + methodInvocation.getArguments()); } else { - throw new IllegalStateException("Only GlobalKTable method invocations are permitted"); + throw new IllegalStateException( + "Only GlobalKTable method invocations are permitted"); } } + } + } diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/InteractiveQueryService.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/InteractiveQueryService.java index 3be5d0da3..1cdd325cc 100644 --- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/InteractiveQueryService.java +++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/InteractiveQueryService.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,10 +30,10 @@ import org.springframework.cloud.stream.binder.kafka.streams.properties.KafkaStr import org.springframework.util.StringUtils; /** - * Services pertinent to the interactive query capabilities of Kafka Streams. This class provides - * services such as querying for a particular store, which instance is hosting a particular store etc. - * This is part of the public API of the kafka streams binder and the users can inject this service in their - * applications to make use of it. + * Services pertinent to the interactive query capabilities of Kafka Streams. This class + * provides services such as querying for a particular store, which instance is hosting a + * particular store etc. This is part of the public API of the kafka streams binder and + * the users can inject this service in their applications to make use of it. * * @author Soby Chacko * @author Renwei Han @@ -42,23 +42,22 @@ import org.springframework.util.StringUtils; public class InteractiveQueryService { private final KafkaStreamsRegistry kafkaStreamsRegistry; + private final KafkaStreamsBinderConfigurationProperties binderConfigurationProperties; /** * Constructor for InteractiveQueryService. - * * @param kafkaStreamsRegistry holding {@link KafkaStreamsRegistry} * @param binderConfigurationProperties kafka Streams binder configuration properties */ public InteractiveQueryService(KafkaStreamsRegistry kafkaStreamsRegistry, - KafkaStreamsBinderConfigurationProperties binderConfigurationProperties) { + KafkaStreamsBinderConfigurationProperties binderConfigurationProperties) { this.kafkaStreamsRegistry = kafkaStreamsRegistry; this.binderConfigurationProperties = binderConfigurationProperties; } /** * Retrieve and return a queryable store by name created in the application. - * * @param storeName name of the queryable store * @param storeType type of the queryable store * @param generic queryable store @@ -73,22 +72,24 @@ public class InteractiveQueryService { } } catch (InvalidStateStoreException ignored) { - //pass through + // pass through } } return null; } /** - * Gets the current {@link HostInfo} that the calling kafka streams application is running on. - * - * Note that the end user applications must provide `applicaiton.server` as a configuration property - * when calling this method. If this is not available, then null is returned. + * Gets the current {@link HostInfo} that the calling kafka streams application is + * running on. * + * Note that the end user applications must provide `applicaiton.server` as a + * configuration property when calling this method. If this is not available, then + * null is returned. * @return the current {@link HostInfo} */ public HostInfo getCurrentHostInfo() { - Map configuration = this.binderConfigurationProperties.getConfiguration(); + Map configuration = this.binderConfigurationProperties + .getConfiguration(); if (configuration.containsKey("application.server")) { String applicationServer = configuration.get("application.server"); @@ -100,27 +101,27 @@ public class InteractiveQueryService { } /** - * Gets the {@link HostInfo} where the provided store and key are hosted on. This may not be the - * current host that is running the application. Kafka Streams will look through all the consumer instances - * under the same application id and retrieves the proper host. - * - * Note that the end user applications must provide `applicaiton.server` as a configuration property - * for all the application instances when calling this method. If this is not available, then null maybe returned. + * Gets the {@link HostInfo} where the provided store and key are hosted on. This may + * not be the current host that is running the application. Kafka Streams will look + * through all the consumer instances under the same application id and retrieves the + * proper host. * + * Note that the end user applications must provide `applicaiton.server` as a + * configuration property for all the application instances when calling this method. + * If this is not available, then null maybe returned. * @param generic type for key * @param store store name * @param key key to look for * @param serializer {@link Serializer} for the key - * @return the {@link HostInfo} where the key for the provided store is hosted currently + * @return the {@link HostInfo} where the key for the provided store is hosted + * currently */ public HostInfo getHostInfo(String store, K key, Serializer serializer) { StreamsMetadata streamsMetadata = this.kafkaStreamsRegistry.getKafkaStreams() .stream() .map((k) -> Optional.ofNullable(k.metadataForKey(store, key, serializer))) - .filter(Optional::isPresent) - .map(Optional::get) - .findFirst() - .orElse(null); + .filter(Optional::isPresent).map(Optional::get).findFirst().orElse(null); return streamsMetadata != null ? streamsMetadata.hostInfo() : null; } + } diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KStreamBinder.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KStreamBinder.java index 8327045e1..8b1609119 100644 --- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KStreamBinder.java +++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KStreamBinder.java @@ -40,8 +40,8 @@ import org.springframework.cloud.stream.binder.kafka.streams.properties.KafkaStr import org.springframework.util.StringUtils; /** - * {@link org.springframework.cloud.stream.binder.Binder} implementation for {@link KStream}. - * This implemenation extends from the {@link AbstractBinder} directly. + * {@link org.springframework.cloud.stream.binder.Binder} implementation for + * {@link KStream}. This implemenation extends from the {@link AbstractBinder} directly. *

* Provides both producer and consumer bindings for the bound KStream. * @@ -49,15 +49,22 @@ import org.springframework.util.StringUtils; * @author Soby Chacko */ class KStreamBinder extends + // @checkstyle:off AbstractBinder, ExtendedConsumerProperties, ExtendedProducerProperties> - implements ExtendedPropertiesBinder, KafkaStreamsConsumerProperties, KafkaStreamsProducerProperties> { + implements + ExtendedPropertiesBinder, KafkaStreamsConsumerProperties, KafkaStreamsProducerProperties> { + + // @checkstyle:on private static final Log LOG = LogFactory.getLog(KStreamBinder.class); private final KafkaTopicProvisioner kafkaTopicProvisioner; + // @checkstyle:off private KafkaStreamsExtendedBindingProperties kafkaStreamsExtendedBindingProperties = new KafkaStreamsExtendedBindingProperties(); + // @checkstyle:on + private final KafkaStreamsBinderConfigurationProperties binderConfigurationProperties; private final KafkaStreamsMessageConversionDelegate kafkaStreamsMessageConversionDelegate; @@ -69,11 +76,11 @@ class KStreamBinder extends private final Map kafkaStreamsDlqDispatchers; KStreamBinder(KafkaStreamsBinderConfigurationProperties binderConfigurationProperties, - KafkaTopicProvisioner kafkaTopicProvisioner, - KafkaStreamsMessageConversionDelegate kafkaStreamsMessageConversionDelegate, - KafkaStreamsBindingInformationCatalogue KafkaStreamsBindingInformationCatalogue, - KeyValueSerdeResolver keyValueSerdeResolver, - Map kafkaStreamsDlqDispatchers) { + KafkaTopicProvisioner kafkaTopicProvisioner, + KafkaStreamsMessageConversionDelegate kafkaStreamsMessageConversionDelegate, + KafkaStreamsBindingInformationCatalogue KafkaStreamsBindingInformationCatalogue, + KeyValueSerdeResolver keyValueSerdeResolver, + Map kafkaStreamsDlqDispatchers) { this.binderConfigurationProperties = binderConfigurationProperties; this.kafkaTopicProvisioner = kafkaTopicProvisioner; this.kafkaStreamsMessageConversionDelegate = kafkaStreamsMessageConversionDelegate; @@ -84,57 +91,77 @@ class KStreamBinder extends @Override protected Binding> doBindConsumer(String name, String group, - KStream inputTarget, - ExtendedConsumerProperties properties) { - this.kafkaStreamsBindingInformationCatalogue.registerConsumerProperties(inputTarget, properties.getExtension()); + KStream inputTarget, + // @checkstyle:off + ExtendedConsumerProperties properties) { + // @checkstyle:on + this.kafkaStreamsBindingInformationCatalogue + .registerConsumerProperties(inputTarget, properties.getExtension()); if (!StringUtils.hasText(group)) { group = this.binderConfigurationProperties.getApplicationId(); } - KafkaStreamsBinderUtils.prepareConsumerBinding(name, group, getApplicationContext(), - this.kafkaTopicProvisioner, - this.binderConfigurationProperties, properties, this.kafkaStreamsDlqDispatchers); + KafkaStreamsBinderUtils.prepareConsumerBinding(name, group, + getApplicationContext(), this.kafkaTopicProvisioner, + this.binderConfigurationProperties, properties, + this.kafkaStreamsDlqDispatchers); return new DefaultBinding<>(name, group, inputTarget, null); } @Override @SuppressWarnings("unchecked") - protected Binding> doBindProducer(String name, KStream outboundBindTarget, - ExtendedProducerProperties properties) { + protected Binding> doBindProducer(String name, + KStream outboundBindTarget, + // @checkstyle:off + ExtendedProducerProperties properties) { + // @checkstyle:on ExtendedProducerProperties extendedProducerProperties = new ExtendedProducerProperties<>( new KafkaProducerProperties()); - this.kafkaTopicProvisioner.provisionProducerDestination(name, extendedProducerProperties); - Serde keySerde = this.keyValueSerdeResolver.getOuboundKeySerde(properties.getExtension()); - Serde valueSerde = this.keyValueSerdeResolver.getOutboundValueSerde(properties, properties.getExtension()); - to(properties.isUseNativeEncoding(), name, outboundBindTarget, (Serde) keySerde, (Serde) valueSerde); + this.kafkaTopicProvisioner.provisionProducerDestination(name, + extendedProducerProperties); + Serde keySerde = this.keyValueSerdeResolver + .getOuboundKeySerde(properties.getExtension()); + Serde valueSerde = this.keyValueSerdeResolver.getOutboundValueSerde(properties, + properties.getExtension()); + to(properties.isUseNativeEncoding(), name, outboundBindTarget, + (Serde) keySerde, (Serde) valueSerde); return new DefaultBinding<>(name, null, outboundBindTarget, null); } @SuppressWarnings("unchecked") - private void to(boolean isNativeEncoding, String name, KStream outboundBindTarget, - Serde keySerde, Serde valueSerde) { + private void to(boolean isNativeEncoding, String name, + KStream outboundBindTarget, Serde keySerde, + Serde valueSerde) { if (!isNativeEncoding) { - LOG.info("Native encoding is disabled for " + name + ". Outbound message conversion done by Spring Cloud Stream."); - this.kafkaStreamsMessageConversionDelegate.serializeOnOutbound(outboundBindTarget) + LOG.info("Native encoding is disabled for " + name + + ". Outbound message conversion done by Spring Cloud Stream."); + this.kafkaStreamsMessageConversionDelegate + .serializeOnOutbound(outboundBindTarget) .to(name, Produced.with(keySerde, valueSerde)); } else { - LOG.info("Native encoding is enabled for " + name + ". Outbound serialization done at the broker."); + LOG.info("Native encoding is enabled for " + name + + ". Outbound serialization done at the broker."); outboundBindTarget.to(name, Produced.with(keySerde, valueSerde)); } } @Override - public KafkaStreamsConsumerProperties getExtendedConsumerProperties(String channelName) { - return this.kafkaStreamsExtendedBindingProperties.getExtendedConsumerProperties(channelName); + public KafkaStreamsConsumerProperties getExtendedConsumerProperties( + String channelName) { + return this.kafkaStreamsExtendedBindingProperties + .getExtendedConsumerProperties(channelName); } @Override - public KafkaStreamsProducerProperties getExtendedProducerProperties(String channelName) { - return this.kafkaStreamsExtendedBindingProperties.getExtendedProducerProperties(channelName); + public KafkaStreamsProducerProperties getExtendedProducerProperties( + String channelName) { + return this.kafkaStreamsExtendedBindingProperties + .getExtendedProducerProperties(channelName); } - public void setKafkaStreamsExtendedBindingProperties(KafkaStreamsExtendedBindingProperties kafkaStreamsExtendedBindingProperties) { + public void setKafkaStreamsExtendedBindingProperties( + KafkaStreamsExtendedBindingProperties kafkaStreamsExtendedBindingProperties) { this.kafkaStreamsExtendedBindingProperties = kafkaStreamsExtendedBindingProperties; } @@ -145,6 +172,8 @@ class KStreamBinder extends @Override public Class getExtendedPropertiesEntryClass() { - return this.kafkaStreamsExtendedBindingProperties.getExtendedPropertiesEntryClass(); + return this.kafkaStreamsExtendedBindingProperties + .getExtendedPropertiesEntryClass(); } + } diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KStreamBinderConfiguration.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KStreamBinderConfiguration.java index 22da43c59..fdc1c24f3 100644 --- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KStreamBinderConfiguration.java +++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KStreamBinderConfiguration.java @@ -39,28 +39,32 @@ import org.springframework.context.annotation.Import; * @author Soby Chacko */ @Configuration -@Import({KafkaAutoConfiguration.class}) +@Import({ KafkaAutoConfiguration.class }) public class KStreamBinderConfiguration { - @Bean - public KafkaTopicProvisioner provisioningProvider(KafkaStreamsBinderConfigurationProperties kafkaStreamsBinderConfigurationProperties, - KafkaProperties kafkaProperties) { - return new KafkaTopicProvisioner(kafkaStreamsBinderConfigurationProperties, kafkaProperties); + public KafkaTopicProvisioner provisioningProvider( + KafkaStreamsBinderConfigurationProperties kafkaStreamsBinderConfigurationProperties, + KafkaProperties kafkaProperties) { + return new KafkaTopicProvisioner(kafkaStreamsBinderConfigurationProperties, + kafkaProperties); } @Bean - public KStreamBinder kStreamBinder(KafkaStreamsBinderConfigurationProperties binderConfigurationProperties, - KafkaTopicProvisioner kafkaTopicProvisioner, - KafkaStreamsMessageConversionDelegate KafkaStreamsMessageConversionDelegate, - KafkaStreamsBindingInformationCatalogue KafkaStreamsBindingInformationCatalogue, - KeyValueSerdeResolver keyValueSerdeResolver, - KafkaStreamsExtendedBindingProperties kafkaStreamsExtendedBindingProperties, - @Qualifier("kafkaStreamsDlqDispatchers") Map kafkaStreamsDlqDispatchers) { - KStreamBinder kStreamBinder = new KStreamBinder(binderConfigurationProperties, kafkaTopicProvisioner, - KafkaStreamsMessageConversionDelegate, KafkaStreamsBindingInformationCatalogue, - keyValueSerdeResolver, kafkaStreamsDlqDispatchers); - kStreamBinder.setKafkaStreamsExtendedBindingProperties(kafkaStreamsExtendedBindingProperties); + public KStreamBinder kStreamBinder( + KafkaStreamsBinderConfigurationProperties binderConfigurationProperties, + KafkaTopicProvisioner kafkaTopicProvisioner, + KafkaStreamsMessageConversionDelegate KafkaStreamsMessageConversionDelegate, + KafkaStreamsBindingInformationCatalogue KafkaStreamsBindingInformationCatalogue, + KeyValueSerdeResolver keyValueSerdeResolver, + KafkaStreamsExtendedBindingProperties kafkaStreamsExtendedBindingProperties, + @Qualifier("kafkaStreamsDlqDispatchers") Map kafkaStreamsDlqDispatchers) { + KStreamBinder kStreamBinder = new KStreamBinder(binderConfigurationProperties, + kafkaTopicProvisioner, KafkaStreamsMessageConversionDelegate, + KafkaStreamsBindingInformationCatalogue, keyValueSerdeResolver, + kafkaStreamsDlqDispatchers); + kStreamBinder.setKafkaStreamsExtendedBindingProperties( + kafkaStreamsExtendedBindingProperties); return kStreamBinder; } @@ -69,19 +73,26 @@ public class KStreamBinderConfiguration { public static BeanFactoryPostProcessor outerContextBeanFactoryPostProcessor() { return beanFactory -> { - // It is safe to call getBean("outerContext") here, because this bean is registered as first + // It is safe to call getBean("outerContext") here, because this bean is + // registered as first // and as independent from the parent context. - ApplicationContext outerContext = (ApplicationContext) beanFactory.getBean("outerContext"); - beanFactory.registerSingleton(KafkaStreamsBinderConfigurationProperties.class.getSimpleName(), outerContext - .getBean(KafkaStreamsBinderConfigurationProperties.class)); - beanFactory.registerSingleton(KafkaStreamsMessageConversionDelegate.class.getSimpleName(), outerContext - .getBean(KafkaStreamsMessageConversionDelegate.class)); - beanFactory.registerSingleton(KafkaStreamsBindingInformationCatalogue.class.getSimpleName(), outerContext - .getBean(KafkaStreamsBindingInformationCatalogue.class)); - beanFactory.registerSingleton(KeyValueSerdeResolver.class.getSimpleName(), outerContext - .getBean(KeyValueSerdeResolver.class)); - beanFactory.registerSingleton(KafkaStreamsExtendedBindingProperties.class.getSimpleName(), outerContext - .getBean(KafkaStreamsExtendedBindingProperties.class)); + ApplicationContext outerContext = (ApplicationContext) beanFactory + .getBean("outerContext"); + beanFactory.registerSingleton( + KafkaStreamsBinderConfigurationProperties.class.getSimpleName(), + outerContext + .getBean(KafkaStreamsBinderConfigurationProperties.class)); + beanFactory.registerSingleton( + KafkaStreamsMessageConversionDelegate.class.getSimpleName(), + outerContext.getBean(KafkaStreamsMessageConversionDelegate.class)); + beanFactory.registerSingleton( + KafkaStreamsBindingInformationCatalogue.class.getSimpleName(), + outerContext.getBean(KafkaStreamsBindingInformationCatalogue.class)); + beanFactory.registerSingleton(KeyValueSerdeResolver.class.getSimpleName(), + outerContext.getBean(KeyValueSerdeResolver.class)); + beanFactory.registerSingleton( + KafkaStreamsExtendedBindingProperties.class.getSimpleName(), + outerContext.getBean(KafkaStreamsExtendedBindingProperties.class)); }; } diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KStreamBoundElementFactory.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KStreamBoundElementFactory.java index 18cfa740c..14b8afccf 100644 --- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KStreamBoundElementFactory.java +++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KStreamBoundElementFactory.java @@ -28,10 +28,11 @@ import org.springframework.cloud.stream.config.BindingServiceProperties; import org.springframework.util.Assert; /** - * {@link org.springframework.cloud.stream.binding.BindingTargetFactory} for{@link KStream}. + * {@link org.springframework.cloud.stream.binding.BindingTargetFactory} + * for{@link KStream}. * - * The implementation creates proxies for both input and output binding. - * The actual target will be created downstream through further binding process. + * The implementation creates proxies for both input and output binding. The actual target + * will be created downstream through further binding process. * * @author Marius Bogoevici * @author Soby Chacko @@ -43,7 +44,7 @@ class KStreamBoundElementFactory extends AbstractBindingTargetFactory { private final KafkaStreamsBindingInformationCatalogue kafkaStreamsBindingInformationCatalogue; KStreamBoundElementFactory(BindingServiceProperties bindingServiceProperties, - KafkaStreamsBindingInformationCatalogue KafkaStreamsBindingInformationCatalogue) { + KafkaStreamsBindingInformationCatalogue KafkaStreamsBindingInformationCatalogue) { super(KStream.class); this.bindingServiceProperties = bindingServiceProperties; this.kafkaStreamsBindingInformationCatalogue = KafkaStreamsBindingInformationCatalogue; @@ -51,8 +52,9 @@ class KStreamBoundElementFactory extends AbstractBindingTargetFactory { @Override public KStream createInput(String name) { - ConsumerProperties consumerProperties = this.bindingServiceProperties.getConsumerProperties(name); - //Always set multiplex to true in the kafka streams binder + ConsumerProperties consumerProperties = this.bindingServiceProperties + .getConsumerProperties(name); + // Always set multiplex to true in the kafka streams binder consumerProperties.setMultiplex(true); return createProxyForKStream(name); } @@ -70,9 +72,12 @@ class KStreamBoundElementFactory extends AbstractBindingTargetFactory { KStream proxy = (KStream) proxyFactory.getProxy(); - //Add the binding properties to the catalogue for later retrieval during further binding steps downstream. - BindingProperties bindingProperties = this.bindingServiceProperties.getBindingProperties(name); - this.kafkaStreamsBindingInformationCatalogue.registerBindingProperties(proxy, bindingProperties); + // Add the binding properties to the catalogue for later retrieval during further + // binding steps downstream. + BindingProperties bindingProperties = this.bindingServiceProperties + .getBindingProperties(name); + this.kafkaStreamsBindingInformationCatalogue.registerBindingProperties(proxy, + bindingProperties); return proxy; } @@ -85,7 +90,8 @@ class KStreamBoundElementFactory extends AbstractBindingTargetFactory { } - private static class KStreamWrapperHandler implements KStreamWrapper, MethodInterceptor { + private static class KStreamWrapperHandler + implements KStreamWrapper, MethodInterceptor { private KStream delegate; @@ -98,16 +104,23 @@ class KStreamBoundElementFactory extends AbstractBindingTargetFactory { @Override public Object invoke(MethodInvocation methodInvocation) throws Throwable { if (methodInvocation.getMethod().getDeclaringClass().equals(KStream.class)) { - Assert.notNull(this.delegate, "Trying to prepareConsumerBinding " + methodInvocation - .getMethod() + " but no delegate has been set."); - return methodInvocation.getMethod().invoke(this.delegate, methodInvocation.getArguments()); + Assert.notNull(this.delegate, + "Trying to prepareConsumerBinding " + methodInvocation.getMethod() + + " but no delegate has been set."); + return methodInvocation.getMethod().invoke(this.delegate, + methodInvocation.getArguments()); } - else if (methodInvocation.getMethod().getDeclaringClass().equals(KStreamWrapper.class)) { - return methodInvocation.getMethod().invoke(this, methodInvocation.getArguments()); + else if (methodInvocation.getMethod().getDeclaringClass() + .equals(KStreamWrapper.class)) { + return methodInvocation.getMethod().invoke(this, + methodInvocation.getArguments()); } else { - throw new IllegalStateException("Only KStream method invocations are permitted"); + throw new IllegalStateException( + "Only KStream method invocations are permitted"); } } + } + } diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KStreamStreamListenerParameterAdapter.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KStreamStreamListenerParameterAdapter.java index 3ba721c19..5d93c8197 100644 --- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KStreamStreamListenerParameterAdapter.java +++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KStreamStreamListenerParameterAdapter.java @@ -28,13 +28,16 @@ import org.springframework.core.ResolvableType; * @author Marius Bogoevici * @author Soby Chacko */ -class KStreamStreamListenerParameterAdapter implements StreamListenerParameterAdapter, KStream> { +class KStreamStreamListenerParameterAdapter + implements StreamListenerParameterAdapter, KStream> { private final KafkaStreamsMessageConversionDelegate kafkaStreamsMessageConversionDelegate; + private final KafkaStreamsBindingInformationCatalogue KafkaStreamsBindingInformationCatalogue; - KStreamStreamListenerParameterAdapter(KafkaStreamsMessageConversionDelegate kafkaStreamsMessageConversionDelegate, - KafkaStreamsBindingInformationCatalogue KafkaStreamsBindingInformationCatalogue) { + KStreamStreamListenerParameterAdapter( + KafkaStreamsMessageConversionDelegate kafkaStreamsMessageConversionDelegate, + KafkaStreamsBindingInformationCatalogue KafkaStreamsBindingInformationCatalogue) { this.kafkaStreamsMessageConversionDelegate = kafkaStreamsMessageConversionDelegate; this.KafkaStreamsBindingInformationCatalogue = KafkaStreamsBindingInformationCatalogue; } @@ -51,11 +54,14 @@ class KStreamStreamListenerParameterAdapter implements StreamListenerParameterAd ResolvableType resolvableType = ResolvableType.forMethodParameter(parameter); final Class valueClass = (resolvableType.getGeneric(1).getRawClass() != null) ? (resolvableType.getGeneric(1).getRawClass()) : Object.class; - if (this.KafkaStreamsBindingInformationCatalogue.isUseNativeDecoding(bindingTarget)) { + if (this.KafkaStreamsBindingInformationCatalogue + .isUseNativeDecoding(bindingTarget)) { return bindingTarget; } else { - return this.kafkaStreamsMessageConversionDelegate.deserializeOnInbound(valueClass, bindingTarget); + return this.kafkaStreamsMessageConversionDelegate + .deserializeOnInbound(valueClass, bindingTarget); } } + } diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KStreamStreamListenerResultAdapter.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KStreamStreamListenerResultAdapter.java index 1fdb98949..78d32a33f 100644 --- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KStreamStreamListenerResultAdapter.java +++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KStreamStreamListenerResultAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 the original author or authors. + * Copyright 2017-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,16 +29,19 @@ import org.springframework.cloud.stream.binding.StreamListenerResultAdapter; * @author Marius Bogoevici * @author Soby Chacko */ -class KStreamStreamListenerResultAdapter implements StreamListenerResultAdapter { +class KStreamStreamListenerResultAdapter implements + StreamListenerResultAdapter { @Override public boolean supports(Class resultType, Class boundElement) { - return KStream.class.isAssignableFrom(resultType) && KStream.class.isAssignableFrom(boundElement); + return KStream.class.isAssignableFrom(resultType) + && KStream.class.isAssignableFrom(boundElement); } @Override @SuppressWarnings("unchecked") - public Closeable adapt(KStream streamListenerResult, KStreamBoundElementFactory.KStreamWrapper boundElement) { + public Closeable adapt(KStream streamListenerResult, + KStreamBoundElementFactory.KStreamWrapper boundElement) { boundElement.wrap(streamListenerResult); return new NoOpCloseable(); } @@ -51,4 +54,5 @@ class KStreamStreamListenerResultAdapter implements StreamListenerResultAdapter< } } + } diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KTableBinder.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KTableBinder.java index 35a2b47b1..b2ef06c97 100644 --- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KTableBinder.java +++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KTableBinder.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,16 +35,21 @@ import org.springframework.cloud.stream.binder.kafka.streams.properties.KafkaStr import org.springframework.util.StringUtils; /** - * {@link org.springframework.cloud.stream.binder.Binder} implementation for {@link KTable}. - * This implemenation extends from the {@link AbstractBinder} directly. + * {@link org.springframework.cloud.stream.binder.Binder} implementation for + * {@link KTable}. This implemenation extends from the {@link AbstractBinder} directly. * - * Provides only consumer binding for the bound KTable as output bindings are not allowed on it. + * Provides only consumer binding for the bound KTable as output bindings are not allowed + * on it. * * @author Soby Chacko */ class KTableBinder extends + // @checkstyle:off AbstractBinder, ExtendedConsumerProperties, ExtendedProducerProperties> - implements ExtendedPropertiesBinder, KafkaStreamsConsumerProperties, KafkaStreamsProducerProperties> { + implements + ExtendedPropertiesBinder, KafkaStreamsConsumerProperties, KafkaStreamsProducerProperties> { + + // @checkstyle:on private final KafkaStreamsBinderConfigurationProperties binderConfigurationProperties; @@ -52,10 +57,14 @@ class KTableBinder extends private Map kafkaStreamsDlqDispatchers; + // @checkstyle:off private KafkaStreamsExtendedBindingProperties kafkaStreamsExtendedBindingProperties = new KafkaStreamsExtendedBindingProperties(); - KTableBinder(KafkaStreamsBinderConfigurationProperties binderConfigurationProperties, KafkaTopicProvisioner kafkaTopicProvisioner, - Map kafkaStreamsDlqDispatchers) { + // @checkstyle:on + + KTableBinder(KafkaStreamsBinderConfigurationProperties binderConfigurationProperties, + KafkaTopicProvisioner kafkaTopicProvisioner, + Map kafkaStreamsDlqDispatchers) { this.binderConfigurationProperties = binderConfigurationProperties; this.kafkaTopicProvisioner = kafkaTopicProvisioner; this.kafkaStreamsDlqDispatchers = kafkaStreamsDlqDispatchers; @@ -63,31 +72,43 @@ class KTableBinder extends @Override @SuppressWarnings("unchecked") - protected Binding> doBindConsumer(String name, String group, KTable inputTarget, - ExtendedConsumerProperties properties) { + protected Binding> doBindConsumer(String name, String group, + KTable inputTarget, + // @checkstyle:off + ExtendedConsumerProperties properties) { + // @checkstyle:on if (!StringUtils.hasText(group)) { group = this.binderConfigurationProperties.getApplicationId(); } - KafkaStreamsBinderUtils.prepareConsumerBinding(name, group, getApplicationContext(), - this.kafkaTopicProvisioner, - this.binderConfigurationProperties, properties, this.kafkaStreamsDlqDispatchers); + KafkaStreamsBinderUtils.prepareConsumerBinding(name, group, + getApplicationContext(), this.kafkaTopicProvisioner, + this.binderConfigurationProperties, properties, + this.kafkaStreamsDlqDispatchers); return new DefaultBinding<>(name, group, inputTarget, null); } @Override - protected Binding> doBindProducer(String name, KTable outboundBindTarget, - ExtendedProducerProperties properties) { - throw new UnsupportedOperationException("No producer level binding is allowed for KTable"); + protected Binding> doBindProducer(String name, + KTable outboundBindTarget, + // @checkstyle:off + ExtendedProducerProperties properties) { + // @checkstyle:on + throw new UnsupportedOperationException( + "No producer level binding is allowed for KTable"); } @Override - public KafkaStreamsConsumerProperties getExtendedConsumerProperties(String channelName) { - return this.kafkaStreamsExtendedBindingProperties.getExtendedConsumerProperties(channelName); + public KafkaStreamsConsumerProperties getExtendedConsumerProperties( + String channelName) { + return this.kafkaStreamsExtendedBindingProperties + .getExtendedConsumerProperties(channelName); } @Override - public KafkaStreamsProducerProperties getExtendedProducerProperties(String channelName) { - return this.kafkaStreamsExtendedBindingProperties.getExtendedProducerProperties(channelName); + public KafkaStreamsProducerProperties getExtendedProducerProperties( + String channelName) { + return this.kafkaStreamsExtendedBindingProperties + .getExtendedProducerProperties(channelName); } @Override @@ -97,6 +118,8 @@ class KTableBinder extends @Override public Class getExtendedPropertiesEntryClass() { - return this.kafkaStreamsExtendedBindingProperties.getExtendedPropertiesEntryClass(); + return this.kafkaStreamsExtendedBindingProperties + .getExtendedPropertiesEntryClass(); } + } diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KTableBinderConfiguration.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KTableBinderConfiguration.java index effd90cbc..b09f284ee 100644 --- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KTableBinderConfiguration.java +++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KTableBinderConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,27 +42,36 @@ public class KTableBinderConfiguration { @ConditionalOnBean(name = "outerContext") public static BeanFactoryPostProcessor outerContextBeanFactoryPostProcessor() { return (beanFactory) -> { - // It is safe to call getBean("outerContext") here, because this bean is registered as first + // It is safe to call getBean("outerContext") here, because this bean is + // registered as first // and as independent from the parent context. - ApplicationContext outerContext = (ApplicationContext) beanFactory.getBean("outerContext"); - beanFactory.registerSingleton(KafkaStreamsBinderConfigurationProperties.class.getSimpleName(), outerContext - .getBean(KafkaStreamsBinderConfigurationProperties.class)); - beanFactory.registerSingleton(KafkaStreamsBindingInformationCatalogue.class.getSimpleName(), outerContext - .getBean(KafkaStreamsBindingInformationCatalogue.class)); + ApplicationContext outerContext = (ApplicationContext) beanFactory + .getBean("outerContext"); + beanFactory.registerSingleton( + KafkaStreamsBinderConfigurationProperties.class.getSimpleName(), + outerContext + .getBean(KafkaStreamsBinderConfigurationProperties.class)); + beanFactory.registerSingleton( + KafkaStreamsBindingInformationCatalogue.class.getSimpleName(), + outerContext.getBean(KafkaStreamsBindingInformationCatalogue.class)); }; } @Bean - public KafkaTopicProvisioner provisioningProvider(KafkaBinderConfigurationProperties binderConfigurationProperties, - KafkaProperties kafkaProperties) { + public KafkaTopicProvisioner provisioningProvider( + KafkaBinderConfigurationProperties binderConfigurationProperties, + KafkaProperties kafkaProperties) { return new KafkaTopicProvisioner(binderConfigurationProperties, kafkaProperties); } @Bean - public KTableBinder kTableBinder(KafkaStreamsBinderConfigurationProperties binderConfigurationProperties, - KafkaTopicProvisioner kafkaTopicProvisioner, - @Qualifier("kafkaStreamsDlqDispatchers") Map kafkaStreamsDlqDispatchers) { - KTableBinder kStreamBinder = new KTableBinder(binderConfigurationProperties, kafkaTopicProvisioner, kafkaStreamsDlqDispatchers); + public KTableBinder kTableBinder( + KafkaStreamsBinderConfigurationProperties binderConfigurationProperties, + KafkaTopicProvisioner kafkaTopicProvisioner, + @Qualifier("kafkaStreamsDlqDispatchers") Map kafkaStreamsDlqDispatchers) { + KTableBinder kStreamBinder = new KTableBinder(binderConfigurationProperties, + kafkaTopicProvisioner, kafkaStreamsDlqDispatchers); return kStreamBinder; } + } diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KTableBoundElementFactory.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KTableBoundElementFactory.java index aa917021f..611294a24 100644 --- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KTableBoundElementFactory.java +++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KTableBoundElementFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,8 @@ import org.springframework.cloud.stream.config.BindingServiceProperties; import org.springframework.util.Assert; /** - * {@link org.springframework.cloud.stream.binding.BindingTargetFactory} for {@link KTable} + * {@link org.springframework.cloud.stream.binding.BindingTargetFactory} for + * {@link KTable} * * Input bindings are only created as output bindings on KTable are not allowed. * @@ -44,12 +45,14 @@ class KTableBoundElementFactory extends AbstractBindingTargetFactory { @Override public KTable createInput(String name) { - ConsumerProperties consumerProperties = this.bindingServiceProperties.getConsumerProperties(name); - //Always set multiplex to true in the kafka streams binder + ConsumerProperties consumerProperties = this.bindingServiceProperties + .getConsumerProperties(name); + // Always set multiplex to true in the kafka streams binder consumerProperties.setMultiplex(true); KTableBoundElementFactory.KTableWrapperHandler wrapper = new KTableBoundElementFactory.KTableWrapperHandler(); - ProxyFactory proxyFactory = new ProxyFactory(KTableBoundElementFactory.KTableWrapper.class, KTable.class); + ProxyFactory proxyFactory = new ProxyFactory( + KTableBoundElementFactory.KTableWrapper.class, KTable.class); proxyFactory.addAdvice(wrapper); return (KTable) proxyFactory.getProxy(); @@ -58,17 +61,21 @@ class KTableBoundElementFactory extends AbstractBindingTargetFactory { @Override @SuppressWarnings("unchecked") public KTable createOutput(final String name) { - throw new UnsupportedOperationException("Outbound operations are not allowed on target type KTable"); + throw new UnsupportedOperationException( + "Outbound operations are not allowed on target type KTable"); } /** * Wrapper for KTable proxy. */ public interface KTableWrapper { + void wrap(KTable delegate); + } - private static class KTableWrapperHandler implements KTableBoundElementFactory.KTableWrapper, MethodInterceptor { + private static class KTableWrapperHandler + implements KTableBoundElementFactory.KTableWrapper, MethodInterceptor { private KTable delegate; @@ -81,16 +88,23 @@ class KTableBoundElementFactory extends AbstractBindingTargetFactory { @Override public Object invoke(MethodInvocation methodInvocation) throws Throwable { if (methodInvocation.getMethod().getDeclaringClass().equals(KTable.class)) { - Assert.notNull(this.delegate, "Trying to prepareConsumerBinding " + methodInvocation - .getMethod() + " but no delegate has been set."); - return methodInvocation.getMethod().invoke(this.delegate, methodInvocation.getArguments()); + Assert.notNull(this.delegate, + "Trying to prepareConsumerBinding " + methodInvocation.getMethod() + + " but no delegate has been set."); + return methodInvocation.getMethod().invoke(this.delegate, + methodInvocation.getArguments()); } - else if (methodInvocation.getMethod().getDeclaringClass().equals(KTableBoundElementFactory.KTableWrapper.class)) { - return methodInvocation.getMethod().invoke(this, methodInvocation.getArguments()); + else if (methodInvocation.getMethod().getDeclaringClass() + .equals(KTableBoundElementFactory.KTableWrapper.class)) { + return methodInvocation.getMethod().invoke(this, + methodInvocation.getArguments()); } else { - throw new IllegalStateException("Only KTable method invocations are permitted"); + throw new IllegalStateException( + "Only KTable method invocations are permitted"); } } + } + } diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsApplicationSupportAutoConfiguration.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsApplicationSupportAutoConfiguration.java index 7d681a8da..ec07ce051 100644 --- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsApplicationSupportAutoConfiguration.java +++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsApplicationSupportAutoConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 the original author or authors. + * Copyright 2017-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,9 +35,12 @@ public class KafkaStreamsApplicationSupportAutoConfiguration { @Bean @ConditionalOnProperty("spring.cloud.stream.kafka.streams.timeWindow.length") - public TimeWindows configuredTimeWindow(KafkaStreamsApplicationSupportProperties processorProperties) { + public TimeWindows configuredTimeWindow( + KafkaStreamsApplicationSupportProperties processorProperties) { return processorProperties.getTimeWindow().getAdvanceBy() > 0 - ? TimeWindows.of(processorProperties.getTimeWindow().getLength()).advanceBy(processorProperties.getTimeWindow().getAdvanceBy()) + ? TimeWindows.of(processorProperties.getTimeWindow().getLength()) + .advanceBy(processorProperties.getTimeWindow().getAdvanceBy()) : TimeWindows.of(processorProperties.getTimeWindow().getLength()); } + } diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsBinderSupportAutoConfiguration.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsBinderSupportAutoConfiguration.java index 49651ee34..968fc9e87 100644 --- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsBinderSupportAutoConfiguration.java +++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsBinderSupportAutoConfiguration.java @@ -66,50 +66,61 @@ import org.springframework.util.StringUtils; public class KafkaStreamsBinderSupportAutoConfiguration { private static final String KSTREAM_BINDER_TYPE = "kstream"; + private static final String KTABLE_BINDER_TYPE = "ktable"; + private static final String GLOBALKTABLE_BINDER_TYPE = "globalktable"; @Bean @ConfigurationProperties(prefix = "spring.cloud.stream.kafka.streams.binder") - public KafkaStreamsBinderConfigurationProperties binderConfigurationProperties(KafkaProperties kafkaProperties, - ConfigurableEnvironment environment, - BindingServiceProperties bindingServiceProperties) { - final Map binderConfigurations = getBinderConfigurations(bindingServiceProperties); - for (Map.Entry entry : binderConfigurations.entrySet()) { + public KafkaStreamsBinderConfigurationProperties binderConfigurationProperties( + KafkaProperties kafkaProperties, ConfigurableEnvironment environment, + BindingServiceProperties properties) { + final Map binderConfigurations = getBinderConfigurations( + properties); + for (Map.Entry entry : binderConfigurations + .entrySet()) { final BinderConfiguration binderConfiguration = entry.getValue(); final String binderType = binderConfiguration.getBinderType(); - if (binderType != null && (binderType.equals(KSTREAM_BINDER_TYPE) || - binderType.equals(KTABLE_BINDER_TYPE) || - binderType.equals(GLOBALKTABLE_BINDER_TYPE))) { + if (binderType != null && (binderType.equals(KSTREAM_BINDER_TYPE) + || binderType.equals(KTABLE_BINDER_TYPE) + || binderType.equals(GLOBALKTABLE_BINDER_TYPE))) { Map binderProperties = new HashMap<>(); this.flatten(null, binderConfiguration.getProperties(), binderProperties); - environment.getPropertySources().addFirst(new MapPropertySource("kafkaStreamsBinderEnv", binderProperties)); + environment.getPropertySources().addFirst( + new MapPropertySource("kafkaStreamsBinderEnv", binderProperties)); } } return new KafkaStreamsBinderConfigurationProperties(kafkaProperties); } - //TODO: Lifted from core - good candidate for exposing as a utility method in core. - private static Map getBinderConfigurations(BindingServiceProperties bindingServiceProperties) { + // TODO: Lifted from core - good candidate for exposing as a utility method in core. + private static Map getBinderConfigurations( + BindingServiceProperties properties) { Map binderConfigurations = new HashMap<>(); - Map declaredBinders = bindingServiceProperties.getBinders(); + Map declaredBinders = properties.getBinders(); - for (Map.Entry binderEntry : declaredBinders.entrySet()) { + for (Map.Entry binderEntry : declaredBinders + .entrySet()) { BinderProperties binderProperties = binderEntry.getValue(); binderConfigurations.put(binderEntry.getKey(), - new BinderConfiguration(binderProperties.getType(), binderProperties.getEnvironment(), - binderProperties.isInheritEnvironment(), binderProperties.isDefaultCandidate())); + new BinderConfiguration(binderProperties.getType(), + binderProperties.getEnvironment(), + binderProperties.isInheritEnvironment(), + binderProperties.isDefaultCandidate())); } return binderConfigurations; } - //TODO: Lifted from core - good candidate for exposing as a utility method in core. + // TODO: Lifted from core - good candidate for exposing as a utility method in core. @SuppressWarnings("unchecked") - private void flatten(String propertyName, Object value, Map flattenedProperties) { + private void flatten(String propertyName, Object value, + Map flattenedProperties) { if (value instanceof Map) { - ((Map) value) - .forEach((k, v) -> flatten((propertyName != null ? propertyName + "." : "") + k, v, flattenedProperties)); + ((Map) value).forEach((k, v) -> flatten( + (propertyName != null ? propertyName + "." : "") + k, v, + flattenedProperties)); } else { flattenedProperties.put(propertyName, value.toString()); @@ -117,64 +128,79 @@ public class KafkaStreamsBinderSupportAutoConfiguration { } @Bean - public KafkaStreamsConfiguration kafkaStreamsConfiguration(KafkaStreamsBinderConfigurationProperties binderConfigurationProperties, - Environment environment) { - KafkaProperties kafkaProperties = binderConfigurationProperties.getKafkaProperties(); + public KafkaStreamsConfiguration kafkaStreamsConfiguration( + KafkaStreamsBinderConfigurationProperties properties, + Environment environment) { + KafkaProperties kafkaProperties = properties.getKafkaProperties(); Map streamsProperties = kafkaProperties.buildStreamsProperties(); if (kafkaProperties.getStreams().getApplicationId() == null) { String applicationName = environment.getProperty("spring.application.name"); if (applicationName != null) { - streamsProperties.put(StreamsConfig.APPLICATION_ID_CONFIG, applicationName); + streamsProperties.put(StreamsConfig.APPLICATION_ID_CONFIG, + applicationName); } } return new KafkaStreamsConfiguration(streamsProperties); } @Bean("streamConfigGlobalProperties") - public Map streamConfigGlobalProperties(KafkaStreamsBinderConfigurationProperties binderConfigurationProperties, - KafkaStreamsConfiguration kafkaStreamsConfiguration) { + public Map streamConfigGlobalProperties( + KafkaStreamsBinderConfigurationProperties configProperties, + KafkaStreamsConfiguration kafkaStreamsConfiguration) { Properties properties = kafkaStreamsConfiguration.asProperties(); // Override Spring Boot bootstrap server setting if left to default with the value // configured in the binder if (ObjectUtils.isEmpty(properties.get(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG))) { - properties.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, binderConfigurationProperties.getKafkaConnectionString()); + properties.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, + configProperties.getKafkaConnectionString()); } else { - Object bootstrapServerConfig = properties.get(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG); + Object bootstrapServerConfig = properties + .get(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG); if (bootstrapServerConfig instanceof String) { @SuppressWarnings("unchecked") String bootStrapServers = (String) properties .get(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG); if (bootStrapServers.equals("localhost:9092")) { - properties.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, binderConfigurationProperties.getKafkaConnectionString()); + properties.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, + configProperties.getKafkaConnectionString()); } } } - String binderProvidedApplicationId = binderConfigurationProperties.getApplicationId(); + String binderProvidedApplicationId = configProperties.getApplicationId(); if (StringUtils.hasText(binderProvidedApplicationId)) { - properties.put(StreamsConfig.APPLICATION_ID_CONFIG, binderProvidedApplicationId); + properties.put(StreamsConfig.APPLICATION_ID_CONFIG, + binderProvidedApplicationId); } - properties.put(StreamsConfig.DEFAULT_KEY_SERDE_CLASS_CONFIG, Serdes.ByteArraySerde.class.getName()); - properties.put(StreamsConfig.DEFAULT_VALUE_SERDE_CLASS_CONFIG, Serdes.ByteArraySerde.class.getName()); + properties.put(StreamsConfig.DEFAULT_KEY_SERDE_CLASS_CONFIG, + Serdes.ByteArraySerde.class.getName()); + properties.put(StreamsConfig.DEFAULT_VALUE_SERDE_CLASS_CONFIG, + Serdes.ByteArraySerde.class.getName()); - if (binderConfigurationProperties.getSerdeError() == KafkaStreamsBinderConfigurationProperties.SerdeError.logAndContinue) { - properties.put(StreamsConfig.DEFAULT_DESERIALIZATION_EXCEPTION_HANDLER_CLASS_CONFIG, + if (configProperties + .getSerdeError() == KafkaStreamsBinderConfigurationProperties.SerdeError.logAndContinue) { + properties.put( + StreamsConfig.DEFAULT_DESERIALIZATION_EXCEPTION_HANDLER_CLASS_CONFIG, LogAndContinueExceptionHandler.class.getName()); } - else if (binderConfigurationProperties.getSerdeError() == KafkaStreamsBinderConfigurationProperties.SerdeError.logAndFail) { - properties.put(StreamsConfig.DEFAULT_DESERIALIZATION_EXCEPTION_HANDLER_CLASS_CONFIG, + else if (configProperties + .getSerdeError() == KafkaStreamsBinderConfigurationProperties.SerdeError.logAndFail) { + properties.put( + StreamsConfig.DEFAULT_DESERIALIZATION_EXCEPTION_HANDLER_CLASS_CONFIG, LogAndFailExceptionHandler.class.getName()); } - else if (binderConfigurationProperties.getSerdeError() == KafkaStreamsBinderConfigurationProperties.SerdeError.sendToDlq) { - properties.put(StreamsConfig.DEFAULT_DESERIALIZATION_EXCEPTION_HANDLER_CLASS_CONFIG, + else if (configProperties + .getSerdeError() == KafkaStreamsBinderConfigurationProperties.SerdeError.sendToDlq) { + properties.put( + StreamsConfig.DEFAULT_DESERIALIZATION_EXCEPTION_HANDLER_CLASS_CONFIG, SendToDlqAndContinue.class.getName()); } - if (!ObjectUtils.isEmpty(binderConfigurationProperties.getConfiguration())) { - properties.putAll(binderConfigurationProperties.getConfiguration()); + if (!ObjectUtils.isEmpty(configProperties.getConfiguration())) { + properties.putAll(configProperties.getConfiguration()); } return properties.entrySet().stream().collect( Collectors.toMap((e) -> String.valueOf(e.getKey()), Map.Entry::getValue)); @@ -187,8 +213,11 @@ public class KafkaStreamsBinderSupportAutoConfiguration { @Bean public KStreamStreamListenerParameterAdapter kstreamStreamListenerParameterAdapter( - KafkaStreamsMessageConversionDelegate kstreamBoundMessageConversionDelegate, KafkaStreamsBindingInformationCatalogue KafkaStreamsBindingInformationCatalogue) { - return new KStreamStreamListenerParameterAdapter(kstreamBoundMessageConversionDelegate, KafkaStreamsBindingInformationCatalogue); + KafkaStreamsMessageConversionDelegate kstreamBoundMessageConversionDelegate, + KafkaStreamsBindingInformationCatalogue KafkaStreamsBindingInformationCatalogue) { + return new KStreamStreamListenerParameterAdapter( + kstreamBoundMessageConversionDelegate, + KafkaStreamsBindingInformationCatalogue); } @Bean @@ -200,41 +229,48 @@ public class KafkaStreamsBinderSupportAutoConfiguration { KStreamStreamListenerParameterAdapter kafkaStreamListenerParameterAdapter, Collection streamListenerResultAdapters, ObjectProvider cleanupConfig) { - return new KafkaStreamsStreamListenerSetupMethodOrchestrator(bindingServiceProperties, - kafkaStreamsExtendedBindingProperties, keyValueSerdeResolver, kafkaStreamsBindingInformationCatalogue, + return new KafkaStreamsStreamListenerSetupMethodOrchestrator( + bindingServiceProperties, kafkaStreamsExtendedBindingProperties, + keyValueSerdeResolver, kafkaStreamsBindingInformationCatalogue, kafkaStreamListenerParameterAdapter, streamListenerResultAdapters, cleanupConfig.getIfUnique()); } @Bean - public KafkaStreamsMessageConversionDelegate messageConversionDelegate(CompositeMessageConverterFactory compositeMessageConverterFactory, - SendToDlqAndContinue sendToDlqAndContinue, - KafkaStreamsBindingInformationCatalogue KafkaStreamsBindingInformationCatalogue, - KafkaStreamsBinderConfigurationProperties binderConfigurationProperties) { - return new KafkaStreamsMessageConversionDelegate(compositeMessageConverterFactory, sendToDlqAndContinue, - KafkaStreamsBindingInformationCatalogue, binderConfigurationProperties); + public KafkaStreamsMessageConversionDelegate messageConversionDelegate( + CompositeMessageConverterFactory compositeMessageConverterFactory, + SendToDlqAndContinue sendToDlqAndContinue, + KafkaStreamsBindingInformationCatalogue KafkaStreamsBindingInformationCatalogue, + KafkaStreamsBinderConfigurationProperties binderConfigurationProperties) { + return new KafkaStreamsMessageConversionDelegate(compositeMessageConverterFactory, + sendToDlqAndContinue, KafkaStreamsBindingInformationCatalogue, + binderConfigurationProperties); } @Bean - public CompositeNonNativeSerde compositeNonNativeSerde(CompositeMessageConverterFactory compositeMessageConverterFactory) { + public CompositeNonNativeSerde compositeNonNativeSerde( + CompositeMessageConverterFactory compositeMessageConverterFactory) { return new CompositeNonNativeSerde(compositeMessageConverterFactory); } @Bean - public KStreamBoundElementFactory kStreamBoundElementFactory(BindingServiceProperties bindingServiceProperties, - KafkaStreamsBindingInformationCatalogue KafkaStreamsBindingInformationCatalogue) { + public KStreamBoundElementFactory kStreamBoundElementFactory( + BindingServiceProperties bindingServiceProperties, + KafkaStreamsBindingInformationCatalogue KafkaStreamsBindingInformationCatalogue) { return new KStreamBoundElementFactory(bindingServiceProperties, KafkaStreamsBindingInformationCatalogue); } @Bean - public KTableBoundElementFactory kTableBoundElementFactory(BindingServiceProperties bindingServiceProperties) { + public KTableBoundElementFactory kTableBoundElementFactory( + BindingServiceProperties bindingServiceProperties) { return new KTableBoundElementFactory(bindingServiceProperties); } @Bean - public GlobalKTableBoundElementFactory globalKTableBoundElementFactory(BindingServiceProperties bindingServiceProperties) { - return new GlobalKTableBoundElementFactory(bindingServiceProperties); + public GlobalKTableBoundElementFactory globalKTableBoundElementFactory( + BindingServiceProperties properties) { + return new GlobalKTableBoundElementFactory(properties); } @Bean @@ -249,20 +285,24 @@ public class KafkaStreamsBinderSupportAutoConfiguration { @Bean @SuppressWarnings("unchecked") - public KeyValueSerdeResolver keyValueSerdeResolver(@Qualifier("streamConfigGlobalProperties") Object streamConfigGlobalProperties, - KafkaStreamsBinderConfigurationProperties kafkaStreamsBinderConfigurationProperties) { - return new KeyValueSerdeResolver((Map) streamConfigGlobalProperties, kafkaStreamsBinderConfigurationProperties); + public KeyValueSerdeResolver keyValueSerdeResolver( + @Qualifier("streamConfigGlobalProperties") Object streamConfigGlobalProperties, + KafkaStreamsBinderConfigurationProperties properties) { + return new KeyValueSerdeResolver( + (Map) streamConfigGlobalProperties, properties); } @Bean - public QueryableStoreRegistry queryableStoreTypeRegistry(KafkaStreamsRegistry kafkaStreamsRegistry) { + public QueryableStoreRegistry queryableStoreTypeRegistry( + KafkaStreamsRegistry kafkaStreamsRegistry) { return new QueryableStoreRegistry(kafkaStreamsRegistry); } @Bean - public InteractiveQueryService interactiveQueryServices(KafkaStreamsRegistry kafkaStreamsRegistry, - KafkaStreamsBinderConfigurationProperties binderConfigurationProperties) { - return new InteractiveQueryService(kafkaStreamsRegistry, binderConfigurationProperties); + public InteractiveQueryService interactiveQueryServices( + KafkaStreamsRegistry kafkaStreamsRegistry, + KafkaStreamsBinderConfigurationProperties properties) { + return new InteractiveQueryService(kafkaStreamsRegistry, properties); } @Bean @@ -271,9 +311,10 @@ public class KafkaStreamsBinderSupportAutoConfiguration { } @Bean - public StreamsBuilderFactoryManager streamsBuilderFactoryManager(KafkaStreamsBindingInformationCatalogue kafkaStreamsBindingInformationCatalogue, - KafkaStreamsRegistry kafkaStreamsRegistry) { - return new StreamsBuilderFactoryManager(kafkaStreamsBindingInformationCatalogue, kafkaStreamsRegistry); + public StreamsBuilderFactoryManager streamsBuilderFactoryManager( + KafkaStreamsBindingInformationCatalogue catalogue, + KafkaStreamsRegistry kafkaStreamsRegistry) { + return new StreamsBuilderFactoryManager(catalogue, kafkaStreamsRegistry); } @Bean("kafkaStreamsDlqDispatchers") diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsBinderUtils.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsBinderUtils.java index 0621d0ba8..16c5f907a 100644 --- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsBinderUtils.java +++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsBinderUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,35 +37,46 @@ final class KafkaStreamsBinderUtils { } - static void prepareConsumerBinding(String name, String group, ApplicationContext context, - KafkaTopicProvisioner kafkaTopicProvisioner, - KafkaStreamsBinderConfigurationProperties binderConfigurationProperties, - ExtendedConsumerProperties properties, - Map kafkaStreamsDlqDispatchers) { + static void prepareConsumerBinding(String name, String group, + ApplicationContext context, KafkaTopicProvisioner kafkaTopicProvisioner, + KafkaStreamsBinderConfigurationProperties binderConfigurationProperties, + ExtendedConsumerProperties properties, + Map kafkaStreamsDlqDispatchers) { ExtendedConsumerProperties extendedConsumerProperties = new ExtendedConsumerProperties<>( properties.getExtension()); - if (binderConfigurationProperties.getSerdeError() == KafkaStreamsBinderConfigurationProperties.SerdeError.sendToDlq) { + if (binderConfigurationProperties + .getSerdeError() == KafkaStreamsBinderConfigurationProperties.SerdeError.sendToDlq) { extendedConsumerProperties.getExtension().setEnableDlq(true); } String[] inputTopics = StringUtils.commaDelimitedListToStringArray(name); for (String inputTopic : inputTopics) { - kafkaTopicProvisioner.provisionConsumerDestination(inputTopic, group, extendedConsumerProperties); + kafkaTopicProvisioner.provisionConsumerDestination(inputTopic, group, + extendedConsumerProperties); } if (extendedConsumerProperties.getExtension().isEnableDlq()) { - KafkaStreamsDlqDispatch kafkaStreamsDlqDispatch = !StringUtils.isEmpty(extendedConsumerProperties.getExtension().getDlqName()) ? - new KafkaStreamsDlqDispatch(extendedConsumerProperties.getExtension().getDlqName(), binderConfigurationProperties, - extendedConsumerProperties.getExtension()) : null; + KafkaStreamsDlqDispatch kafkaStreamsDlqDispatch = !StringUtils + .isEmpty(extendedConsumerProperties.getExtension().getDlqName()) + ? new KafkaStreamsDlqDispatch( + extendedConsumerProperties.getExtension() + .getDlqName(), + binderConfigurationProperties, + extendedConsumerProperties.getExtension()) + : null; for (String inputTopic : inputTopics) { - if (StringUtils.isEmpty(extendedConsumerProperties.getExtension().getDlqName())) { + if (StringUtils.isEmpty( + extendedConsumerProperties.getExtension().getDlqName())) { String dlqName = "error." + inputTopic + "." + group; - kafkaStreamsDlqDispatch = new KafkaStreamsDlqDispatch(dlqName, binderConfigurationProperties, + kafkaStreamsDlqDispatch = new KafkaStreamsDlqDispatch(dlqName, + binderConfigurationProperties, extendedConsumerProperties.getExtension()); } - SendToDlqAndContinue sendToDlqAndContinue = context.getBean(SendToDlqAndContinue.class); - sendToDlqAndContinue.addKStreamDlqDispatch(inputTopic, kafkaStreamsDlqDispatch); + SendToDlqAndContinue sendToDlqAndContinue = context + .getBean(SendToDlqAndContinue.class); + sendToDlqAndContinue.addKStreamDlqDispatch(inputTopic, + kafkaStreamsDlqDispatch); kafkaStreamsDlqDispatchers.put(inputTopic, kafkaStreamsDlqDispatch); } diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsBindingInformationCatalogue.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsBindingInformationCatalogue.java index 46cfa918a..e402bb374 100644 --- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsBindingInformationCatalogue.java +++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsBindingInformationCatalogue.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,10 +30,11 @@ import org.springframework.cloud.stream.config.BindingProperties; import org.springframework.kafka.config.StreamsBuilderFactoryBean; /** - * A catalogue that provides binding information for Kafka Streams target types such as KStream. - * It also keeps a catalogue for the underlying {@link StreamsBuilderFactoryBean} and - * {@link StreamsConfig} associated with various {@link org.springframework.cloud.stream.annotation.StreamListener} - * methods in the {@link org.springframework.context.ApplicationContext}. + * A catalogue that provides binding information for Kafka Streams target types such as + * KStream. It also keeps a catalogue for the underlying {@link StreamsBuilderFactoryBean} + * and {@link StreamsConfig} associated with various + * {@link org.springframework.cloud.stream.annotation.StreamListener} methods in the + * {@link org.springframework.context.ApplicationContext}. * * @author Soby Chacko */ @@ -46,9 +47,8 @@ class KafkaStreamsBindingInformationCatalogue { private final Set streamsBuilderFactoryBeans = new HashSet<>(); /** - * For a given bounded {@link KStream}, retrieve it's corresponding destination - * on the broker. - * + * For a given bounded {@link KStream}, retrieve it's corresponding destination on the + * broker. * @param bindingTarget binding target for KStream * @return destination topic on Kafka */ @@ -59,7 +59,6 @@ class KafkaStreamsBindingInformationCatalogue { /** * Is native decoding is enabled on this {@link KStream}. - * * @param bindingTarget binding target for KStream * @return true if native decoding is enabled, fasle otherwise. */ @@ -73,7 +72,6 @@ class KafkaStreamsBindingInformationCatalogue { /** * Is DLQ enabled for this {@link KStream}. - * * @param bindingTarget binding target for KStream * @return true if DLQ is enabled, false otherwise. */ @@ -83,7 +81,6 @@ class KafkaStreamsBindingInformationCatalogue { /** * Retrieve the content type associated with a given {@link KStream}. - * * @param bindingTarget binding target for KStream * @return content Type associated. */ @@ -94,28 +91,28 @@ class KafkaStreamsBindingInformationCatalogue { /** * Register a cache for bounded KStream -> {@link BindingProperties}. - * * @param bindingTarget binding target for KStream * @param bindingProperties {@link BindingProperties} for this KStream */ - void registerBindingProperties(KStream bindingTarget, BindingProperties bindingProperties) { + void registerBindingProperties(KStream bindingTarget, + BindingProperties bindingProperties) { this.bindingProperties.put(bindingTarget, bindingProperties); } /** * Register a cache for bounded KStream -> {@link KafkaStreamsConsumerProperties}. - * * @param bindingTarget binding target for KStream * @param kafkaStreamsConsumerProperties consumer properties for this KStream */ - void registerConsumerProperties(KStream bindingTarget, KafkaStreamsConsumerProperties kafkaStreamsConsumerProperties) { + void registerConsumerProperties(KStream bindingTarget, + KafkaStreamsConsumerProperties kafkaStreamsConsumerProperties) { this.consumerProperties.put(bindingTarget, kafkaStreamsConsumerProperties); } /** * Adds a mapping for KStream -> {@link StreamsBuilderFactoryBean}. - * - * @param streamsBuilderFactoryBean provides the {@link StreamsBuilderFactoryBean} mapped to the KStream + * @param streamsBuilderFactoryBean provides the {@link StreamsBuilderFactoryBean} + * mapped to the KStream */ void addStreamBuilderFactory(StreamsBuilderFactoryBean streamsBuilderFactoryBean) { this.streamsBuilderFactoryBeans.add(streamsBuilderFactoryBean); @@ -124,4 +121,5 @@ class KafkaStreamsBindingInformationCatalogue { Set getStreamsBuilderFactoryBeans() { return this.streamsBuilderFactoryBeans; } + } diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsDlqDispatch.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsDlqDispatch.java index a625761b9..e3ab3b103 100644 --- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsDlqDispatch.java +++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsDlqDispatch.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -53,10 +53,11 @@ class KafkaStreamsDlqDispatch { private final String dlqName; KafkaStreamsDlqDispatch(String dlqName, - KafkaBinderConfigurationProperties kafkaBinderConfigurationProperties, - KafkaConsumerProperties kafkaConsumerProperties) { + KafkaBinderConfigurationProperties kafkaBinderConfigurationProperties, + KafkaConsumerProperties kafkaConsumerProperties) { ProducerFactory producerFactory = getProducerFactory( - new ExtendedProducerProperties<>(kafkaConsumerProperties.getDlqProducerProperties()), + new ExtendedProducerProperties<>( + kafkaConsumerProperties.getDlqProducerProperties()), kafkaBinderConfigurationProperties); this.kafkaTemplate = new KafkaTemplate<>(producerFactory); @@ -65,55 +66,58 @@ class KafkaStreamsDlqDispatch { @SuppressWarnings("unchecked") public void sendToDlq(byte[] key, byte[] value, int partittion) { - ProducerRecord producerRecord = new ProducerRecord<>(this.dlqName, partittion, - key, value, null); + ProducerRecord producerRecord = new ProducerRecord<>(this.dlqName, + partittion, key, value, null); StringBuilder sb = new StringBuilder().append(" a message with key='") .append(toDisplayString(ObjectUtils.nullSafeToString(key))).append("'") .append(" and payload='") - .append(toDisplayString(ObjectUtils.nullSafeToString(value))) - .append("'").append(" received from ") - .append(partittion); + .append(toDisplayString(ObjectUtils.nullSafeToString(value))).append("'") + .append(" received from ").append(partittion); ListenableFuture> sentDlq = null; try { sentDlq = this.kafkaTemplate.send(producerRecord); - sentDlq.addCallback(new ListenableFutureCallback>() { + sentDlq.addCallback( + new ListenableFutureCallback>() { - @Override - public void onFailure(Throwable ex) { - KafkaStreamsDlqDispatch.this.logger.error( - "Error sending to DLQ " + sb.toString(), ex); - } + @Override + public void onFailure(Throwable ex) { + KafkaStreamsDlqDispatch.this.logger + .error("Error sending to DLQ " + sb.toString(), ex); + } - @Override - public void onSuccess(SendResult result) { - if (KafkaStreamsDlqDispatch.this.logger.isDebugEnabled()) { - KafkaStreamsDlqDispatch.this.logger.debug( - "Sent to DLQ " + sb.toString()); - } - } - }); + @Override + public void onSuccess(SendResult result) { + if (KafkaStreamsDlqDispatch.this.logger.isDebugEnabled()) { + KafkaStreamsDlqDispatch.this.logger + .debug("Sent to DLQ " + sb.toString()); + } + } + }); } catch (Exception ex) { if (sentDlq == null) { - KafkaStreamsDlqDispatch.this.logger.error( - "Error sending to DLQ " + sb.toString(), ex); + KafkaStreamsDlqDispatch.this.logger + .error("Error sending to DLQ " + sb.toString(), ex); } } } - private DefaultKafkaProducerFactory getProducerFactory(ExtendedProducerProperties producerProperties, - KafkaBinderConfigurationProperties configurationProperties) { + private DefaultKafkaProducerFactory getProducerFactory( + ExtendedProducerProperties producerProperties, + KafkaBinderConfigurationProperties configurationProperties) { Map props = new HashMap<>(); props.put(ProducerConfig.RETRIES_CONFIG, 0); props.put(ProducerConfig.BUFFER_MEMORY_CONFIG, 33554432); props.put(ProducerConfig.ACKS_CONFIG, configurationProperties.getRequiredAcks()); - Map mergedConfig = configurationProperties.mergedProducerConfiguration(); + Map mergedConfig = configurationProperties + .mergedProducerConfiguration(); if (!ObjectUtils.isEmpty(mergedConfig)) { props.putAll(mergedConfig); } if (ObjectUtils.isEmpty(props.get(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG))) { - props.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, configurationProperties.getKafkaConnectionString()); + props.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, + configurationProperties.getKafkaConnectionString()); } if (ObjectUtils.isEmpty(props.get(ProducerConfig.BATCH_SIZE_CONFIG))) { props.put(ProducerConfig.BATCH_SIZE_CONFIG, @@ -130,9 +134,10 @@ class KafkaStreamsDlqDispatch { if (!ObjectUtils.isEmpty(producerProperties.getExtension().getConfiguration())) { props.putAll(producerProperties.getExtension().getConfiguration()); } - //Always send as byte[] on dlq (the same byte[] that the consumer received) + // Always send as byte[] on dlq (the same byte[] that the consumer received) props.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, ByteArraySerializer.class); - props.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, ByteArraySerializer.class); + props.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, + ByteArraySerializer.class); return new DefaultKafkaProducerFactory<>(props); } @@ -143,4 +148,5 @@ class KafkaStreamsDlqDispatch { } return original.substring(0, 50) + "..."; } + } diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsMessageConversionDelegate.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsMessageConversionDelegate.java index 302e555ba..d1fb7d4bd 100644 --- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsMessageConversionDelegate.java +++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsMessageConversionDelegate.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,17 +38,18 @@ import org.springframework.util.Assert; import org.springframework.util.StringUtils; /** - * Delegate for handling all framework level message conversions inbound and outbound on {@link KStream}. - * If native encoding is not enabled, then serialization will be performed on outbound messages based - * on a contentType. Similarly, if native decoding is not enabled, deserialization will be performed on - * inbound messages based on a contentType. Based on the contentType, a {@link MessageConverter} will - * be resolved. + * Delegate for handling all framework level message conversions inbound and outbound on + * {@link KStream}. If native encoding is not enabled, then serialization will be + * performed on outbound messages based on a contentType. Similarly, if native decoding is + * not enabled, deserialization will be performed on inbound messages based on a + * contentType. Based on the contentType, a {@link MessageConverter} will be resolved. * * @author Soby Chacko */ public class KafkaStreamsMessageConversionDelegate { - private static final Log LOG = LogFactory.getLog(KafkaStreamsMessageConversionDelegate.class); + private static final Log LOG = LogFactory + .getLog(KafkaStreamsMessageConversionDelegate.class); private static final ThreadLocal> keyValueThreadLocal = new ThreadLocal<>(); @@ -60,10 +61,11 @@ public class KafkaStreamsMessageConversionDelegate { private final KafkaStreamsBinderConfigurationProperties kstreamBinderConfigurationProperties; - KafkaStreamsMessageConversionDelegate(CompositeMessageConverterFactory compositeMessageConverterFactory, - SendToDlqAndContinue sendToDlqAndContinue, - KafkaStreamsBindingInformationCatalogue kstreamBindingInformationCatalogue, - KafkaStreamsBinderConfigurationProperties kstreamBinderConfigurationProperties) { + KafkaStreamsMessageConversionDelegate( + CompositeMessageConverterFactory compositeMessageConverterFactory, + SendToDlqAndContinue sendToDlqAndContinue, + KafkaStreamsBindingInformationCatalogue kstreamBindingInformationCatalogue, + KafkaStreamsBinderConfigurationProperties kstreamBinderConfigurationProperties) { this.compositeMessageConverterFactory = compositeMessageConverterFactory; this.sendToDlqAndContinue = sendToDlqAndContinue; this.kstreamBindingInformationCatalogue = kstreamBindingInformationCatalogue; @@ -72,87 +74,103 @@ public class KafkaStreamsMessageConversionDelegate { /** * Serialize {@link KStream} records on outbound based on contentType. - * * @param outboundBindTarget outbound KStream target * @return serialized KStream */ @SuppressWarnings("rawtypes") public KStream serializeOnOutbound(KStream outboundBindTarget) { - String contentType = this.kstreamBindingInformationCatalogue.getContentType(outboundBindTarget); - MessageConverter messageConverter = this.compositeMessageConverterFactory.getMessageConverterForAllRegistered(); + String contentType = this.kstreamBindingInformationCatalogue + .getContentType(outboundBindTarget); + MessageConverter messageConverter = this.compositeMessageConverterFactory + .getMessageConverterForAllRegistered(); return outboundBindTarget.mapValues((v) -> { - Message message = v instanceof Message ? (Message) v : - MessageBuilder.withPayload(v).build(); + Message message = v instanceof Message ? (Message) v + : MessageBuilder.withPayload(v).build(); Map headers = new HashMap<>(message.getHeaders()); if (!StringUtils.isEmpty(contentType)) { headers.put(MessageHeaders.CONTENT_TYPE, contentType); } MessageHeaders messageHeaders = new MessageHeaders(headers); - return - messageConverter.toMessage(message.getPayload(), - messageHeaders).getPayload(); + return messageConverter.toMessage(message.getPayload(), messageHeaders) + .getPayload(); }); } /** * Deserialize incoming {@link KStream} based on content type. - * * @param valueClass on KStream value * @param bindingTarget inbound KStream target * @return deserialized KStream */ @SuppressWarnings({ "unchecked", "rawtypes" }) - public KStream deserializeOnInbound(Class valueClass, KStream bindingTarget) { - MessageConverter messageConverter = this.compositeMessageConverterFactory.getMessageConverterForAllRegistered(); + public KStream deserializeOnInbound(Class valueClass, + KStream bindingTarget) { + MessageConverter messageConverter = this.compositeMessageConverterFactory + .getMessageConverterForAllRegistered(); final PerRecordContentTypeHolder perRecordContentTypeHolder = new PerRecordContentTypeHolder(); resolvePerRecordContentType(bindingTarget, perRecordContentTypeHolder); - //Deserialize using a branching strategy + // Deserialize using a branching strategy KStream[] branch = bindingTarget.branch( - //First filter where the message is converted and return true if everything went well, return false otherwise. - (o, o2) -> { - boolean isValidRecord = false; + // First filter where the message is converted and return true if + // everything went well, return false otherwise. + (o, o2) -> { + boolean isValidRecord = false; - try { - //if the record is a tombstone, ignore and exit from processing further. - if (o2 != null) { - if (o2 instanceof Message || o2 instanceof String || o2 instanceof byte[]) { - Message m1 = null; - if (o2 instanceof Message) { - m1 = perRecordContentTypeHolder.contentType != null - ? MessageBuilder.fromMessage((Message) o2).setHeader(MessageHeaders.CONTENT_TYPE, - perRecordContentTypeHolder.contentType).build() : (Message) o2; + try { + // if the record is a tombstone, ignore and exit from processing + // further. + if (o2 != null) { + if (o2 instanceof Message || o2 instanceof String + || o2 instanceof byte[]) { + Message m1 = null; + if (o2 instanceof Message) { + m1 = perRecordContentTypeHolder.contentType != null + ? MessageBuilder.fromMessage((Message) o2) + .setHeader( + MessageHeaders.CONTENT_TYPE, + perRecordContentTypeHolder.contentType) + .build() + : (Message) o2; + } + else { + m1 = perRecordContentTypeHolder.contentType != null + ? MessageBuilder.withPayload(o2).setHeader( + MessageHeaders.CONTENT_TYPE, + perRecordContentTypeHolder.contentType) + .build() + : MessageBuilder.withPayload(o2).build(); + } + convertAndSetMessage(o, valueClass, messageConverter, m1); } else { - m1 = perRecordContentTypeHolder.contentType != null ? MessageBuilder.withPayload(o2) - .setHeader(MessageHeaders.CONTENT_TYPE, perRecordContentTypeHolder.contentType).build() : MessageBuilder.withPayload(o2).build(); + keyValueThreadLocal.set(new KeyValue<>(o, o2)); } - convertAndSetMessage(o, valueClass, messageConverter, m1); + isValidRecord = true; } else { - keyValueThreadLocal.set(new KeyValue<>(o, o2)); + LOG.info( + "Received a tombstone record. This will be skipped from further processing."); } - isValidRecord = true; } - else { - LOG.info("Received a tombstone record. This will be skipped from further processing."); + catch (Exception e) { + LOG.warn( + "Deserialization has failed. This will be skipped from further processing.", + e); + // pass through } - } - catch (Exception e) { - LOG.warn("Deserialization has failed. This will be skipped from further processing.", e); - //pass through - } - return isValidRecord; - }, - //second filter that catches any messages for which an exception thrown in the first filter above. - (k, v) -> true - ); - //process errors from the second filter in the branch above. + return isValidRecord; + }, + // second filter that catches any messages for which an exception thrown + // in the first filter above. + (k, v) -> true); + // process errors from the second filter in the branch above. processErrorFromDeserialization(bindingTarget, branch[1]); - //first branch above is the branch where the messages are converted, let it go through further processing. + // first branch above is the branch where the messages are converted, let it go + // through further processing. return branch[0].mapValues((o2) -> { Object objectValue = keyValueThreadLocal.get().value; keyValueThreadLocal.remove(); @@ -161,7 +179,8 @@ public class KafkaStreamsMessageConversionDelegate { } @SuppressWarnings({ "unchecked", "rawtypes" }) - private void resolvePerRecordContentType(KStream outboundBindTarget, PerRecordContentTypeHolder perRecordContentTypeHolder) { + private void resolvePerRecordContentType(KStream outboundBindTarget, + PerRecordContentTypeHolder perRecordContentTypeHolder) { outboundBindTarget.process(() -> new Processor() { ProcessorContext context; @@ -174,11 +193,14 @@ public class KafkaStreamsMessageConversionDelegate { @Override public void process(Object key, Object value) { final Headers headers = this.context.headers(); - final Iterable
contentTypes = headers.headers(MessageHeaders.CONTENT_TYPE); + final Iterable
contentTypes = headers + .headers(MessageHeaders.CONTENT_TYPE); if (contentTypes != null && contentTypes.iterator().hasNext()) { - final String contentType = new String(contentTypes.iterator().next().value()); - //remove leading and trailing quotes - final String cleanContentType = StringUtils.replace(contentType, "\"", ""); + final String contentType = new String( + contentTypes.iterator().next().value()); + // remove leading and trailing quotes + final String cleanContentType = StringUtils.replace(contentType, "\"", + ""); perRecordContentTypeHolder.setContentType(cleanContentType); } } @@ -190,7 +212,8 @@ public class KafkaStreamsMessageConversionDelegate { }); } - private void convertAndSetMessage(Object o, Class valueClass, MessageConverter messageConverter, Message msg) { + private void convertAndSetMessage(Object o, Class valueClass, + MessageConverter messageConverter, Message msg) { Object result = valueClass.isAssignableFrom(msg.getPayload().getClass()) ? msg.getPayload() : messageConverter.fromMessage(msg, valueClass); @@ -200,7 +223,8 @@ public class KafkaStreamsMessageConversionDelegate { } @SuppressWarnings({ "unchecked", "rawtypes" }) - private void processErrorFromDeserialization(KStream bindingTarget, KStream branch) { + private void processErrorFromDeserialization(KStream bindingTarget, + KStream branch) { branch.process(() -> new Processor() { ProcessorContext context; @@ -211,24 +235,35 @@ public class KafkaStreamsMessageConversionDelegate { @Override public void process(Object o, Object o2) { - //Only continue if the record was not a tombstone. + // Only continue if the record was not a tombstone. if (o2 != null) { - if (KafkaStreamsMessageConversionDelegate.this.kstreamBindingInformationCatalogue.isDlqEnabled(bindingTarget)) { + if (KafkaStreamsMessageConversionDelegate.this.kstreamBindingInformationCatalogue + .isDlqEnabled(bindingTarget)) { String destination = this.context.topic(); if (o2 instanceof Message) { Message message = (Message) o2; - KafkaStreamsMessageConversionDelegate.this.sendToDlqAndContinue.sendToDlq(destination, (byte[]) o, (byte[]) message.getPayload(), this.context.partition()); + KafkaStreamsMessageConversionDelegate.this.sendToDlqAndContinue + .sendToDlq(destination, (byte[]) o, + (byte[]) message.getPayload(), + this.context.partition()); } else { - KafkaStreamsMessageConversionDelegate.this.sendToDlqAndContinue.sendToDlq(destination, (byte[]) o, (byte[]) o2, this.context.partition()); + KafkaStreamsMessageConversionDelegate.this.sendToDlqAndContinue + .sendToDlq(destination, (byte[]) o, (byte[]) o2, + this.context.partition()); } } - else if (KafkaStreamsMessageConversionDelegate.this.kstreamBinderConfigurationProperties.getSerdeError() == KafkaStreamsBinderConfigurationProperties.SerdeError.logAndFail) { - throw new IllegalStateException("Inbound deserialization failed. Stopping further processing of records."); + else if (KafkaStreamsMessageConversionDelegate.this.kstreamBinderConfigurationProperties + .getSerdeError() == KafkaStreamsBinderConfigurationProperties.SerdeError.logAndFail) { + throw new IllegalStateException("Inbound deserialization failed. " + + "Stopping further processing of records."); } - else if (KafkaStreamsMessageConversionDelegate.this.kstreamBinderConfigurationProperties.getSerdeError() == KafkaStreamsBinderConfigurationProperties.SerdeError.logAndContinue) { - //quietly passing through. No action needed, this is similar to log and continue. - LOG.error("Inbound deserialization failed. Skipping this record and continuing."); + else if (KafkaStreamsMessageConversionDelegate.this.kstreamBinderConfigurationProperties + .getSerdeError() == KafkaStreamsBinderConfigurationProperties.SerdeError.logAndContinue) { + // quietly passing through. No action needed, this is similar to + // log and continue. + LOG.error( + "Inbound deserialization failed. Skipping this record and continuing."); } } } @@ -247,5 +282,7 @@ public class KafkaStreamsMessageConversionDelegate { void setContentType(String contentType) { this.contentType = contentType; } + } + } diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsRegistry.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsRegistry.java index 4b82ded1c..7e7ce6512 100644 --- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsRegistry.java +++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsRegistry.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,10 +37,10 @@ class KafkaStreamsRegistry { /** * Register the {@link KafkaStreams} object created in the application. - * * @param kafkaStreams {@link KafkaStreams} object created in the application */ void registerKafkaStreams(KafkaStreams kafkaStreams) { this.kafkaStreams.add(kafkaStreams); } + } diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsStreamListenerSetupMethodOrchestrator.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsStreamListenerSetupMethodOrchestrator.java index 10557f754..b451b3f9a 100644 --- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsStreamListenerSetupMethodOrchestrator.java +++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsStreamListenerSetupMethodOrchestrator.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -81,17 +81,20 @@ import org.springframework.util.StringUtils; * * The orchestration primarily focus on the following areas: * - * 1. Allow multiple KStream output bindings (KStream branching) by allowing more than one output values on {@link SendTo} - * 2. Allow multiple inbound bindings for multiple KStream and or KTable/GlobalKTable types. - * 3. Each StreamListener method that it orchestrates gets its own {@link StreamsBuilderFactoryBean} and {@link StreamsConfig} + * 1. Allow multiple KStream output bindings (KStream branching) by allowing more than one + * output values on {@link SendTo} 2. Allow multiple inbound bindings for multiple KStream + * and or KTable/GlobalKTable types. 3. Each StreamListener method that it orchestrates + * gets its own {@link StreamsBuilderFactoryBean} and {@link StreamsConfig} * * @author Soby Chacko * @author Lei Chen * @author Gary Russell */ -class KafkaStreamsStreamListenerSetupMethodOrchestrator implements StreamListenerSetupMethodOrchestrator, ApplicationContextAware { +class KafkaStreamsStreamListenerSetupMethodOrchestrator + implements StreamListenerSetupMethodOrchestrator, ApplicationContextAware { - private static final Log LOG = LogFactory.getLog(KafkaStreamsStreamListenerSetupMethodOrchestrator.class); + private static final Log LOG = LogFactory + .getLog(KafkaStreamsStreamListenerSetupMethodOrchestrator.class); private final StreamListenerParameterAdapter streamListenerParameterAdapter; @@ -111,32 +114,33 @@ class KafkaStreamsStreamListenerSetupMethodOrchestrator implements StreamListene private ConfigurableApplicationContext applicationContext; - KafkaStreamsStreamListenerSetupMethodOrchestrator(BindingServiceProperties bindingServiceProperties, - KafkaStreamsExtendedBindingProperties kafkaStreamsExtendedBindingProperties, - KeyValueSerdeResolver keyValueSerdeResolver, - KafkaStreamsBindingInformationCatalogue kafkaStreamsBindingInformationCatalogue, - StreamListenerParameterAdapter streamListenerParameterAdapter, - Collection streamListenerResultAdapters, - CleanupConfig cleanupConfig) { + KafkaStreamsStreamListenerSetupMethodOrchestrator( + BindingServiceProperties bindingServiceProperties, + KafkaStreamsExtendedBindingProperties extendedBindingProperties, + KeyValueSerdeResolver keyValueSerdeResolver, + KafkaStreamsBindingInformationCatalogue bindingInformationCatalogue, + StreamListenerParameterAdapter streamListenerParameterAdapter, + Collection listenerResultAdapters, + CleanupConfig cleanupConfig) { this.bindingServiceProperties = bindingServiceProperties; - this.kafkaStreamsExtendedBindingProperties = kafkaStreamsExtendedBindingProperties; + this.kafkaStreamsExtendedBindingProperties = extendedBindingProperties; this.keyValueSerdeResolver = keyValueSerdeResolver; - this.kafkaStreamsBindingInformationCatalogue = kafkaStreamsBindingInformationCatalogue; + this.kafkaStreamsBindingInformationCatalogue = bindingInformationCatalogue; this.streamListenerParameterAdapter = streamListenerParameterAdapter; - this.streamListenerResultAdapters = streamListenerResultAdapters; + this.streamListenerResultAdapters = listenerResultAdapters; this.cleanupConfig = cleanupConfig; } @Override public boolean supports(Method method) { - return methodParameterSupports(method) && - (methodReturnTypeSuppports(method) || Void.TYPE.equals(method.getReturnType())); + return methodParameterSupports(method) && (methodReturnTypeSuppports(method) + || Void.TYPE.equals(method.getReturnType())); } private boolean methodReturnTypeSuppports(Method method) { Class returnType = method.getReturnType(); - if (returnType.equals(KStream.class) || - (returnType.isArray() && returnType.getComponentType().equals(KStream.class))) { + if (returnType.equals(KStream.class) || (returnType.isArray() + && returnType.getComponentType().equals(KStream.class))) { return true; } return false; @@ -156,13 +160,15 @@ class KafkaStreamsStreamListenerSetupMethodOrchestrator implements StreamListene } @Override - @SuppressWarnings({"rawtypes", "unchecked"}) - public void orchestrateStreamListenerSetupMethod(StreamListener streamListener, Method method, Object bean) { + @SuppressWarnings({ "rawtypes", "unchecked" }) + public void orchestrateStreamListenerSetupMethod(StreamListener streamListener, + Method method, Object bean) { String[] methodAnnotatedOutboundNames = getOutboundBindingTargetNames(method); - validateStreamListenerMethod(streamListener, method, methodAnnotatedOutboundNames); + validateStreamListenerMethod(streamListener, method, + methodAnnotatedOutboundNames); String methodAnnotatedInboundName = streamListener.value(); - Object[] adaptedInboundArguments = adaptAndRetrieveInboundArguments(method, methodAnnotatedInboundName, - this.applicationContext, + Object[] adaptedInboundArguments = adaptAndRetrieveInboundArguments(method, + methodAnnotatedInboundName, this.applicationContext, this.streamListenerParameterAdapter); try { ReflectionUtils.makeAccessible(method); @@ -173,7 +179,8 @@ class KafkaStreamsStreamListenerSetupMethodOrchestrator implements StreamListene Object result = method.invoke(bean, adaptedInboundArguments); if (result.getClass().isArray()) { - Assert.isTrue(methodAnnotatedOutboundNames.length == ((Object[]) result).length, + Assert.isTrue( + methodAnnotatedOutboundNames.length == ((Object[]) result).length, "Result does not match with the number of declared outbounds"); } else { @@ -184,19 +191,24 @@ class KafkaStreamsStreamListenerSetupMethodOrchestrator implements StreamListene Object[] outboundKStreams = (Object[]) result; int i = 0; for (Object outboundKStream : outboundKStreams) { - Object targetBean = this.applicationContext.getBean(methodAnnotatedOutboundNames[i++]); + Object targetBean = this.applicationContext + .getBean(methodAnnotatedOutboundNames[i++]); for (StreamListenerResultAdapter streamListenerResultAdapter : this.streamListenerResultAdapters) { - if (streamListenerResultAdapter.supports(outboundKStream.getClass(), targetBean.getClass())) { - streamListenerResultAdapter.adapt(outboundKStream, targetBean); + if (streamListenerResultAdapter.supports( + outboundKStream.getClass(), targetBean.getClass())) { + streamListenerResultAdapter.adapt(outboundKStream, + targetBean); break; } } } } else { - Object targetBean = this.applicationContext.getBean(methodAnnotatedOutboundNames[0]); + Object targetBean = this.applicationContext + .getBean(methodAnnotatedOutboundNames[0]); for (StreamListenerResultAdapter streamListenerResultAdapter : this.streamListenerResultAdapters) { - if (streamListenerResultAdapter.supports(result.getClass(), targetBean.getClass())) { + if (streamListenerResultAdapter.supports(result.getClass(), + targetBean.getClass())) { streamListenerResultAdapter.adapt(result, targetBean); break; } @@ -205,102 +217,140 @@ class KafkaStreamsStreamListenerSetupMethodOrchestrator implements StreamListene } } catch (Exception ex) { - throw new BeanInitializationException("Cannot setup StreamListener for " + method, ex); + throw new BeanInitializationException( + "Cannot setup StreamListener for " + method, ex); } } @Override - @SuppressWarnings({"unchecked"}) + @SuppressWarnings({ "unchecked" }) public Object[] adaptAndRetrieveInboundArguments(Method method, String inboundName, - ApplicationContext applicationContext, - StreamListenerParameterAdapter... streamListenerParameterAdapters) { + ApplicationContext applicationContext, + StreamListenerParameterAdapter... adapters) { Object[] arguments = new Object[method.getParameterTypes().length]; for (int parameterIndex = 0; parameterIndex < arguments.length; parameterIndex++) { - MethodParameter methodParameter = MethodParameter.forExecutable(method, parameterIndex); + MethodParameter methodParameter = MethodParameter.forExecutable(method, + parameterIndex); Class parameterType = methodParameter.getParameterType(); Object targetReferenceValue = null; if (methodParameter.hasParameterAnnotation(Input.class)) { - targetReferenceValue = AnnotationUtils.getValue(methodParameter.getParameterAnnotation(Input.class)); - Input methodAnnotation = methodParameter.getParameterAnnotation(Input.class); + targetReferenceValue = AnnotationUtils + .getValue(methodParameter.getParameterAnnotation(Input.class)); + Input methodAnnotation = methodParameter + .getParameterAnnotation(Input.class); inboundName = methodAnnotation.value(); } else if (arguments.length == 1 && StringUtils.hasText(inboundName)) { targetReferenceValue = inboundName; } if (targetReferenceValue != null) { - Assert.isInstanceOf(String.class, targetReferenceValue, "Annotation value must be a String"); - Object targetBean = applicationContext.getBean((String) targetReferenceValue); - BindingProperties bindingProperties = this.bindingServiceProperties.getBindingProperties(inboundName); + Assert.isInstanceOf(String.class, targetReferenceValue, + "Annotation value must be a String"); + Object targetBean = applicationContext + .getBean((String) targetReferenceValue); + BindingProperties bindingProperties = this.bindingServiceProperties + .getBindingProperties(inboundName); enableNativeDecodingForKTableAlways(parameterType, bindingProperties); - //Retrieve the StreamsConfig created for this method if available. - //Otherwise, create the StreamsBuilderFactory and get the underlying config. + // Retrieve the StreamsConfig created for this method if available. + // Otherwise, create the StreamsBuilderFactory and get the underlying + // config. if (!this.methodStreamsBuilderFactoryBeanMap.containsKey(method)) { - buildStreamsBuilderAndRetrieveConfig(method, applicationContext, inboundName); + buildStreamsBuilderAndRetrieveConfig(method, applicationContext, + inboundName); } try { - StreamsBuilderFactoryBean streamsBuilderFactoryBean = this.methodStreamsBuilderFactoryBeanMap.get(method); + StreamsBuilderFactoryBean streamsBuilderFactoryBean = this.methodStreamsBuilderFactoryBeanMap + .get(method); StreamsBuilder streamsBuilder = streamsBuilderFactoryBean.getObject(); - KafkaStreamsConsumerProperties extendedConsumerProperties = this.kafkaStreamsExtendedBindingProperties.getExtendedConsumerProperties(inboundName); - //get state store spec + KafkaStreamsConsumerProperties extendedConsumerProperties = this.kafkaStreamsExtendedBindingProperties + .getExtendedConsumerProperties(inboundName); + // get state store spec KafkaStreamsStateStoreProperties spec = buildStateStoreSpec(method); - Serde keySerde = this.keyValueSerdeResolver.getInboundKeySerde(extendedConsumerProperties); - Serde valueSerde = this.keyValueSerdeResolver.getInboundValueSerde(bindingProperties.getConsumer(), extendedConsumerProperties); + Serde keySerde = this.keyValueSerdeResolver + .getInboundKeySerde(extendedConsumerProperties); + Serde valueSerde = this.keyValueSerdeResolver.getInboundValueSerde( + bindingProperties.getConsumer(), extendedConsumerProperties); - final KafkaConsumerProperties.StartOffset startOffset = extendedConsumerProperties.getStartOffset(); + final KafkaConsumerProperties.StartOffset startOffset = extendedConsumerProperties + .getStartOffset(); Topology.AutoOffsetReset autoOffsetReset = null; if (startOffset != null) { switch (startOffset) { - case earliest : autoOffsetReset = Topology.AutoOffsetReset.EARLIEST; - break; - case latest : autoOffsetReset = Topology.AutoOffsetReset.LATEST; - break; - default: break; + case earliest: + autoOffsetReset = Topology.AutoOffsetReset.EARLIEST; + break; + case latest: + autoOffsetReset = Topology.AutoOffsetReset.LATEST; + break; + default: + break; } } if (extendedConsumerProperties.isResetOffsets()) { - LOG.warn("Detected resetOffsets configured on binding " + inboundName + ". " + LOG.warn("Detected resetOffsets configured on binding " + + inboundName + ". " + "Setting resetOffsets in Kafka Streams binder does not have any effect."); } if (parameterType.isAssignableFrom(KStream.class)) { - KStream stream = getkStream(inboundName, spec, bindingProperties, - streamsBuilder, keySerde, valueSerde, autoOffsetReset); + KStream stream = getkStream(inboundName, spec, + bindingProperties, streamsBuilder, keySerde, valueSerde, + autoOffsetReset); KStreamBoundElementFactory.KStreamWrapper kStreamWrapper = (KStreamBoundElementFactory.KStreamWrapper) targetBean; - //wrap the proxy created during the initial target type binding with real object (KStream) + // wrap the proxy created during the initial target type binding + // with real object (KStream) kStreamWrapper.wrap((KStream) stream); - this.kafkaStreamsBindingInformationCatalogue.addStreamBuilderFactory(streamsBuilderFactoryBean); - for (StreamListenerParameterAdapter streamListenerParameterAdapter : streamListenerParameterAdapters) { - if (streamListenerParameterAdapter.supports(stream.getClass(), methodParameter)) { - arguments[parameterIndex] = streamListenerParameterAdapter.adapt(kStreamWrapper, methodParameter); + this.kafkaStreamsBindingInformationCatalogue + .addStreamBuilderFactory(streamsBuilderFactoryBean); + for (StreamListenerParameterAdapter streamListenerParameterAdapter : adapters) { + if (streamListenerParameterAdapter.supports(stream.getClass(), + methodParameter)) { + arguments[parameterIndex] = streamListenerParameterAdapter + .adapt(kStreamWrapper, methodParameter); break; } } - if (arguments[parameterIndex] == null && parameterType.isAssignableFrom(stream.getClass())) { + if (arguments[parameterIndex] == null + && parameterType.isAssignableFrom(stream.getClass())) { arguments[parameterIndex] = stream; } - Assert.notNull(arguments[parameterIndex], "Cannot convert argument " + parameterIndex + " of " + method - + "from " + stream.getClass() + " to " + parameterType); + Assert.notNull(arguments[parameterIndex], + "Cannot convert argument " + parameterIndex + " of " + + method + "from " + stream.getClass() + " to " + + parameterType); } else if (parameterType.isAssignableFrom(KTable.class)) { - String materializedAs = extendedConsumerProperties.getMaterializedAs(); - String bindingDestination = this.bindingServiceProperties.getBindingDestination(inboundName); - KTable table = getKTable(streamsBuilder, keySerde, valueSerde, materializedAs, - bindingDestination, autoOffsetReset); + String materializedAs = extendedConsumerProperties + .getMaterializedAs(); + String bindingDestination = this.bindingServiceProperties + .getBindingDestination(inboundName); + KTable table = getKTable(streamsBuilder, keySerde, + valueSerde, materializedAs, bindingDestination, + autoOffsetReset); KTableBoundElementFactory.KTableWrapper kTableWrapper = (KTableBoundElementFactory.KTableWrapper) targetBean; - //wrap the proxy created during the initial target type binding with real object (KTable) + // wrap the proxy created during the initial target type binding + // with real object (KTable) kTableWrapper.wrap((KTable) table); - this.kafkaStreamsBindingInformationCatalogue.addStreamBuilderFactory(streamsBuilderFactoryBean); + this.kafkaStreamsBindingInformationCatalogue + .addStreamBuilderFactory(streamsBuilderFactoryBean); arguments[parameterIndex] = table; } else if (parameterType.isAssignableFrom(GlobalKTable.class)) { - String materializedAs = extendedConsumerProperties.getMaterializedAs(); - String bindingDestination = this.bindingServiceProperties.getBindingDestination(inboundName); - GlobalKTable table = getGlobalKTable(streamsBuilder, keySerde, valueSerde, materializedAs, - bindingDestination, autoOffsetReset); + String materializedAs = extendedConsumerProperties + .getMaterializedAs(); + String bindingDestination = this.bindingServiceProperties + .getBindingDestination(inboundName); + GlobalKTable table = getGlobalKTable(streamsBuilder, + keySerde, valueSerde, materializedAs, bindingDestination, + autoOffsetReset); + // @checkstyle:off GlobalKTableBoundElementFactory.GlobalKTableWrapper globalKTableWrapper = (GlobalKTableBoundElementFactory.GlobalKTableWrapper) targetBean; - //wrap the proxy created during the initial target type binding with real object (KTable) + // @checkstyle:on + // wrap the proxy created during the initial target type binding + // with real object (KTable) globalKTableWrapper.wrap((GlobalKTable) table); - this.kafkaStreamsBindingInformationCatalogue.addStreamBuilderFactory(streamsBuilderFactoryBean); + this.kafkaStreamsBindingInformationCatalogue + .addStreamBuilderFactory(streamsBuilderFactoryBean); arguments[parameterIndex] = table; } } @@ -309,67 +359,86 @@ class KafkaStreamsStreamListenerSetupMethodOrchestrator implements StreamListene } } else { - throw new IllegalStateException(StreamListenerErrorMessages.INVALID_DECLARATIVE_METHOD_PARAMETERS); + throw new IllegalStateException( + StreamListenerErrorMessages.INVALID_DECLARATIVE_METHOD_PARAMETERS); } } return arguments; } - private GlobalKTable getGlobalKTable(StreamsBuilder streamsBuilder, Serde keySerde, Serde valueSerde, String materializedAs, - String bindingDestination, Topology.AutoOffsetReset autoOffsetReset) { - return materializedAs != null ? - materializedAsGlobalKTable(streamsBuilder, bindingDestination, materializedAs, keySerde, valueSerde, autoOffsetReset) : - streamsBuilder.globalTable(bindingDestination, - Consumed.with(keySerde, valueSerde).withOffsetResetPolicy(autoOffsetReset)); + private GlobalKTable getGlobalKTable(StreamsBuilder streamsBuilder, + Serde keySerde, Serde valueSerde, String materializedAs, + String bindingDestination, Topology.AutoOffsetReset autoOffsetReset) { + return materializedAs != null + ? materializedAsGlobalKTable(streamsBuilder, bindingDestination, + materializedAs, keySerde, valueSerde, autoOffsetReset) + : streamsBuilder.globalTable(bindingDestination, + Consumed.with(keySerde, valueSerde) + .withOffsetResetPolicy(autoOffsetReset)); } - private KTable getKTable(StreamsBuilder streamsBuilder, Serde keySerde, Serde valueSerde, String materializedAs, - String bindingDestination, Topology.AutoOffsetReset autoOffsetReset) { - return materializedAs != null ? - materializedAs(streamsBuilder, bindingDestination, materializedAs, keySerde, valueSerde, autoOffsetReset) : - streamsBuilder.table(bindingDestination, - Consumed.with(keySerde, valueSerde).withOffsetResetPolicy(autoOffsetReset)); + private KTable getKTable(StreamsBuilder streamsBuilder, Serde keySerde, + Serde valueSerde, String materializedAs, String bindingDestination, + Topology.AutoOffsetReset autoOffsetReset) { + return materializedAs != null + ? materializedAs(streamsBuilder, bindingDestination, materializedAs, + keySerde, valueSerde, autoOffsetReset) + : streamsBuilder.table(bindingDestination, + Consumed.with(keySerde, valueSerde) + .withOffsetResetPolicy(autoOffsetReset)); } - private KTable materializedAs(StreamsBuilder streamsBuilder, String destination, String storeName, Serde k, Serde v, - Topology.AutoOffsetReset autoOffsetReset) { - return streamsBuilder.table(this.bindingServiceProperties.getBindingDestination(destination), + private KTable materializedAs(StreamsBuilder streamsBuilder, + String destination, String storeName, Serde k, Serde v, + Topology.AutoOffsetReset autoOffsetReset) { + return streamsBuilder.table( + this.bindingServiceProperties.getBindingDestination(destination), Consumed.with(k, v).withOffsetResetPolicy(autoOffsetReset), getMaterialized(storeName, k, v)); } - private GlobalKTable materializedAsGlobalKTable(StreamsBuilder streamsBuilder, String destination, String storeName, Serde k, Serde v, - Topology.AutoOffsetReset autoOffsetReset) { - return streamsBuilder.globalTable(this.bindingServiceProperties.getBindingDestination(destination), + private GlobalKTable materializedAsGlobalKTable( + StreamsBuilder streamsBuilder, String destination, String storeName, + Serde k, Serde v, Topology.AutoOffsetReset autoOffsetReset) { + return streamsBuilder.globalTable( + this.bindingServiceProperties.getBindingDestination(destination), Consumed.with(k, v).withOffsetResetPolicy(autoOffsetReset), getMaterialized(storeName, k, v)); } - private Materialized> getMaterialized(String storeName, Serde k, Serde v) { + private Materialized> getMaterialized( + String storeName, Serde k, Serde v) { return Materialized.>as(storeName) - .withKeySerde(k) - .withValueSerde(v); + .withKeySerde(k).withValueSerde(v); } private StoreBuilder buildStateStore(KafkaStreamsStateStoreProperties spec) { try { - Serde keySerde = this.keyValueSerdeResolver.getStateStoreKeySerde(spec.getKeySerdeString()); - Serde valueSerde = this.keyValueSerdeResolver.getStateStoreValueSerde(spec.getValueSerdeString()); + Serde keySerde = this.keyValueSerdeResolver + .getStateStoreKeySerde(spec.getKeySerdeString()); + Serde valueSerde = this.keyValueSerdeResolver + .getStateStoreValueSerde(spec.getValueSerdeString()); StoreBuilder builder; switch (spec.getType()) { - case KEYVALUE: - builder = Stores.keyValueStoreBuilder(Stores.persistentKeyValueStore(spec.getName()), keySerde, valueSerde); - break; - case WINDOW: - builder = Stores.windowStoreBuilder(Stores.persistentWindowStore(spec.getName(), spec.getRetention(), 3, spec.getLength(), false), - keySerde, - valueSerde); - break; - case SESSION: - builder = Stores.sessionStoreBuilder(Stores.persistentSessionStore(spec.getName(), spec.getRetention()), keySerde, valueSerde); - break; - default: - throw new UnsupportedOperationException("state store type (" + spec.getType() + ") is not supported!"); + case KEYVALUE: + builder = Stores.keyValueStoreBuilder( + Stores.persistentKeyValueStore(spec.getName()), keySerde, + valueSerde); + break; + case WINDOW: + builder = Stores + .windowStoreBuilder( + Stores.persistentWindowStore(spec.getName(), + spec.getRetention(), 3, spec.getLength(), false), + keySerde, valueSerde); + break; + case SESSION: + builder = Stores.sessionStoreBuilder(Stores.persistentSessionStore( + spec.getName(), spec.getRetention()), keySerde, valueSerde); + break; + default: + throw new UnsupportedOperationException( + "state store type (" + spec.getType() + ") is not supported!"); } if (spec.isCacheEnabled()) { builder = builder.withCachingEnabled(); @@ -385,10 +454,11 @@ class KafkaStreamsStreamListenerSetupMethodOrchestrator implements StreamListene } } - private KStream getkStream(String inboundName, KafkaStreamsStateStoreProperties storeSpec, - BindingProperties bindingProperties, - StreamsBuilder streamsBuilder, - Serde keySerde, Serde valueSerde, Topology.AutoOffsetReset autoOffsetReset) { + private KStream getkStream(String inboundName, + KafkaStreamsStateStoreProperties storeSpec, + BindingProperties bindingProperties, StreamsBuilder streamsBuilder, + Serde keySerde, Serde valueSerde, + Topology.AutoOffsetReset autoOffsetReset) { if (storeSpec != null) { StoreBuilder storeBuilder = buildStateStore(storeSpec); streamsBuilder.addStateStore(storeBuilder); @@ -396,19 +466,21 @@ class KafkaStreamsStreamListenerSetupMethodOrchestrator implements StreamListene LOG.info("state store " + storeBuilder.name() + " added to topology"); } } - String[] bindingTargets = StringUtils - .commaDelimitedListToStringArray(this.bindingServiceProperties.getBindingDestination(inboundName)); + String[] bindingTargets = StringUtils.commaDelimitedListToStringArray( + this.bindingServiceProperties.getBindingDestination(inboundName)); - KStream stream = - streamsBuilder.stream(Arrays.asList(bindingTargets), - Consumed.with(keySerde, valueSerde) - .withOffsetResetPolicy(autoOffsetReset)); - final boolean nativeDecoding = this.bindingServiceProperties.getConsumerProperties(inboundName).isUseNativeDecoding(); + KStream stream = streamsBuilder.stream(Arrays.asList(bindingTargets), + Consumed.with(keySerde, valueSerde) + .withOffsetResetPolicy(autoOffsetReset)); + final boolean nativeDecoding = this.bindingServiceProperties + .getConsumerProperties(inboundName).isUseNativeDecoding(); if (nativeDecoding) { - LOG.info("Native decoding is enabled for " + inboundName + ". Inbound deserialization done at the broker."); + LOG.info("Native decoding is enabled for " + inboundName + + ". Inbound deserialization done at the broker."); } else { - LOG.info("Native decoding is disabled for " + inboundName + ". Inbound message conversion done by Spring Cloud Stream."); + LOG.info("Native decoding is disabled for " + inboundName + + ". Inbound message conversion done by Spring Cloud Stream."); } stream = stream.mapValues((value) -> { @@ -426,72 +498,93 @@ class KafkaStreamsStreamListenerSetupMethodOrchestrator implements StreamListene return stream; } - private void enableNativeDecodingForKTableAlways(Class parameterType, BindingProperties bindingProperties) { - if (parameterType.isAssignableFrom(KTable.class) || parameterType.isAssignableFrom(GlobalKTable.class)) { + private void enableNativeDecodingForKTableAlways(Class parameterType, + BindingProperties bindingProperties) { + if (parameterType.isAssignableFrom(KTable.class) + || parameterType.isAssignableFrom(GlobalKTable.class)) { if (bindingProperties.getConsumer() == null) { bindingProperties.setConsumer(new ConsumerProperties()); } - //No framework level message conversion provided for KTable/GlobalKTable, its done by the broker. + // No framework level message conversion provided for KTable/GlobalKTable, its + // done by the broker. bindingProperties.getConsumer().setUseNativeDecoding(true); } } - @SuppressWarnings({"unchecked"}) - private void buildStreamsBuilderAndRetrieveConfig(Method method, ApplicationContext applicationContext, - String inboundName) { - ConfigurableListableBeanFactory beanFactory = this.applicationContext.getBeanFactory(); + @SuppressWarnings({ "unchecked" }) + private void buildStreamsBuilderAndRetrieveConfig(Method method, + ApplicationContext applicationContext, String inboundName) { + ConfigurableListableBeanFactory beanFactory = this.applicationContext + .getBeanFactory(); - Map streamConfigGlobalProperties = applicationContext.getBean("streamConfigGlobalProperties", Map.class); + Map streamConfigGlobalProperties = applicationContext + .getBean("streamConfigGlobalProperties", Map.class); - KafkaStreamsConsumerProperties extendedConsumerProperties = this.kafkaStreamsExtendedBindingProperties.getExtendedConsumerProperties(inboundName); - streamConfigGlobalProperties.putAll(extendedConsumerProperties.getConfiguration()); + KafkaStreamsConsumerProperties extendedConsumerProperties = this.kafkaStreamsExtendedBindingProperties + .getExtendedConsumerProperties(inboundName); + streamConfigGlobalProperties + .putAll(extendedConsumerProperties.getConfiguration()); String applicationId = extendedConsumerProperties.getApplicationId(); - //override application.id if set at the individual binding level. + // override application.id if set at the individual binding level. if (StringUtils.hasText(applicationId)) { - streamConfigGlobalProperties.put(StreamsConfig.APPLICATION_ID_CONFIG, applicationId); + streamConfigGlobalProperties.put(StreamsConfig.APPLICATION_ID_CONFIG, + applicationId); } - int concurrency = this.bindingServiceProperties.getConsumerProperties(inboundName).getConcurrency(); + int concurrency = this.bindingServiceProperties.getConsumerProperties(inboundName) + .getConcurrency(); // override concurrency if set at the individual binding level. if (concurrency > 1) { - streamConfigGlobalProperties.put(StreamsConfig.NUM_STREAM_THREADS_CONFIG, concurrency); + streamConfigGlobalProperties.put(StreamsConfig.NUM_STREAM_THREADS_CONFIG, + concurrency); } - Map kafkaStreamsDlqDispatchers = applicationContext.getBean("kafkaStreamsDlqDispatchers", Map.class); + Map kafkaStreamsDlqDispatchers = applicationContext + .getBean("kafkaStreamsDlqDispatchers", Map.class); - KafkaStreamsConfiguration kafkaStreamsConfiguration = new KafkaStreamsConfiguration(streamConfigGlobalProperties) { + KafkaStreamsConfiguration kafkaStreamsConfiguration = new KafkaStreamsConfiguration( + streamConfigGlobalProperties) { @Override public Properties asProperties() { Properties properties = super.asProperties(); - properties.put(SendToDlqAndContinue.KAFKA_STREAMS_DLQ_DISPATCHERS, kafkaStreamsDlqDispatchers); + properties.put(SendToDlqAndContinue.KAFKA_STREAMS_DLQ_DISPATCHERS, + kafkaStreamsDlqDispatchers); return properties; } }; StreamsBuilderFactoryBean streamsBuilder = this.cleanupConfig == null ? new StreamsBuilderFactoryBean(kafkaStreamsConfiguration) - : new StreamsBuilderFactoryBean(kafkaStreamsConfiguration, this.cleanupConfig); + : new StreamsBuilderFactoryBean(kafkaStreamsConfiguration, + this.cleanupConfig); streamsBuilder.setAutoStartup(false); - BeanDefinition streamsBuilderBeanDefinition = - BeanDefinitionBuilder.genericBeanDefinition((Class) streamsBuilder.getClass(), () -> streamsBuilder) - .getRawBeanDefinition(); - ((BeanDefinitionRegistry) beanFactory).registerBeanDefinition("stream-builder-" + method.getName(), streamsBuilderBeanDefinition); - StreamsBuilderFactoryBean streamsBuilderX = applicationContext.getBean("&stream-builder-" + method.getName(), StreamsBuilderFactoryBean.class); + BeanDefinition streamsBuilderBeanDefinition = BeanDefinitionBuilder + .genericBeanDefinition( + (Class) streamsBuilder.getClass(), + () -> streamsBuilder) + .getRawBeanDefinition(); + ((BeanDefinitionRegistry) beanFactory).registerBeanDefinition( + "stream-builder-" + method.getName(), streamsBuilderBeanDefinition); + StreamsBuilderFactoryBean streamsBuilderX = applicationContext.getBean( + "&stream-builder-" + method.getName(), StreamsBuilderFactoryBean.class); this.methodStreamsBuilderFactoryBeanMap.put(method, streamsBuilderX); } @Override - public final void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + public final void setApplicationContext(ApplicationContext applicationContext) + throws BeansException { this.applicationContext = (ConfigurableApplicationContext) applicationContext; } - private void validateStreamListenerMethod(StreamListener streamListener, Method method, String[] methodAnnotatedOutboundNames) { + private void validateStreamListenerMethod(StreamListener streamListener, + Method method, String[] methodAnnotatedOutboundNames) { String methodAnnotatedInboundName = streamListener.value(); if (methodAnnotatedOutboundNames != null) { for (String s : methodAnnotatedOutboundNames) { if (StringUtils.hasText(s)) { - Assert.isTrue(isDeclarativeOutput(method, s), "Method must be declarative"); + Assert.isTrue(isDeclarativeOutput(method, s), + "Method must be declarative"); } } } @@ -499,8 +592,11 @@ class KafkaStreamsStreamListenerSetupMethodOrchestrator implements StreamListene int methodArgumentsLength = method.getParameterTypes().length; for (int parameterIndex = 0; parameterIndex < methodArgumentsLength; parameterIndex++) { - MethodParameter methodParameter = MethodParameter.forExecutable(method, parameterIndex); - Assert.isTrue(isDeclarativeInput(methodAnnotatedInboundName, methodParameter), "Method must be declarative"); + MethodParameter methodParameter = MethodParameter.forExecutable(method, + parameterIndex); + Assert.isTrue( + isDeclarativeInput(methodAnnotatedInboundName, methodParameter), + "Method must be declarative"); } } } @@ -512,7 +608,8 @@ class KafkaStreamsStreamListenerSetupMethodOrchestrator implements StreamListene if (returnType.isArray()) { Class targetBeanClass = this.applicationContext.getType(targetBeanName); declarative = this.streamListenerResultAdapters.stream() - .anyMatch((slpa) -> slpa.supports(returnType.getComponentType(), targetBeanClass)); + .anyMatch((slpa) -> slpa.supports(returnType.getComponentType(), + targetBeanClass)); return declarative; } Class targetBeanClass = this.applicationContext.getType(targetBeanName); @@ -522,10 +619,13 @@ class KafkaStreamsStreamListenerSetupMethodOrchestrator implements StreamListene } @SuppressWarnings("unchecked") - private boolean isDeclarativeInput(String targetBeanName, MethodParameter methodParameter) { - if (!methodParameter.getParameterType().isAssignableFrom(Object.class) && this.applicationContext.containsBean(targetBeanName)) { + private boolean isDeclarativeInput(String targetBeanName, + MethodParameter methodParameter) { + if (!methodParameter.getParameterType().isAssignableFrom(Object.class) + && this.applicationContext.containsBean(targetBeanName)) { Class targetBeanClass = this.applicationContext.getType(targetBeanName); - return this.streamListenerParameterAdapter.supports(targetBeanClass, methodParameter); + return this.streamListenerParameterAdapter.supports(targetBeanClass, + methodParameter); } return false; } @@ -533,16 +633,19 @@ class KafkaStreamsStreamListenerSetupMethodOrchestrator implements StreamListene private static String[] getOutboundBindingTargetNames(Method method) { SendTo sendTo = AnnotationUtils.findAnnotation(method, SendTo.class); if (sendTo != null) { - Assert.isTrue(!ObjectUtils.isEmpty(sendTo.value()), StreamListenerErrorMessages.ATLEAST_ONE_OUTPUT); - Assert.isTrue(sendTo.value().length >= 1, "At least one outbound destination need to be provided."); + Assert.isTrue(!ObjectUtils.isEmpty(sendTo.value()), + StreamListenerErrorMessages.ATLEAST_ONE_OUTPUT); + Assert.isTrue(sendTo.value().length >= 1, + "At least one outbound destination need to be provided."); return sendTo.value(); } return null; } - @SuppressWarnings({"unchecked"}) + @SuppressWarnings({ "unchecked" }) private static KafkaStreamsStateStoreProperties buildStateStoreSpec(Method method) { - KafkaStreamsStateStore spec = AnnotationUtils.findAnnotation(method, KafkaStreamsStateStore.class); + KafkaStreamsStateStore spec = AnnotationUtils.findAnnotation(method, + KafkaStreamsStateStore.class); if (spec != null) { Assert.isTrue(!ObjectUtils.isEmpty(spec.name()), "name cannot be empty"); Assert.isTrue(spec.name().length() >= 1, "name cannot be empty."); @@ -559,4 +662,5 @@ class KafkaStreamsStreamListenerSetupMethodOrchestrator implements StreamListene } return null; } + } diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KeyValueSerdeResolver.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KeyValueSerdeResolver.java index 3ce9ac28e..0105def8c 100644 --- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KeyValueSerdeResolver.java +++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KeyValueSerdeResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,20 +32,23 @@ import org.springframework.util.StringUtils; /** * Resolver for key and value Serde. * - * On the inbound, if native decoding is enabled, then any deserialization on the value is handled by Kafka. - * First, we look for any key/value Serde set on the binding itself, if that is not available then look at the - * common Serde set at the global level. If that fails, it falls back to byte[]. - * If native decoding is disabled, then the binder will do the deserialization on value and ignore any Serde set for value - * and rely on the contentType provided. Keys are always deserialized at the broker. + * On the inbound, if native decoding is enabled, then any deserialization on the value is + * handled by Kafka. First, we look for any key/value Serde set on the binding itself, if + * that is not available then look at the common Serde set at the global level. If that + * fails, it falls back to byte[]. If native decoding is disabled, then the binder will do + * the deserialization on value and ignore any Serde set for value and rely on the + * contentType provided. Keys are always deserialized at the broker. * * - * Same rules apply on the outbound. If native encoding is enabled, then value serialization is done at the broker using - * any binder level Serde for value, if not using common Serde, if not, then byte[]. - * If native encoding is disabled, then the binder will do serialization using a contentType. Keys are always serialized - * by the broker. + * Same rules apply on the outbound. If native encoding is enabled, then value + * serialization is done at the broker using any binder level Serde for value, if not + * using common Serde, if not, then byte[]. If native encoding is disabled, then the + * binder will do serialization using a contentType. Keys are always serialized by the + * broker. * * For state store, use serdes class specified in - * {@link org.springframework.cloud.stream.binder.kafka.streams.annotations.KafkaStreamsStateStore} to create Serde accordingly. + * {@link org.springframework.cloud.stream.binder.kafka.streams.annotations.KafkaStreamsStateStore} + * to create Serde accordingly. * * @author Soby Chacko * @author Lei Chen @@ -57,18 +60,19 @@ class KeyValueSerdeResolver { private final KafkaStreamsBinderConfigurationProperties binderConfigurationProperties; KeyValueSerdeResolver(Map streamConfigGlobalProperties, - KafkaStreamsBinderConfigurationProperties binderConfigurationProperties) { + KafkaStreamsBinderConfigurationProperties binderConfigurationProperties) { this.streamConfigGlobalProperties = streamConfigGlobalProperties; this.binderConfigurationProperties = binderConfigurationProperties; } /** * Provide the {@link Serde} for inbound key. - * - * @param extendedConsumerProperties binding level extended {@link KafkaStreamsConsumerProperties} + * @param extendedConsumerProperties binding level extended + * {@link KafkaStreamsConsumerProperties} * @return configurd {@link Serde} for the inbound key. */ - public Serde getInboundKeySerde(KafkaStreamsConsumerProperties extendedConsumerProperties) { + public Serde getInboundKeySerde( + KafkaStreamsConsumerProperties extendedConsumerProperties) { String keySerdeString = extendedConsumerProperties.getKeySerde(); return getKeySerde(keySerdeString); @@ -76,18 +80,18 @@ class KeyValueSerdeResolver { /** * Provide the {@link Serde} for inbound value. - * * @param consumerProperties {@link ConsumerProperties} on binding - * @param extendedConsumerProperties binding level extended {@link KafkaStreamsConsumerProperties} + * @param extendedConsumerProperties binding level extended + * {@link KafkaStreamsConsumerProperties} * @return configurd {@link Serde} for the inbound value. */ - public Serde getInboundValueSerde(ConsumerProperties consumerProperties, KafkaStreamsConsumerProperties extendedConsumerProperties) { + public Serde getInboundValueSerde(ConsumerProperties consumerProperties, + KafkaStreamsConsumerProperties extendedConsumerProperties) { Serde valueSerde; String valueSerdeString = extendedConsumerProperties.getValueSerde(); try { - if (consumerProperties != null && - consumerProperties.isUseNativeDecoding()) { + if (consumerProperties != null && consumerProperties.isUseNativeDecoding()) { valueSerde = getValueSerde(valueSerdeString); } else { @@ -103,7 +107,6 @@ class KeyValueSerdeResolver { /** * Provide the {@link Serde} for outbound key. - * * @param properties binding level extended {@link KafkaStreamsProducerProperties} * @return configurd {@link Serde} for the outbound key. */ @@ -113,16 +116,18 @@ class KeyValueSerdeResolver { /** * Provide the {@link Serde} for outbound value. - * * @param producerProperties {@link ProducerProperties} on binding - * @param kafkaStreamsProducerProperties binding level extended {@link KafkaStreamsProducerProperties} + * @param kafkaStreamsProducerProperties binding level extended + * {@link KafkaStreamsProducerProperties} * @return configurd {@link Serde} for the outbound value. */ - public Serde getOutboundValueSerde(ProducerProperties producerProperties, KafkaStreamsProducerProperties kafkaStreamsProducerProperties) { + public Serde getOutboundValueSerde(ProducerProperties producerProperties, + KafkaStreamsProducerProperties kafkaStreamsProducerProperties) { Serde valueSerde; try { if (producerProperties.isUseNativeEncoding()) { - valueSerde = getValueSerde(kafkaStreamsProducerProperties.getValueSerde()); + valueSerde = getValueSerde( + kafkaStreamsProducerProperties.getValueSerde()); } else { valueSerde = Serdes.ByteArray(); @@ -137,7 +142,6 @@ class KeyValueSerdeResolver { /** * Provide the {@link Serde} for state store. - * * @param keySerdeString serde class used for key * @return {@link Serde} for the state store key. */ @@ -147,7 +151,6 @@ class KeyValueSerdeResolver { /** * Provide the {@link Serde} for state store value. - * * @param valueSerdeString serde class used for value * @return {@link Serde} for the state store value. */ @@ -167,8 +170,12 @@ class KeyValueSerdeResolver { keySerde = Utils.newInstance(keySerdeString, Serde.class); } else { - keySerde = this.binderConfigurationProperties.getConfiguration().containsKey("default.key.serde") ? - Utils.newInstance(this.binderConfigurationProperties.getConfiguration().get("default.key.serde"), Serde.class) : Serdes.ByteArray(); + keySerde = this.binderConfigurationProperties.getConfiguration() + .containsKey("default.key.serde") + ? Utils.newInstance(this.binderConfigurationProperties + .getConfiguration().get("default.key.serde"), + Serde.class) + : Serdes.ByteArray(); } keySerde.configure(this.streamConfigGlobalProperties, true); @@ -179,15 +186,21 @@ class KeyValueSerdeResolver { return keySerde; } - private Serde getValueSerde(String valueSerdeString) throws ClassNotFoundException { + private Serde getValueSerde(String valueSerdeString) + throws ClassNotFoundException { Serde valueSerde; if (StringUtils.hasText(valueSerdeString)) { valueSerde = Utils.newInstance(valueSerdeString, Serde.class); } else { - valueSerde = this.binderConfigurationProperties.getConfiguration().containsKey("default.value.serde") ? - Utils.newInstance(this.binderConfigurationProperties.getConfiguration().get("default.value.serde"), Serde.class) : Serdes.ByteArray(); + valueSerde = this.binderConfigurationProperties.getConfiguration() + .containsKey("default.value.serde") + ? Utils.newInstance(this.binderConfigurationProperties + .getConfiguration().get("default.value.serde"), + Serde.class) + : Serdes.ByteArray(); } return valueSerde; } + } diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/QueryableStoreRegistry.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/QueryableStoreRegistry.java index 70f09c81e..a34d65b8e 100644 --- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/QueryableStoreRegistry.java +++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/QueryableStoreRegistry.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,8 +21,8 @@ import org.apache.kafka.streams.errors.InvalidStateStoreException; import org.apache.kafka.streams.state.QueryableStoreType; /** - * Registry that contains {@link QueryableStoreType}s those created from - * the user applications. + * Registry that contains {@link QueryableStoreType}s those created from the user + * applications. * * @author Soby Chacko * @author Renwei Han @@ -39,14 +39,15 @@ public class QueryableStoreRegistry { /** * Retrieve and return a queryable store by name created in the application. - * * @param storeName name of the queryable store * @param storeType type of the queryable store - * @param generic queryable store + * @param generic queryable store * @return queryable store. - * @deprecated in favor of {@link InteractiveQueryService#getQueryableStore(String, QueryableStoreType)} + * @deprecated in favor of + * {@link InteractiveQueryService#getQueryableStore(String, QueryableStoreType)} */ - public T getQueryableStoreType(String storeName, QueryableStoreType storeType) { + public T getQueryableStoreType(String storeName, + QueryableStoreType storeType) { for (KafkaStreams kafkaStream : this.kafkaStreamsRegistry.getKafkaStreams()) { try { @@ -56,7 +57,7 @@ public class QueryableStoreRegistry { } } catch (InvalidStateStoreException ignored) { - //pass through + // pass through } } return null; diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/SendToDlqAndContinue.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/SendToDlqAndContinue.java index ed300eafd..ceae494dc 100644 --- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/SendToDlqAndContinue.java +++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/SendToDlqAndContinue.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,8 +32,8 @@ import org.apache.kafka.streams.processor.internals.StreamTask; import org.springframework.util.ReflectionUtils; /** - * Custom implementation for {@link DeserializationExceptionHandler} that sends the records - * in error to a DLQ topic, then continue stream processing on new records. + * Custom implementation for {@link DeserializationExceptionHandler} that sends the + * records in error to a DLQ topic, then continue stream processing on new records. * * @author Soby Chacko * @since 2.0.0 @@ -46,14 +46,13 @@ public class SendToDlqAndContinue implements DeserializationExceptionHandler { public static final String KAFKA_STREAMS_DLQ_DISPATCHERS = "spring.cloud.stream.kafka.streams.dlq.dispatchers"; /** - * DLQ dispatcher per topic in the application context. The key here is not the actual DLQ topic - * but the incoming topic that caused the error. + * DLQ dispatcher per topic in the application context. The key here is not the actual + * DLQ topic but the incoming topic that caused the error. */ private Map dlqDispatchers = new HashMap<>(); /** * For a given topic, send the key/value record to DLQ topic. - * * @param topic incoming topic that caused the error * @param key to send * @param value to send @@ -66,16 +65,23 @@ public class SendToDlqAndContinue implements DeserializationExceptionHandler { @Override @SuppressWarnings("unchecked") - public DeserializationHandlerResponse handle(ProcessorContext context, ConsumerRecord record, Exception exception) { - KafkaStreamsDlqDispatch kafkaStreamsDlqDispatch = this.dlqDispatchers.get(record.topic()); - kafkaStreamsDlqDispatch.sendToDlq(record.key(), record.value(), record.partition()); + public DeserializationHandlerResponse handle(ProcessorContext context, + ConsumerRecord record, Exception exception) { + KafkaStreamsDlqDispatch kafkaStreamsDlqDispatch = this.dlqDispatchers + .get(record.topic()); + kafkaStreamsDlqDispatch.sendToDlq(record.key(), record.value(), + record.partition()); context.commit(); - // The following conditional block should be reconsidered when we have a solution for this SO problem: + // The following conditional block should be reconsidered when we have a solution + // for this SO problem: // https://stackoverflow.com/questions/48470899/kafka-streams-deserialization-handler - // Currently it seems like when deserialization error happens, there is no commits happening and the - // following code will use reflection to get access to the underlying KafkaConsumer. - // It works with Kafka 1.0.0, but there is no guarantee it will work in future versions of kafka as + // Currently it seems like when deserialization error happens, there is no commits + // happening and the + // following code will use reflection to get access to the underlying + // KafkaConsumer. + // It works with Kafka 1.0.0, but there is no guarantee it will work in future + // versions of kafka as // we access private fields by name using reflection, but it is a temporary fix. if (context instanceof ProcessorContextImpl) { ProcessorContextImpl processorContextImpl = (ProcessorContextImpl) context; @@ -87,11 +93,13 @@ public class SendToDlqAndContinue implements DeserializationExceptionHandler { StreamTask streamTask = (StreamTask) taskField; Field consumer = ReflectionUtils.findField(StreamTask.class, "consumer"); ReflectionUtils.makeAccessible(consumer); - Object kafkaConsumerField = ReflectionUtils.getField(consumer, streamTask); + Object kafkaConsumerField = ReflectionUtils.getField(consumer, + streamTask); if (kafkaConsumerField.getClass().isAssignableFrom(KafkaConsumer.class)) { KafkaConsumer kafkaConsumer = (KafkaConsumer) kafkaConsumerField; final Map consumedOffsetsAndMetadata = new HashMap<>(); - TopicPartition tp = new TopicPartition(record.topic(), record.partition()); + TopicPartition tp = new TopicPartition(record.topic(), + record.partition()); OffsetAndMetadata oam = new OffsetAndMetadata(record.offset() + 1); consumedOffsetsAndMetadata.put(tp, oam); kafkaConsumer.commitSync(consumedOffsetsAndMetadata); @@ -104,10 +112,12 @@ public class SendToDlqAndContinue implements DeserializationExceptionHandler { @Override @SuppressWarnings("unchecked") public void configure(Map configs) { - this.dlqDispatchers = (Map) configs.get(KAFKA_STREAMS_DLQ_DISPATCHERS); + this.dlqDispatchers = (Map) configs + .get(KAFKA_STREAMS_DLQ_DISPATCHERS); } - void addKStreamDlqDispatch(String topic, KafkaStreamsDlqDispatch kafkaStreamsDlqDispatch) { + void addKStreamDlqDispatch(String topic, + KafkaStreamsDlqDispatch kafkaStreamsDlqDispatch) { this.dlqDispatchers.put(topic, kafkaStreamsDlqDispatch); } diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/StreamsBuilderFactoryManager.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/StreamsBuilderFactoryManager.java index f34bfb4cd..528913f68 100644 --- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/StreamsBuilderFactoryManager.java +++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/StreamsBuilderFactoryManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,13 +23,13 @@ import org.springframework.kafka.KafkaException; import org.springframework.kafka.config.StreamsBuilderFactoryBean; /** - * Iterate through all {@link StreamsBuilderFactoryBean} in the application context - * and start them. As each one completes starting, register the associated KafkaStreams - * object into {@link QueryableStoreRegistry}. + * Iterate through all {@link StreamsBuilderFactoryBean} in the application context and + * start them. As each one completes starting, register the associated KafkaStreams object + * into {@link QueryableStoreRegistry}. * - * This {@link SmartLifecycle} class ensures that the bean created from it is started very late - * through the bootstrap process by setting the phase value closer to Integer.MAX_VALUE. - * This is to guarantee that the {@link StreamsBuilderFactoryBean} on a + * This {@link SmartLifecycle} class ensures that the bean created from it is started very + * late through the bootstrap process by setting the phase value closer to + * Integer.MAX_VALUE. This is to guarantee that the {@link StreamsBuilderFactoryBean} on a * {@link org.springframework.cloud.stream.annotation.StreamListener} method with multiple * bindings is only started after all the binding phases have completed successfully. * @@ -38,12 +38,14 @@ import org.springframework.kafka.config.StreamsBuilderFactoryBean; class StreamsBuilderFactoryManager implements SmartLifecycle { private final KafkaStreamsBindingInformationCatalogue kafkaStreamsBindingInformationCatalogue; + private final KafkaStreamsRegistry kafkaStreamsRegistry; private volatile boolean running; - StreamsBuilderFactoryManager(KafkaStreamsBindingInformationCatalogue kafkaStreamsBindingInformationCatalogue, - KafkaStreamsRegistry kafkaStreamsRegistry) { + StreamsBuilderFactoryManager( + KafkaStreamsBindingInformationCatalogue kafkaStreamsBindingInformationCatalogue, + KafkaStreamsRegistry kafkaStreamsRegistry) { this.kafkaStreamsBindingInformationCatalogue = kafkaStreamsBindingInformationCatalogue; this.kafkaStreamsRegistry = kafkaStreamsRegistry; } @@ -65,10 +67,12 @@ class StreamsBuilderFactoryManager implements SmartLifecycle { public synchronized void start() { if (!this.running) { try { - Set streamsBuilderFactoryBeans = this.kafkaStreamsBindingInformationCatalogue.getStreamsBuilderFactoryBeans(); + Set streamsBuilderFactoryBeans = this.kafkaStreamsBindingInformationCatalogue + .getStreamsBuilderFactoryBeans(); for (StreamsBuilderFactoryBean streamsBuilderFactoryBean : streamsBuilderFactoryBeans) { streamsBuilderFactoryBean.start(); - this.kafkaStreamsRegistry.registerKafkaStreams(streamsBuilderFactoryBean.getKafkaStreams()); + this.kafkaStreamsRegistry.registerKafkaStreams( + streamsBuilderFactoryBean.getKafkaStreams()); } this.running = true; } @@ -79,21 +83,22 @@ class StreamsBuilderFactoryManager implements SmartLifecycle { } @Override - public synchronized void stop() { - if (this.running) { - try { - Set streamsBuilderFactoryBeans = this.kafkaStreamsBindingInformationCatalogue.getStreamsBuilderFactoryBeans(); - for (StreamsBuilderFactoryBean streamsBuilderFactoryBean : streamsBuilderFactoryBeans) { - streamsBuilderFactoryBean.stop(); - } - } - catch (Exception ex) { - throw new IllegalStateException(ex); - } - finally { - this.running = false; + public synchronized void stop() { + if (this.running) { + try { + Set streamsBuilderFactoryBeans = this.kafkaStreamsBindingInformationCatalogue + .getStreamsBuilderFactoryBeans(); + for (StreamsBuilderFactoryBean streamsBuilderFactoryBean : streamsBuilderFactoryBeans) { + streamsBuilderFactoryBean.stop(); } } + catch (Exception ex) { + throw new IllegalStateException(ex); + } + finally { + this.running = false; + } + } } @Override diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/annotations/KafkaStreamsProcessor.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/annotations/KafkaStreamsProcessor.java index 43b44de4e..b37c3c517 100644 --- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/annotations/KafkaStreamsProcessor.java +++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/annotations/KafkaStreamsProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 the original author or authors. + * Copyright 2017-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,12 +24,14 @@ import org.springframework.cloud.stream.annotation.Output; /** * Bindable interface for {@link KStream} input and output. * - * This interface can be used as a bindable interface with {@link org.springframework.cloud.stream.annotation.EnableBinding} - * when both input and output types are single KStream. In other scenarios where multiple types are required, other - * similar bindable interfaces can be created and used. For example, there are cases in which multiple KStreams - * are required on the outbound in the case of KStream branching or multiple input types are required either in the - * form of multiple KStreams and a combination of KStreams and KTables. In those cases, new bindable interfaces compatible - * with the requirements must be created. Here are some examples. + * This interface can be used as a bindable interface with + * {@link org.springframework.cloud.stream.annotation.EnableBinding} when both input and + * output types are single KStream. In other scenarios where multiple types are required, + * other similar bindable interfaces can be created and used. For example, there are cases + * in which multiple KStreams are required on the outbound in the case of KStream + * branching or multiple input types are required either in the form of multiple KStreams + * and a combination of KStreams and KTables. In those cases, new bindable interfaces + * compatible with the requirements must be created. Here are some examples. * *
  *     interface KStreamBranchProcessor {
@@ -73,7 +75,6 @@ public interface KafkaStreamsProcessor {
 
 	/**
 	 * Input binding.
-	 *
 	 * @return {@link Input} binding for {@link KStream} type.
 	 */
 	@Input("input")
@@ -81,9 +82,9 @@ public interface KafkaStreamsProcessor {
 
 	/**
 	 * Output binding.
-	 *
 	 * @return {@link Output} binding for {@link KStream} type.
 	 */
 	@Output("output")
 	KStream output();
+
 }
diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/annotations/KafkaStreamsStateStore.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/annotations/KafkaStreamsStateStore.java
index d6897df3e..1bdf152af 100644
--- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/annotations/KafkaStreamsStateStore.java
+++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/annotations/KafkaStreamsStateStore.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2018 the original author or authors.
+ * Copyright 2018-2019 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -16,7 +16,6 @@
 
 package org.springframework.cloud.stream.binder.kafka.streams.annotations;
 
-
 import java.lang.annotation.ElementType;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
@@ -27,21 +26,23 @@ import org.springframework.cloud.stream.binder.kafka.streams.properties.KafkaStr
 /**
  * Interface for Kafka Stream state store.
  *
- * This interface can be used to inject a state store specification into KStream building process so
- * that the desired store can be built by StreamBuilder and added to topology for later use by processors.
- * This is particularly useful when need to combine stream DSL with low level processor APIs. In those cases,
- * if a writable state store is desired in processors, it needs to be created using this annotation.
- * Here is the example.
+ * This interface can be used to inject a state store specification into KStream building
+ * process so that the desired store can be built by StreamBuilder and added to topology
+ * for later use by processors. This is particularly useful when need to combine stream
+ * DSL with low level processor APIs. In those cases, if a writable state store is desired
+ * in processors, it needs to be created using this annotation. Here is the example.
  *
  * 
  *     @StreamListener("input")
- *     @KafkaStreamsStateStore(name="mystate", type= KafkaStreamsStateStoreProperties.StoreType.WINDOW, size=300000)
+ *     @KafkaStreamsStateStore(name="mystate", type= KafkaStreamsStateStoreProperties.StoreType.WINDOW,
+ *     								size=300000)
  *	   public void process(KStream<Object, Product> input) {
  *         ......
  *     }
  * 
* - * With that, you should be able to read/write this state store in your processor/transformer code. + * With that, you should be able to read/write this state store in your + * processor/transformer code. * *
  * 		new Processor<Object, Product>() {
@@ -64,57 +65,51 @@ public @interface KafkaStreamsStateStore {
 
 	/**
 	 * Provides name of the state store.
-	 *
 	 * @return name of state store.
 	 */
 	String name() default "";
 
 	/**
 	 * State store type.
-	 *
 	 * @return {@link KafkaStreamsStateStoreProperties.StoreType} of state store.
 	 */
 	KafkaStreamsStateStoreProperties.StoreType type() default KafkaStreamsStateStoreProperties.StoreType.KEYVALUE;
 
 	/**
 	 * Serde used for key.
-	 *
 	 * @return key serde of state store.
 	 */
 	String keySerde() default "org.apache.kafka.common.serialization.Serdes$StringSerde";
 
 	/**
 	 * Serde used for value.
-	 *
 	 * @return value serde of state store.
 	 */
 	String valueSerde() default "org.apache.kafka.common.serialization.Serdes$StringSerde";
 
 	/**
 	 * Length in milli-second of Windowed store window.
-	 *
 	 * @return length in milli-second of window(for windowed store).
 	 */
 	long lengthMs() default 0;
 
 	/**
 	 * Retention period for Windowed store windows.
-	 *
-	 * @return the maximum period of time in milli-second to keep each window in this store(for windowed store).
+	 * @return the maximum period of time in milli-second to keep each window in this
+	 * store(for windowed store).
 	 */
 	long retentionMs() default 0;
 
 	/**
 	 * Whether catching is enabled or not.
-	 *
 	 * @return whether caching should be enabled on the created store.
 	 */
 	boolean cache() default false;
 
 	/**
 	 * Whether logging is enabled or not.
-	 *
 	 * @return whether logging should be enabled on the created store.
 	 */
 	boolean logging() default true;
+
 }
diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/properties/KafkaStreamsApplicationSupportProperties.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/properties/KafkaStreamsApplicationSupportProperties.java
index 08296784a..efde606cf 100644
--- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/properties/KafkaStreamsApplicationSupportProperties.java
+++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/properties/KafkaStreamsApplicationSupportProperties.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017 the original author or authors.
+ * Copyright 2017-2019 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -19,9 +19,10 @@ package org.springframework.cloud.stream.binder.kafka.streams.properties;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
- * {@link ConfigurationProperties} that can be used by end user Kafka Stream applications. This class provides
- * convenient ways to access the commonly used kafka stream properties from the user application. For example, windowing
- * operations are common use cases in stream processing and one can provide window specific properties at runtime and use
+ * {@link ConfigurationProperties} that can be used by end user Kafka Stream applications.
+ * This class provides convenient ways to access the commonly used kafka stream properties
+ * from the user application. For example, windowing operations are common use cases in
+ * stream processing and one can provide window specific properties at runtime and use
  * those properties in the applications using this class.
  *
  * @author Soby Chacko
@@ -63,5 +64,7 @@ public class KafkaStreamsApplicationSupportProperties {
 		public void setAdvanceBy(int advanceBy) {
 			this.advanceBy = advanceBy;
 		}
+
 	}
+
 }
diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/properties/KafkaStreamsBinderConfigurationProperties.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/properties/KafkaStreamsBinderConfigurationProperties.java
index 9a9a235db..a1fd4a832 100644
--- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/properties/KafkaStreamsBinderConfigurationProperties.java
+++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/properties/KafkaStreamsBinderConfigurationProperties.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2018 the original author or authors.
+ * Copyright 2018-2019 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -25,7 +25,8 @@ import org.springframework.cloud.stream.binder.kafka.properties.KafkaBinderConfi
  * @author Soby Chacko
  * @author Gary Russell
  */
-public class KafkaStreamsBinderConfigurationProperties extends KafkaBinderConfigurationProperties {
+public class KafkaStreamsBinderConfigurationProperties
+		extends KafkaBinderConfigurationProperties {
 
 	public KafkaStreamsBinderConfigurationProperties(KafkaProperties kafkaProperties) {
 		super(kafkaProperties);
@@ -35,6 +36,7 @@ public class KafkaStreamsBinderConfigurationProperties extends KafkaBinderConfig
 	 * Enumeration for various Serde errors.
 	 */
 	public enum SerdeError {
+
 		/**
 		 * Deserialization error handler with log and continue.
 		 */
@@ -47,6 +49,7 @@ public class KafkaStreamsBinderConfigurationProperties extends KafkaBinderConfig
 		 * Deserialization error handler with DLQ send.
 		 */
 		sendToDlq
+
 	}
 
 	private String applicationId;
@@ -60,9 +63,10 @@ public class KafkaStreamsBinderConfigurationProperties extends KafkaBinderConfig
 	}
 
 	/**
-	 * {@link org.apache.kafka.streams.errors.DeserializationExceptionHandler} to use
-	 * when there is a Serde error. {@link KafkaStreamsBinderConfigurationProperties.SerdeError}
-	 * values are used to provide the exception handler on consumer binding.
+	 * {@link org.apache.kafka.streams.errors.DeserializationExceptionHandler} to use when
+	 * there is a Serde error.
+	 * {@link KafkaStreamsBinderConfigurationProperties.SerdeError} values are used to
+	 * provide the exception handler on consumer binding.
 	 */
 	private KafkaStreamsBinderConfigurationProperties.SerdeError serdeError;
 
@@ -70,7 +74,8 @@ public class KafkaStreamsBinderConfigurationProperties extends KafkaBinderConfig
 		return this.serdeError;
 	}
 
-	public void setSerdeError(KafkaStreamsBinderConfigurationProperties.SerdeError serdeError) {
+	public void setSerdeError(
+			KafkaStreamsBinderConfigurationProperties.SerdeError serdeError) {
 		this.serdeError = serdeError;
 	}
 
diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/properties/KafkaStreamsBindingProperties.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/properties/KafkaStreamsBindingProperties.java
index eb921cb73..082035ca0 100644
--- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/properties/KafkaStreamsBindingProperties.java
+++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/properties/KafkaStreamsBindingProperties.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017 the original author or authors.
+ * Copyright 2017-2019 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -19,7 +19,8 @@ package org.springframework.cloud.stream.binder.kafka.streams.properties;
 import org.springframework.cloud.stream.binder.BinderSpecificPropertiesProvider;
 
 /**
- * Extended binding properties holder that delegates to Kafka Streams producer and consumer properties.
+ * Extended binding properties holder that delegates to Kafka Streams producer and
+ * consumer properties.
  *
  * @author Marius Bogoevici
  */
@@ -44,4 +45,5 @@ public class KafkaStreamsBindingProperties implements BinderSpecificPropertiesPr
 	public void setProducer(KafkaStreamsProducerProperties producer) {
 		this.producer = producer;
 	}
+
 }
diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/properties/KafkaStreamsConsumerProperties.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/properties/KafkaStreamsConsumerProperties.java
index 678833c1d..d0a4c45cf 100644
--- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/properties/KafkaStreamsConsumerProperties.java
+++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/properties/KafkaStreamsConsumerProperties.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017 the original author or authors.
+ * Copyright 2017-2019 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/properties/KafkaStreamsExtendedBindingProperties.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/properties/KafkaStreamsExtendedBindingProperties.java
index 967af4184..dce595454 100644
--- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/properties/KafkaStreamsExtendedBindingProperties.java
+++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/properties/KafkaStreamsExtendedBindingProperties.java
@@ -19,16 +19,21 @@ package org.springframework.cloud.stream.binder.kafka.streams.properties;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.cloud.stream.binder.AbstractExtendedBindingProperties;
 import org.springframework.cloud.stream.binder.BinderSpecificPropertiesProvider;
+
 /**
- * Kafka streams specific extended binding properties class that extends from {@link AbstractExtendedBindingProperties}.
+ * Kafka streams specific extended binding properties class that extends from
+ * {@link AbstractExtendedBindingProperties}.
  *
  * @author Marius Bogoevici
  * @author Oleg Zhurakousky
  */
 @ConfigurationProperties("spring.cloud.stream.kafka.streams")
 public class KafkaStreamsExtendedBindingProperties
-		extends AbstractExtendedBindingProperties {
+		// @checkstyle:off
+		extends
+		AbstractExtendedBindingProperties {
 
+	// @checkstyle:on
 	private static final String DEFAULTS_PREFIX = "spring.cloud.stream.kafka.streams.default";
 
 	@Override
@@ -40,4 +45,5 @@ public class KafkaStreamsExtendedBindingProperties
 	public Class getExtendedPropertiesEntryClass() {
 		return KafkaStreamsBindingProperties.class;
 	}
+
 }
diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/properties/KafkaStreamsProducerProperties.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/properties/KafkaStreamsProducerProperties.java
index eb9af0c67..f58935a56 100644
--- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/properties/KafkaStreamsProducerProperties.java
+++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/properties/KafkaStreamsProducerProperties.java
@@ -51,4 +51,5 @@ public class KafkaStreamsProducerProperties extends KafkaProducerProperties {
 	public void setValueSerde(String valueSerde) {
 		this.valueSerde = valueSerde;
 	}
+
 }
diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/properties/KafkaStreamsStateStoreProperties.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/properties/KafkaStreamsStateStoreProperties.java
index 261ed7bbf..45b0d37de 100644
--- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/properties/KafkaStreamsStateStoreProperties.java
+++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/properties/KafkaStreamsStateStoreProperties.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2018 the original author or authors.
+ * Copyright 2018-2019 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -16,7 +16,6 @@
 
 package org.springframework.cloud.stream.binder.kafka.streams.properties;
 
-
 /**
  * Properties for Kafka Streams state store.
  *
@@ -28,6 +27,7 @@ public class KafkaStreamsStateStoreProperties {
 	 * Enumeration for store type.
 	 */
 	public enum StoreType {
+
 		/**
 		 * Key value store.
 		 */
@@ -51,8 +51,8 @@ public class KafkaStreamsStateStoreProperties {
 		public String toString() {
 			return this.type;
 		}
-	}
 
+	}
 
 	/**
 	 * Name for this state store.
@@ -94,7 +94,6 @@ public class KafkaStreamsStateStoreProperties {
 	 */
 	private boolean loggingDisabled;
 
-
 	public String getName() {
 		return this.name;
 	}
@@ -158,4 +157,5 @@ public class KafkaStreamsStateStoreProperties {
 	public void setLoggingDisabled(boolean loggingDisabled) {
 		this.loggingDisabled = loggingDisabled;
 	}
+
 }
diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/serde/CompositeNonNativeSerde.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/serde/CompositeNonNativeSerde.java
index f3f4807af..93ae3478a 100644
--- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/serde/CompositeNonNativeSerde.java
+++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/serde/CompositeNonNativeSerde.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2018 the original author or authors.
+ * Copyright 2018-2019 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -34,25 +34,28 @@ import org.springframework.util.MimeType;
 import org.springframework.util.MimeTypeUtils;
 
 /**
- * A {@link Serde} implementation that wraps the list of {@link MessageConverter}s
- * from {@link CompositeMessageConverterFactory}.
+ * A {@link Serde} implementation that wraps the list of {@link MessageConverter}s from
+ * {@link CompositeMessageConverterFactory}.
  *
  * The primary motivation for this class is to provide an avro based {@link Serde} that is
  * compatible with the schema registry that Spring Cloud Stream provides. When using the
- * schema registry support from Spring Cloud Stream in a Kafka Streams binder based application,
- * the applications can deserialize the incoming Kafka Streams records using the built in
- * Avro {@link MessageConverter}. However, this same message conversion approach will not work
- * downstream in other operations in the topology for Kafka Streams as some of them needs a
- * {@link Serde} instance that can talk to the Spring Cloud Stream provided Schema Registry.
- * This implementation will solve that problem.
+ * schema registry support from Spring Cloud Stream in a Kafka Streams binder based
+ * application, the applications can deserialize the incoming Kafka Streams records using
+ * the built in Avro {@link MessageConverter}. However, this same message conversion
+ * approach will not work downstream in other operations in the topology for Kafka Streams
+ * as some of them needs a {@link Serde} instance that can talk to the Spring Cloud Stream
+ * provided Schema Registry. This implementation will solve that problem.
  *
- * Only Avro and JSON based converters are exposed as binder provided {@link Serde} implementations currently.
+ * Only Avro and JSON based converters are exposed as binder provided {@link Serde}
+ * implementations currently.
  *
- * Users of this class must call the {@link CompositeNonNativeSerde#configure(Map, boolean)} method
- * to configure the {@link Serde} object. At the very least the configuration map must include a key
- * called "valueClass" to indicate the type of the target object for deserialization. If any other
- * content type other than JSON is needed (only Avro is available now other than JSON), that needs
- * to be included in the configuration map with the key "contentType". For example,
+ * Users of this class must call the
+ * {@link CompositeNonNativeSerde#configure(Map, boolean)} method to configure the
+ * {@link Serde} object. At the very least the configuration map must include a key called
+ * "valueClass" to indicate the type of the target object for deserialization. If any
+ * other content type other than JSON is needed (only Avro is available now other than
+ * JSON), that needs to be included in the configuration map with the key "contentType".
+ * For example,
  *
  * 
  * Map<String, Object> config = new HashMap<>();
@@ -62,14 +65,14 @@ import org.springframework.util.MimeTypeUtils;
  *
  * Then use the above map when calling the configure method.
  *
- * This class is only intended to be used when writing a Spring Cloud Stream Kafka Streams application
- * that uses Spring Cloud Stream schema registry for schema evolution.
+ * This class is only intended to be used when writing a Spring Cloud Stream Kafka Streams
+ * application that uses Spring Cloud Stream schema registry for schema evolution.
  *
- * An instance of this class is provided as a bean by the binder configuration and typically the applications
- * can autowire that bean. This is the expected usage pattern of this class.
+ * An instance of this class is provided as a bean by the binder configuration and
+ * typically the applications can autowire that bean. This is the expected usage pattern
+ * of this class.
  *
  * @param  type of the object to marshall
- *
  * @author Soby Chacko
  * @since 2.1
  */
@@ -79,15 +82,19 @@ public class CompositeNonNativeSerde implements Serde {
 
 	private static final String AVRO_FORMAT = "avro";
 
-	private static final MimeType DEFAULT_AVRO_MIME_TYPE = new MimeType("application", "*+" + AVRO_FORMAT);
+	private static final MimeType DEFAULT_AVRO_MIME_TYPE = new MimeType("application",
+			"*+" + AVRO_FORMAT);
 
 	private final CompositeNonNativeDeserializer compositeNonNativeDeserializer;
 
 	private final CompositeNonNativeSerializer compositeNonNativeSerializer;
 
-	public CompositeNonNativeSerde(CompositeMessageConverterFactory compositeMessageConverterFactory) {
-		this.compositeNonNativeDeserializer = new CompositeNonNativeDeserializer<>(compositeMessageConverterFactory);
-		this.compositeNonNativeSerializer = new CompositeNonNativeSerializer<>(compositeMessageConverterFactory);
+	public CompositeNonNativeSerde(
+			CompositeMessageConverterFactory compositeMessageConverterFactory) {
+		this.compositeNonNativeDeserializer = new CompositeNonNativeDeserializer<>(
+				compositeMessageConverterFactory);
+		this.compositeNonNativeSerializer = new CompositeNonNativeSerializer<>(
+				compositeMessageConverterFactory);
 	}
 
 	@Override
@@ -98,7 +105,7 @@ public class CompositeNonNativeSerde implements Serde {
 
 	@Override
 	public void close() {
-		//No-op
+		// No-op
 	}
 
 	@Override
@@ -142,15 +149,19 @@ public class CompositeNonNativeSerde implements Serde {
 
 		private Class valueClass;
 
-		CompositeNonNativeDeserializer(CompositeMessageConverterFactory compositeMessageConverterFactory) {
-			this.messageConverter = compositeMessageConverterFactory.getMessageConverterForAllRegistered();
+		CompositeNonNativeDeserializer(
+				CompositeMessageConverterFactory compositeMessageConverterFactory) {
+			this.messageConverter = compositeMessageConverterFactory
+					.getMessageConverterForAllRegistered();
 		}
 
 		@Override
 		public void configure(Map configs, boolean isKey) {
-			Assert.isTrue(configs.containsKey(VALUE_CLASS_HEADER), "Deserializers must provide a configuration for valueClass.");
+			Assert.isTrue(configs.containsKey(VALUE_CLASS_HEADER),
+					"Deserializers must provide a configuration for valueClass.");
 			final Object valueClass = configs.get(VALUE_CLASS_HEADER);
-			Assert.isTrue(valueClass instanceof Class, "Deserializers must provide a valid value for valueClass.");
+			Assert.isTrue(valueClass instanceof Class,
+					"Deserializers must provide a valid value for valueClass.");
 			this.valueClass = (Class) valueClass;
 			this.mimeType = resolveMimeType(configs);
 		}
@@ -159,16 +170,19 @@ public class CompositeNonNativeSerde implements Serde {
 		@Override
 		public U deserialize(String topic, byte[] data) {
 			Message message = MessageBuilder.withPayload(data)
-					.setHeader(MessageHeaders.CONTENT_TYPE, this.mimeType.toString()).build();
-			U messageConverted = (U) this.messageConverter.fromMessage(message, this.valueClass);
+					.setHeader(MessageHeaders.CONTENT_TYPE, this.mimeType.toString())
+					.build();
+			U messageConverted = (U) this.messageConverter.fromMessage(message,
+					this.valueClass);
 			Assert.notNull(messageConverted, "Deserialization failed.");
 			return messageConverted;
 		}
 
 		@Override
 		public void close() {
-			//No-op
+			// No-op
 		}
+
 	}
 
 	/**
@@ -179,10 +193,13 @@ public class CompositeNonNativeSerde implements Serde {
 	private static class CompositeNonNativeSerializer implements Serializer {
 
 		private final MessageConverter messageConverter;
+
 		private MimeType mimeType;
 
-		CompositeNonNativeSerializer(CompositeMessageConverterFactory compositeMessageConverterFactory) {
-			this.messageConverter = compositeMessageConverterFactory.getMessageConverterForAllRegistered();
+		CompositeNonNativeSerializer(
+				CompositeMessageConverterFactory compositeMessageConverterFactory) {
+			this.messageConverter = compositeMessageConverterFactory
+					.getMessageConverterForAllRegistered();
 		}
 
 		@Override
@@ -196,14 +213,16 @@ public class CompositeNonNativeSerde implements Serde {
 			Map headers = new HashMap<>(message.getHeaders());
 			headers.put(MessageHeaders.CONTENT_TYPE, this.mimeType.toString());
 			MessageHeaders messageHeaders = new MessageHeaders(headers);
-			final Object payload = this.messageConverter.toMessage(message.getPayload(),
-					messageHeaders).getPayload();
+			final Object payload = this.messageConverter
+					.toMessage(message.getPayload(), messageHeaders).getPayload();
 			return (byte[]) payload;
 		}
 
 		@Override
 		public void close() {
-			//No-op
+			// No-op
 		}
+
 	}
+
 }
diff --git a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/bootstrap/KafkaStreamsBinderBootstrapTest.java b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/bootstrap/KafkaStreamsBinderBootstrapTest.java
index 660c404cc..f9411e66a 100644
--- a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/bootstrap/KafkaStreamsBinderBootstrapTest.java
+++ b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/bootstrap/KafkaStreamsBinderBootstrapTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2018 the original author or authors.
+ * Copyright 2018-2019 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -39,26 +39,34 @@ public class KafkaStreamsBinderBootstrapTest {
 
 	@Test
 	public void testKafkaStreamsBinderWithCustomEnvironmentCanStart() {
-		ConfigurableApplicationContext applicationContext = new SpringApplicationBuilder(SimpleApplication.class)
-				.web(WebApplicationType.NONE)
-				.run("--spring.cloud.stream.kafka.streams.default.consumer.application-id=testKafkaStreamsBinderWithCustomEnvironmentCanStart",
+		ConfigurableApplicationContext applicationContext = new SpringApplicationBuilder(
+				SimpleApplication.class).web(WebApplicationType.NONE).run(
+						"--spring.cloud.stream.kafka.streams.default.consumer.application-id"
+								+ "=testKafkaStreamsBinderWithCustomEnvironmentCanStart",
 						"--spring.cloud.stream.bindings.input.destination=foo",
 						"--spring.cloud.stream.bindings.input.binder=kBind1",
 						"--spring.cloud.stream.binders.kBind1.type=kstream",
-						"--spring.cloud.stream.binders.kBind1.environment.spring.cloud.stream.kafka.streams.binder.brokers=" + embeddedKafka.getBrokersAsString(),
-						"--spring.cloud.stream.binders.kBind1.environment.spring.cloud.stream.kafka.streams.binder.zkNodes=" + embeddedKafka.getZookeeperConnectionString());
+						"--spring.cloud.stream.binders.kBind1.environment"
+								+ ".spring.cloud.stream.kafka.streams.binder.brokers"
+								+ "=" + embeddedKafka.getBrokersAsString(),
+						"--spring.cloud.stream.binders.kBind1.environment.spring"
+								+ ".cloud.stream.kafka.streams.binder.zkNodes="
+								+ embeddedKafka.getZookeeperConnectionString());
 
 		applicationContext.close();
 	}
 
 	@Test
 	public void testKafkaStreamsBinderWithStandardConfigurationCanStart() {
-		ConfigurableApplicationContext applicationContext = new SpringApplicationBuilder(SimpleApplication.class)
-				.web(WebApplicationType.NONE)
-				.run("--spring.cloud.stream.kafka.streams.default.consumer.application-id=testKafkaStreamsBinderWithStandardConfigurationCanStart",
+		ConfigurableApplicationContext applicationContext = new SpringApplicationBuilder(
+				SimpleApplication.class).web(WebApplicationType.NONE).run(
+						"--spring.cloud.stream.kafka.streams.default.consumer.application-id"
+								+ "=testKafkaStreamsBinderWithStandardConfigurationCanStart",
 						"--spring.cloud.stream.bindings.input.destination=foo",
-						"--spring.cloud.stream.kafka.streams.binder.brokers=" + embeddedKafka.getBrokersAsString(),
-						"--spring.cloud.stream.kafka.streams.binder.zkNodes=" + embeddedKafka.getZookeeperConnectionString());
+						"--spring.cloud.stream.kafka.streams.binder.brokers="
+								+ embeddedKafka.getBrokersAsString(),
+						"--spring.cloud.stream.kafka.streams.binder.zkNodes="
+								+ embeddedKafka.getZookeeperConnectionString());
 
 		applicationContext.close();
 	}
@@ -71,10 +79,14 @@ public class KafkaStreamsBinderBootstrapTest {
 		public void handle(@Input("input") KStream stream) {
 
 		}
+
 	}
 
 	interface StreamSourceProcessor {
+
 		@Input("input")
 		KStream inputStream();
+
 	}
+
 }
diff --git a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/DeserializationErrorHandlerByKafkaTests.java b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/DeserializationErrorHandlerByKafkaTests.java
index 6d505dde5..7dc07d51b 100644
--- a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/DeserializationErrorHandlerByKafkaTests.java
+++ b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/DeserializationErrorHandlerByKafkaTests.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2018 the original author or authors.
+ * Copyright 2018-2019 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -69,27 +69,32 @@ import static org.mockito.Mockito.verify;
 public abstract class DeserializationErrorHandlerByKafkaTests {
 
 	@ClassRule
-	public static EmbeddedKafkaRule embeddedKafkaRule = new EmbeddedKafkaRule(1, true, "counts", "error.words.group",
-			"error.word1.groupx", "error.word2.groupx");
+	public static EmbeddedKafkaRule embeddedKafkaRule = new EmbeddedKafkaRule(1, true,
+			"counts", "error.words.group", "error.word1.groupx", "error.word2.groupx");
 
-	private static EmbeddedKafkaBroker embeddedKafka = embeddedKafkaRule.getEmbeddedKafka();
+	private static EmbeddedKafkaBroker embeddedKafka = embeddedKafkaRule
+			.getEmbeddedKafka();
 
 	@SpyBean
-	org.springframework.cloud.stream.binder.kafka.streams.KafkaStreamsMessageConversionDelegate KafkaStreamsMessageConversionDelegate;
+	org.springframework.cloud.stream.binder.kafka.streams.KafkaStreamsMessageConversionDelegate conversionDelegate;
 
 	private static Consumer consumer;
 
 	@BeforeClass
 	public static void setUp() throws Exception {
-		System.setProperty("spring.cloud.stream.kafka.streams.binder.brokers", embeddedKafka.getBrokersAsString());
-		System.setProperty("spring.cloud.stream.kafka.streams.binder.zkNodes", embeddedKafka.getZookeeperConnectionString());
+		System.setProperty("spring.cloud.stream.kafka.streams.binder.brokers",
+				embeddedKafka.getBrokersAsString());
+		System.setProperty("spring.cloud.stream.kafka.streams.binder.zkNodes",
+				embeddedKafka.getZookeeperConnectionString());
 
-		System.setProperty("server.port","0");
-		System.setProperty("spring.jmx.enabled","false");
+		System.setProperty("server.port", "0");
+		System.setProperty("spring.jmx.enabled", "false");
 
-		Map consumerProps = KafkaTestUtils.consumerProps("fooc", "false", embeddedKafka);
+		Map consumerProps = KafkaTestUtils.consumerProps("fooc", "false",
+				embeddedKafka);
 		consumerProps.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
-		DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(consumerProps);
+		DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(
+				consumerProps);
 		consumer = cf.createConsumer();
 		embeddedKafka.consumeFromAnEmbeddedTopic(consumer, "counts");
 	}
@@ -99,42 +104,50 @@ public abstract class DeserializationErrorHandlerByKafkaTests {
 		consumer.close();
 	}
 
+	// @checkstyle:off
 	@SpringBootTest(properties = {
 			"spring.cloud.stream.bindings.input.consumer.useNativeDecoding=true",
 			"spring.cloud.stream.bindings.output.producer.useNativeEncoding=true",
 			"spring.cloud.stream.kafka.streams.bindings.input.consumer.application-id=deser-kafka-dlq",
 			"spring.cloud.stream.bindings.input.group=group",
 			"spring.cloud.stream.kafka.streams.binder.serdeError=sendToDlq",
-			"spring.cloud.stream.kafka.streams.binder.configuration.default.value.serde=" +
-					"org.apache.kafka.common.serialization.Serdes$IntegerSerde"},
-			webEnvironment= SpringBootTest.WebEnvironment.NONE
-	)
-	public static class DeserializationByKafkaAndDlqTests extends DeserializationErrorHandlerByKafkaTests {
+			"spring.cloud.stream.kafka.streams.binder.configuration.default.value.serde="
+					+ "org.apache.kafka.common.serialization.Serdes$IntegerSerde" }, webEnvironment = SpringBootTest.WebEnvironment.NONE)
+	// @checkstyle:on
+	public static class DeserializationByKafkaAndDlqTests
+			extends DeserializationErrorHandlerByKafkaTests {
 
 		@Test
 		@SuppressWarnings("unchecked")
 		public void test() throws Exception {
 			Map senderProps = KafkaTestUtils.producerProps(embeddedKafka);
-			DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(senderProps);
+			DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(
+					senderProps);
 			KafkaTemplate template = new KafkaTemplate<>(pf, true);
 			template.setDefaultTopic("words");
 			template.sendDefault("foobar");
 
-			Map consumerProps = KafkaTestUtils.consumerProps("foobar", "false", embeddedKafka);
+			Map consumerProps = KafkaTestUtils.consumerProps("foobar",
+					"false", embeddedKafka);
 			consumerProps.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
-			DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(consumerProps);
+			DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(
+					consumerProps);
 			Consumer consumer1 = cf.createConsumer();
 			embeddedKafka.consumeFromAnEmbeddedTopic(consumer1, "error.words.group");
 
-			ConsumerRecord cr = KafkaTestUtils.getSingleRecord(consumer1, "error.words.group");
+			ConsumerRecord cr = KafkaTestUtils.getSingleRecord(consumer1,
+					"error.words.group");
 			assertThat(cr.value().equals("foobar")).isTrue();
 
-			//Ensuring that the deserialization was indeed done by Kafka natively
-			verify(KafkaStreamsMessageConversionDelegate, never()).deserializeOnInbound(any(Class.class), any(KStream.class));
-			verify(KafkaStreamsMessageConversionDelegate, never()).serializeOnOutbound(any(KStream.class));
+			// Ensuring that the deserialization was indeed done by Kafka natively
+			verify(conversionDelegate, never()).deserializeOnInbound(any(Class.class),
+					any(KStream.class));
+			verify(conversionDelegate, never()).serializeOnOutbound(any(KStream.class));
 		}
+
 	}
 
+	// @checkstyle:off
 	@SpringBootTest(properties = {
 			"spring.cloud.stream.bindings.input.consumer.useNativeDecoding=true",
 			"spring.cloud.stream.bindings.output.producer.useNativeEncoding=true",
@@ -142,17 +155,18 @@ public abstract class DeserializationErrorHandlerByKafkaTests {
 			"spring.cloud.stream.kafka.streams.default.consumer.applicationId=deser-kafka-dlq-multi-input",
 			"spring.cloud.stream.bindings.input.group=groupx",
 			"spring.cloud.stream.kafka.streams.binder.serdeError=sendToDlq",
-			"spring.cloud.stream.kafka.streams.binder.configuration.default.value.serde=" +
-					"org.apache.kafka.common.serialization.Serdes$IntegerSerde"},
-			webEnvironment= SpringBootTest.WebEnvironment.NONE
-	)
-	public static class DeserializationByKafkaAndDlqTestsWithMultipleInputs extends DeserializationErrorHandlerByKafkaTests {
+			"spring.cloud.stream.kafka.streams.binder.configuration.default.value.serde="
+					+ "org.apache.kafka.common.serialization.Serdes$IntegerSerde" }, webEnvironment = SpringBootTest.WebEnvironment.NONE)
+	// @checkstyle:on
+	public static class DeserializationByKafkaAndDlqTestsWithMultipleInputs
+			extends DeserializationErrorHandlerByKafkaTests {
 
 		@Test
 		@SuppressWarnings("unchecked")
-		public void test() throws Exception {
+		public void test() {
 			Map senderProps = KafkaTestUtils.producerProps(embeddedKafka);
-			DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(senderProps);
+			DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(
+					senderProps);
 			KafkaTemplate template = new KafkaTemplate<>(pf, true);
 			template.setDefaultTopic("word1");
 			template.sendDefault("foobar");
@@ -160,22 +174,30 @@ public abstract class DeserializationErrorHandlerByKafkaTests {
 			template.setDefaultTopic("word2");
 			template.sendDefault("foobar");
 
-			Map consumerProps = KafkaTestUtils.consumerProps("foobarx", "false", embeddedKafka);
+			Map consumerProps = KafkaTestUtils.consumerProps("foobarx",
+					"false", embeddedKafka);
 			consumerProps.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
-			DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(consumerProps);
+			DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(
+					consumerProps);
 			Consumer consumer1 = cf.createConsumer();
-			embeddedKafka.consumeFromEmbeddedTopics(consumer1, "error.word1.groupx", "error.word2.groupx");
+			embeddedKafka.consumeFromEmbeddedTopics(consumer1, "error.word1.groupx",
+					"error.word2.groupx");
 
-			//TODO: Investigate why the ordering matters below: i.e. if we consume from error.word1.groupx first, an exception is thrown.
-			ConsumerRecord cr1 = KafkaTestUtils.getSingleRecord(consumer1, "error.word2.groupx");
+			// TODO: Investigate why the ordering matters below: i.e.
+			// if we consume from error.word1.groupx first, an exception is thrown.
+			ConsumerRecord cr1 = KafkaTestUtils.getSingleRecord(consumer1,
+					"error.word2.groupx");
 			assertThat(cr1.value().equals("foobar")).isTrue();
-			ConsumerRecord cr2 = KafkaTestUtils.getSingleRecord(consumer1, "error.word1.groupx");
+			ConsumerRecord cr2 = KafkaTestUtils.getSingleRecord(consumer1,
+					"error.word1.groupx");
 			assertThat(cr2.value().equals("foobar")).isTrue();
 
-			//Ensuring that the deserialization was indeed done by Kafka natively
-			verify(KafkaStreamsMessageConversionDelegate, never()).deserializeOnInbound(any(Class.class), any(KStream.class));
-			verify(KafkaStreamsMessageConversionDelegate, never()).serializeOnOutbound(any(KStream.class));
+			// Ensuring that the deserialization was indeed done by Kafka natively
+			verify(conversionDelegate, never()).deserializeOnInbound(any(Class.class),
+					any(KStream.class));
+			verify(conversionDelegate, never()).serializeOnOutbound(any(KStream.class));
 		}
+
 	}
 
 	@EnableBinding(KafkaStreamsProcessor.class)
@@ -192,14 +214,15 @@ public abstract class DeserializationErrorHandlerByKafkaTests {
 		public KStream process(KStream input) {
 
 			return input
-					.flatMapValues(value -> Arrays.asList(value.toLowerCase().split("\\W+")))
+					.flatMapValues(
+							value -> Arrays.asList(value.toLowerCase().split("\\W+")))
 					.map((key, value) -> new KeyValue<>(value, value))
 					.groupByKey(Serialized.with(Serdes.String(), Serdes.String()))
-					.windowedBy(timeWindows)
-					.count(Materialized.as("foo-WordCounts-x"))
-					.toStream()
-					.map((key, value) -> new KeyValue<>(null, "Count for " + key.key() + " : " + value));
+					.windowedBy(timeWindows).count(Materialized.as("foo-WordCounts-x"))
+					.toStream().map((key, value) -> new KeyValue<>(null,
+							"Count for " + key.key() + " : " + value));
 		}
 
 	}
+
 }
diff --git a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/DeserializtionErrorHandlerByBinderTests.java b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/DeserializtionErrorHandlerByBinderTests.java
index bb5794f7f..8714cd5e2 100644
--- a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/DeserializtionErrorHandlerByBinderTests.java
+++ b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/DeserializtionErrorHandlerByBinderTests.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2018 the original author or authors.
+ * Copyright 2018-2019 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -63,28 +63,35 @@ import static org.mockito.Mockito.verify;
 public abstract class DeserializtionErrorHandlerByBinderTests {
 
 	@ClassRule
-	public static EmbeddedKafkaRule embeddedKafkaRule = new EmbeddedKafkaRule(1, true, "counts-id", "error.foos.foobar-group",
-			"error.foos1.fooz-group", "error.foos2.fooz-group");
+	public static EmbeddedKafkaRule embeddedKafkaRule = new EmbeddedKafkaRule(1, true,
+			"counts-id", "error.foos.foobar-group", "error.foos1.fooz-group",
+			"error.foos2.fooz-group");
 
-	private static EmbeddedKafkaBroker embeddedKafka = embeddedKafkaRule.getEmbeddedKafka();
+	private static EmbeddedKafkaBroker embeddedKafka = embeddedKafkaRule
+			.getEmbeddedKafka();
 
 	@SpyBean
-	org.springframework.cloud.stream.binder.kafka.streams.KafkaStreamsMessageConversionDelegate KafkaStreamsMessageConversionDelegate;
+	org.springframework.cloud.stream.binder.kafka.streams.KafkaStreamsMessageConversionDelegate conversionDelegate;
 
 	private static Consumer consumer;
 
 	@BeforeClass
 	public static void setUp() throws Exception {
-		System.setProperty("spring.cloud.stream.kafka.streams.binder.brokers", embeddedKafka.getBrokersAsString());
-		System.setProperty("spring.cloud.stream.kafka.streams.binder.zkNodes", embeddedKafka.getZookeeperConnectionString());
+		System.setProperty("spring.cloud.stream.kafka.streams.binder.brokers",
+				embeddedKafka.getBrokersAsString());
+		System.setProperty("spring.cloud.stream.kafka.streams.binder.zkNodes",
+				embeddedKafka.getZookeeperConnectionString());
 
-		System.setProperty("server.port","0");
-		System.setProperty("spring.jmx.enabled","false");
+		System.setProperty("server.port", "0");
+		System.setProperty("spring.jmx.enabled", "false");
 
-		Map consumerProps = KafkaTestUtils.consumerProps("foob", "false", embeddedKafka);
-		//consumerProps.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, Deserializer.class.getName());
+		Map consumerProps = KafkaTestUtils.consumerProps("foob", "false",
+				embeddedKafka);
+		// consumerProps.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG,
+		// Deserializer.class.getName());
 		consumerProps.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
-		DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(consumerProps);
+		DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(
+				consumerProps);
 		consumer = cf.createConsumer();
 		embeddedKafka.consumeFromAnEmbeddedTopic(consumer, "counts-id");
 	}
@@ -94,64 +101,77 @@ public abstract class DeserializtionErrorHandlerByBinderTests {
 		consumer.close();
 	}
 
-	@SpringBootTest(properties = {
-			"spring.cloud.stream.bindings.input.destination=foos",
+	@SpringBootTest(properties = { "spring.cloud.stream.bindings.input.destination=foos",
 			"spring.cloud.stream.bindings.output.destination=counts-id",
 			"spring.cloud.stream.kafka.streams.binder.configuration.commit.interval.ms=1000",
-			"spring.cloud.stream.kafka.streams.binder.configuration.default.key.serde=org.apache.kafka.common.serialization.Serdes$StringSerde",
-			"spring.cloud.stream.kafka.streams.binder.configuration.default.value.serde=org.apache.kafka.common.serialization.Serdes$StringSerde",
+			"spring.cloud.stream.kafka.streams.binder.configuration.default.key.serde"
+					+ "=org.apache.kafka.common.serialization.Serdes$StringSerde",
+			"spring.cloud.stream.kafka.streams.binder.configuration.default.value.serde"
+					+ "=org.apache.kafka.common.serialization.Serdes$StringSerde",
 			"spring.cloud.stream.bindings.output.producer.headerMode=raw",
-			"spring.cloud.stream.kafka.streams.bindings.output.producer.keySerde=org.apache.kafka.common.serialization.Serdes$IntegerSerde",
+			"spring.cloud.stream.kafka.streams.bindings.output.producer.keySerde"
+					+ "=org.apache.kafka.common.serialization.Serdes$IntegerSerde",
 			"spring.cloud.stream.bindings.input.consumer.headerMode=raw",
 			"spring.cloud.stream.kafka.streams.binder.serdeError=sendToDlq",
-			"spring.cloud.stream.kafka.streams.bindings.input.consumer.application-id=deserializationByBinderAndDlqTests",
-			"spring.cloud.stream.bindings.input.group=foobar-group"},
-			webEnvironment= SpringBootTest.WebEnvironment.NONE
-	)
-	public static class DeserializationByBinderAndDlqTests extends DeserializtionErrorHandlerByBinderTests {
+			"spring.cloud.stream.kafka.streams.bindings.input.consumer.application-id"
+					+ "=deserializationByBinderAndDlqTests",
+			"spring.cloud.stream.bindings.input.group=foobar-group" }, webEnvironment = SpringBootTest.WebEnvironment.NONE)
+	public static class DeserializationByBinderAndDlqTests
+			extends DeserializtionErrorHandlerByBinderTests {
 
 		@Test
 		@SuppressWarnings("unchecked")
 		public void test() throws Exception {
 			Map senderProps = KafkaTestUtils.producerProps(embeddedKafka);
-			DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(senderProps);
+			DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(
+					senderProps);
 			KafkaTemplate template = new KafkaTemplate<>(pf, true);
 			template.setDefaultTopic("foos");
 			template.sendDefault("hello");
 
-			Map consumerProps = KafkaTestUtils.consumerProps("foobar", "false", embeddedKafka);
+			Map consumerProps = KafkaTestUtils.consumerProps("foobar",
+					"false", embeddedKafka);
 			consumerProps.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
-			DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(consumerProps);
+			DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(
+					consumerProps);
 			Consumer consumer1 = cf.createConsumer();
-			embeddedKafka.consumeFromAnEmbeddedTopic(consumer1, "error.foos.foobar-group");
+			embeddedKafka.consumeFromAnEmbeddedTopic(consumer1,
+					"error.foos.foobar-group");
 
-			ConsumerRecord cr = KafkaTestUtils.getSingleRecord(consumer1, "error.foos.foobar-group");
+			ConsumerRecord cr = KafkaTestUtils.getSingleRecord(consumer1,
+					"error.foos.foobar-group");
 			assertThat(cr.value().equals("hello")).isTrue();
 
-			//Ensuring that the deserialization was indeed done by the binder
-			verify(KafkaStreamsMessageConversionDelegate).deserializeOnInbound(any(Class.class), any(KStream.class));
+			// Ensuring that the deserialization was indeed done by the binder
+			verify(conversionDelegate).deserializeOnInbound(any(Class.class),
+					any(KStream.class));
 		}
+
 	}
 
 	@SpringBootTest(properties = {
 			"spring.cloud.stream.bindings.input.destination=foos1,foos2",
 			"spring.cloud.stream.bindings.output.destination=counts-id",
 			"spring.cloud.stream.kafka.streams.binder.configuration.commit.interval.ms=1000",
-			"spring.cloud.stream.kafka.streams.binder.configuration.default.key.serde=org.apache.kafka.common.serialization.Serdes$StringSerde",
-			"spring.cloud.stream.kafka.streams.binder.configuration.default.value.serde=org.apache.kafka.common.serialization.Serdes$StringSerde",
-			"spring.cloud.stream.kafka.streams.bindings.output.producer.keySerde=org.apache.kafka.common.serialization.Serdes$IntegerSerde",
+			"spring.cloud.stream.kafka.streams.binder.configuration.default.key.serde"
+					+ "=org.apache.kafka.common.serialization.Serdes$StringSerde",
+			"spring.cloud.stream.kafka.streams.binder.configuration.default.value.serde"
+					+ "=org.apache.kafka.common.serialization.Serdes$StringSerde",
+			"spring.cloud.stream.kafka.streams.bindings.output.producer.keySerde"
+					+ "=org.apache.kafka.common.serialization.Serdes$IntegerSerde",
 			"spring.cloud.stream.kafka.streams.binder.serdeError=sendToDlq",
-			"spring.cloud.stream.kafka.streams.bindings.input.consumer.application-id=deserializationByBinderAndDlqTestsWithMultipleInputs",
-			"spring.cloud.stream.bindings.input.group=fooz-group"},
-			webEnvironment= SpringBootTest.WebEnvironment.NONE
-	)
-	public static class DeserializationByBinderAndDlqTestsWithMultipleInputs extends DeserializtionErrorHandlerByBinderTests {
+			"spring.cloud.stream.kafka.streams.bindings.input.consumer.application-id"
+					+ "=deserializationByBinderAndDlqTestsWithMultipleInputs",
+			"spring.cloud.stream.bindings.input.group=fooz-group" }, webEnvironment = SpringBootTest.WebEnvironment.NONE)
+	public static class DeserializationByBinderAndDlqTestsWithMultipleInputs
+			extends DeserializtionErrorHandlerByBinderTests {
 
 		@Test
 		@SuppressWarnings("unchecked")
 		public void test() throws Exception {
 			Map senderProps = KafkaTestUtils.producerProps(embeddedKafka);
-			DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(senderProps);
+			DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(
+					senderProps);
 			KafkaTemplate template = new KafkaTemplate<>(pf, true);
 			template.setDefaultTopic("foos1");
 			template.sendDefault("hello");
@@ -159,21 +179,28 @@ public abstract class DeserializtionErrorHandlerByBinderTests {
 			template.setDefaultTopic("foos2");
 			template.sendDefault("hello");
 
-			Map consumerProps = KafkaTestUtils.consumerProps("foobar1", "false", embeddedKafka);
+			Map consumerProps = KafkaTestUtils.consumerProps("foobar1",
+					"false", embeddedKafka);
 			consumerProps.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
-			DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(consumerProps);
+			DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(
+					consumerProps);
 			Consumer consumer1 = cf.createConsumer();
-			embeddedKafka.consumeFromEmbeddedTopics(consumer1, "error.foos1.fooz-group", "error.foos2.fooz-group");
+			embeddedKafka.consumeFromEmbeddedTopics(consumer1, "error.foos1.fooz-group",
+					"error.foos2.fooz-group");
 
-			ConsumerRecord cr1 = KafkaTestUtils.getSingleRecord(consumer1, "error.foos1.fooz-group");
+			ConsumerRecord cr1 = KafkaTestUtils.getSingleRecord(consumer1,
+					"error.foos1.fooz-group");
 			assertThat(cr1.value().equals("hello")).isTrue();
 
-			ConsumerRecord cr2 = KafkaTestUtils.getSingleRecord(consumer1, "error.foos2.fooz-group");
+			ConsumerRecord cr2 = KafkaTestUtils.getSingleRecord(consumer1,
+					"error.foos2.fooz-group");
 			assertThat(cr2.value().equals("hello")).isTrue();
 
-			//Ensuring that the deserialization was indeed done by the binder
-			verify(KafkaStreamsMessageConversionDelegate).deserializeOnInbound(any(Class.class), any(KStream.class));
+			// Ensuring that the deserialization was indeed done by the binder
+			verify(conversionDelegate).deserializeOnInbound(any(Class.class),
+					any(KStream.class));
 		}
+
 	}
 
 	@EnableBinding(KafkaStreamsProcessor.class)
@@ -183,16 +210,17 @@ public abstract class DeserializtionErrorHandlerByBinderTests {
 		@StreamListener("input")
 		@SendTo("output")
 		public KStream process(KStream input) {
-			return input
-					.filter((key, product) -> product.getId() == 123)
+			return input.filter((key, product) -> product.getId() == 123)
 					.map((key, value) -> new KeyValue<>(value, value))
-					.groupByKey(Serialized.with(new JsonSerde<>(Product.class), new JsonSerde<>(Product.class)))
+					.groupByKey(Serialized.with(new JsonSerde<>(Product.class),
+							new JsonSerde<>(Product.class)))
 					.windowedBy(TimeWindows.of(5000))
-					.count(Materialized.as("id-count-store-x"))
-					.toStream()
+					.count(Materialized.as("id-count-store-x")).toStream()
 					.map((key, value) -> new KeyValue<>(key.key().id, value));
 		}
+
 	}
+
 	static class Product {
 
 		Integer id;
@@ -204,5 +232,7 @@ public abstract class DeserializtionErrorHandlerByBinderTests {
 		public void setId(Integer id) {
 			this.id = id;
 		}
+
 	}
+
 }
diff --git a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/KafkaStreamsBinderMultipleInputTopicsTest.java b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/KafkaStreamsBinderMultipleInputTopicsTest.java
index 799b9c2d5..912ddca5a 100644
--- a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/KafkaStreamsBinderMultipleInputTopicsTest.java
+++ b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/KafkaStreamsBinderMultipleInputTopicsTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017 the original author or authors.
+ * Copyright 2017-2019 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -55,30 +55,34 @@ import org.springframework.messaging.handler.annotation.SendTo;
 import static org.assertj.core.api.Assertions.assertThat;
 
 /**
+ * This test case demonstrates a kafk-streams topology which consumes messages from
+ * multiple kafka topics(destinations).
+ *
+ * See
+ * {@link KafkaStreamsBinderMultipleInputTopicsTest#testKstreamWordCountWithStringInputAndPojoOuput}
+ * where the input topic names are specified as comma-separated String values for the
+ * property spring.cloud.stream.bindings.input.destination.
+ *
  * @author Sarath Shyam
- * 
- * This test case demonstrates a kafk-streams topology which consumes messages from 
- * multiple kafka topics(destinations). 
- * See {@link KafkaStreamsBinderMultipleInputTopicsTest#testKstreamWordCountWithStringInputAndPojoOuput} where
- * the input topic names are specified as comma-separated String values for
- * the property spring.cloud.stream.bindings.input.destination. 
- * 
- * 
  */
 public class KafkaStreamsBinderMultipleInputTopicsTest {
 
 	@ClassRule
-	public static EmbeddedKafkaRule embeddedKafkaRule = new EmbeddedKafkaRule(1, true, "counts");
+	public static EmbeddedKafkaRule embeddedKafkaRule = new EmbeddedKafkaRule(1, true,
+			"counts");
 
-	private static EmbeddedKafkaBroker embeddedKafka = embeddedKafkaRule.getEmbeddedKafka();
+	private static EmbeddedKafkaBroker embeddedKafka = embeddedKafkaRule
+			.getEmbeddedKafka();
 
 	private static Consumer consumer;
 
 	@BeforeClass
 	public static void setUp() throws Exception {
-		Map consumerProps = KafkaTestUtils.consumerProps("group", "false", embeddedKafka);
+		Map consumerProps = KafkaTestUtils.consumerProps("group", "false",
+				embeddedKafka);
 		consumerProps.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
-		DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(consumerProps);
+		DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(
+				consumerProps);
 		consumer = cf.createConsumer();
 		embeddedKafka.consumeFromAnEmbeddedTopic(consumer, "counts");
 	}
@@ -90,7 +94,8 @@ public class KafkaStreamsBinderMultipleInputTopicsTest {
 
 	@Test
 	public void testKstreamWordCountWithStringInputAndPojoOuput() throws Exception {
-		SpringApplication app = new SpringApplication(WordCountProcessorApplication.class);
+		SpringApplication app = new SpringApplication(
+				WordCountProcessorApplication.class);
 		app.setWebApplicationType(WebApplicationType.NONE);
 
 		ConfigurableApplicationContext context = app.run("--server.port=0",
@@ -99,45 +104,49 @@ public class KafkaStreamsBinderMultipleInputTopicsTest {
 				"--spring.cloud.stream.bindings.output.destination=counts",
 				"--spring.cloud.stream.bindings.output.contentType=application/json",
 				"--spring.cloud.stream.kafka.streams.binder.configuration.commit.interval.ms=1000",
-				"--spring.cloud.stream.kafka.streams.binder.configuration.default.key.serde=org.apache.kafka.common.serialization.Serdes$StringSerde",
-				"--spring.cloud.stream.kafka.streams.binder.configuration.default.value.serde=org.apache.kafka.common.serialization.Serdes$StringSerde",
+				"--spring.cloud.stream.kafka.streams.binder.configuration.default.key.serde"
+						+ "=org.apache.kafka.common.serialization.Serdes$StringSerde",
+				"--spring.cloud.stream.kafka.streams.binder.configuration.default.value.serde"
+						+ "=org.apache.kafka.common.serialization.Serdes$StringSerde",
 				"--spring.cloud.stream.bindings.input.consumer.headerMode=raw",
 				"--spring.cloud.stream.kafka.streams.timeWindow.length=5000",
 				"--spring.cloud.stream.kafka.streams.timeWindow.advanceBy=0",
-				"--spring.cloud.stream.kafka.streams.bindings.input.consumer.applicationId=WordCountProcessorApplication-xyz",
-				"--spring.cloud.stream.kafka.streams.binder.brokers=" + embeddedKafka.getBrokersAsString(),
-				"--spring.cloud.stream.kafka.streams.binder.zkNodes=" + embeddedKafka.getZookeeperConnectionString());
+				"--spring.cloud.stream.kafka.streams.bindings.input.consumer.applicationId"
+						+ "=WordCountProcessorApplication-xyz",
+				"--spring.cloud.stream.kafka.streams.binder.brokers="
+						+ embeddedKafka.getBrokersAsString(),
+				"--spring.cloud.stream.kafka.streams.binder.zkNodes="
+						+ embeddedKafka.getZookeeperConnectionString());
 		try {
 			receiveAndValidate(context);
-		} finally {
+		}
+		finally {
 			context.close();
 		}
 	}
 
-	private void receiveAndValidate(ConfigurableApplicationContext context) throws Exception {
+	private void receiveAndValidate(ConfigurableApplicationContext context)
+			throws Exception {
 		Map senderProps = KafkaTestUtils.producerProps(embeddedKafka);
-		DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(senderProps);
+		DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(
+				senderProps);
 		KafkaTemplate template = new KafkaTemplate<>(pf, true);
 		template.setDefaultTopic("words1");
 		template.sendDefault("foobar1");
 		template.setDefaultTopic("words2");
 		template.sendDefault("foobar2");
-		
-		//Sleep a bit so that both the messages are processed before reading from the output topic.
-		//Else assertions might fail arbitrarily.
+		// Sleep a bit so that both the messages are processed before reading from the
+		// output topic.
+		// Else assertions might fail arbitrarily.
 		Thread.sleep(5000);
-		
-		ConsumerRecords received = KafkaTestUtils.getRecords(consumer); 
-		
+		ConsumerRecords received = KafkaTestUtils.getRecords(consumer);
 		List wordCounts = new ArrayList<>(2);
-		
-		received.records("counts").forEach((consumerRecord) -> {
-			wordCounts.add((consumerRecord.value()));
-		});
+
+		received.records("counts")
+				.forEach((consumerRecord) -> wordCounts.add((consumerRecord.value())));
 		System.out.println(wordCounts);
 		assertThat(wordCounts.contains("{\"word\":\"foobar1\",\"count\":1}")).isTrue();
 		assertThat(wordCounts.contains("{\"word\":\"foobar2\",\"count\":1}")).isTrue();
-		
 	}
 
 	@EnableBinding(KafkaStreamsProcessor.class)
@@ -145,22 +154,22 @@ public class KafkaStreamsBinderMultipleInputTopicsTest {
 	@EnableConfigurationProperties(KafkaStreamsApplicationSupportProperties.class)
 	static class WordCountProcessorApplication {
 
-
 		@StreamListener
 		@SendTo("output")
-		public KStream process(@Input("input") KStream input) {
+		public KStream process(
+				@Input("input") KStream input) {
 
-			input.map((k,v) -> {
+			input.map((k, v) -> {
 				System.out.println(k);
 				System.out.println(v);
-				return new KeyValue<>(k,v);
+				return new KeyValue<>(k, v);
 			});
 			return input
-					.flatMapValues(value -> Arrays.asList(value.toLowerCase().split("\\W+")))
+					.flatMapValues(
+							value -> Arrays.asList(value.toLowerCase().split("\\W+")))
 					.map((key, value) -> new KeyValue<>(value, value))
 					.groupByKey(Serialized.with(Serdes.String(), Serdes.String()))
-					.count(Materialized.as("WordCounts"))
-					.toStream()
+					.count(Materialized.as("WordCounts")).toStream()
 					.map((key, value) -> new KeyValue<>(null, new WordCount(key, value)));
 		}
 
diff --git a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/KafkaStreamsBinderPojoInputAndPrimitiveTypeOutputTests.java b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/KafkaStreamsBinderPojoInputAndPrimitiveTypeOutputTests.java
index 44f48ef57..4735c0196 100644
--- a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/KafkaStreamsBinderPojoInputAndPrimitiveTypeOutputTests.java
+++ b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/KafkaStreamsBinderPojoInputAndPrimitiveTypeOutputTests.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017 the original author or authors.
+ * Copyright 2017-2019 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -57,18 +57,23 @@ import static org.assertj.core.api.Assertions.assertThat;
 public class KafkaStreamsBinderPojoInputAndPrimitiveTypeOutputTests {
 
 	@ClassRule
-	public static EmbeddedKafkaRule embeddedKafkaRule = new EmbeddedKafkaRule(1, true, "counts-id");
+	public static EmbeddedKafkaRule embeddedKafkaRule = new EmbeddedKafkaRule(1, true,
+			"counts-id");
 
-	private static EmbeddedKafkaBroker embeddedKafka = embeddedKafkaRule.getEmbeddedKafka();
+	private static EmbeddedKafkaBroker embeddedKafka = embeddedKafkaRule
+			.getEmbeddedKafka();
 
 	private static Consumer consumer;
 
 	@BeforeClass
 	public static void setUp() throws Exception {
-		Map consumerProps = KafkaTestUtils.consumerProps("group-id", "false", embeddedKafka);
-		//consumerProps.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, Deserializer.class.getName());
+		Map consumerProps = KafkaTestUtils.consumerProps("group-id",
+				"false", embeddedKafka);
+		// consumerProps.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG,
+		// Deserializer.class.getName());
 		consumerProps.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
-		DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(consumerProps);
+		DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(
+				consumerProps);
 		consumer = cf.createConsumer();
 		embeddedKafka.consumeFromAnEmbeddedTopic(consumer, "counts-id");
 	}
@@ -87,26 +92,36 @@ public class KafkaStreamsBinderPojoInputAndPrimitiveTypeOutputTests {
 				"--spring.cloud.stream.bindings.input.destination=foos",
 				"--spring.cloud.stream.bindings.output.destination=counts-id",
 				"--spring.cloud.stream.kafka.streams.binder.configuration.commit.interval.ms=1000",
-				"--spring.cloud.stream.kafka.streams.binder.configuration.default.key.serde=org.apache.kafka.common.serialization.Serdes$StringSerde",
-				"--spring.cloud.stream.kafka.streams.binder.configuration.default.value.serde=org.apache.kafka.common.serialization.Serdes$StringSerde",
-				"--spring.cloud.stream.kafka.streams.bindings.output.producer.keySerde=org.apache.kafka.common.serialization.Serdes$IntegerSerde",
-				"--spring.cloud.stream.kafka.streams.bindings.input.consumer.applicationId=KafkaStreamsBinderPojoInputAndPrimitiveTypeOutputTests-xyz",
-				"--spring.cloud.stream.kafka.streams.binder.brokers=" + embeddedKafka.getBrokersAsString(),
-				"--spring.cloud.stream.kafka.streams.binder.zkNodes=" + embeddedKafka.getZookeeperConnectionString());
+				"--spring.cloud.stream.kafka.streams.binder.configuration.default.key.serde="
+						+ "org.apache.kafka.common.serialization.Serdes$StringSerde",
+				"--spring.cloud.stream.kafka.streams.binder.configuration.default.value.serde="
+						+ "org.apache.kafka.common.serialization.Serdes$StringSerde",
+				"--spring.cloud.stream.kafka.streams.bindings.output.producer.keySerde="
+						+ "org.apache.kafka.common.serialization.Serdes$IntegerSerde",
+				"--spring.cloud.stream.kafka.streams.bindings.input.consumer.applicationId="
+						+ "KafkaStreamsBinderPojoInputAndPrimitiveTypeOutputTests-xyz",
+				"--spring.cloud.stream.kafka.streams.binder.brokers="
+						+ embeddedKafka.getBrokersAsString(),
+				"--spring.cloud.stream.kafka.streams.binder.zkNodes="
+						+ embeddedKafka.getZookeeperConnectionString());
 		try {
 			receiveAndValidateFoo(context);
-		} finally {
+		}
+		finally {
 			context.close();
 		}
 	}
 
-	private void receiveAndValidateFoo(ConfigurableApplicationContext context) throws Exception {
+	private void receiveAndValidateFoo(ConfigurableApplicationContext context)
+			throws Exception {
 		Map senderProps = KafkaTestUtils.producerProps(embeddedKafka);
-		DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(senderProps);
+		DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(
+				senderProps);
 		KafkaTemplate template = new KafkaTemplate<>(pf, true);
 		template.setDefaultTopic("foos");
 		template.sendDefault("{\"id\":\"123\"}");
-		ConsumerRecord cr = KafkaTestUtils.getSingleRecord(consumer, "counts-id");
+		ConsumerRecord cr = KafkaTestUtils.getSingleRecord(consumer,
+				"counts-id");
 
 		assertThat(cr.key()).isEqualTo(123);
 		ObjectMapper om = new ObjectMapper();
@@ -121,15 +136,15 @@ public class KafkaStreamsBinderPojoInputAndPrimitiveTypeOutputTests {
 		@StreamListener("input")
 		@SendTo("output")
 		public KStream process(KStream input) {
-			return input
-					.filter((key, product) -> product.getId() == 123)
+			return input.filter((key, product) -> product.getId() == 123)
 					.map((key, value) -> new KeyValue<>(value, value))
-					.groupByKey(Serialized.with(new JsonSerde<>(Product.class), new JsonSerde<>(Product.class)))
+					.groupByKey(Serialized.with(new JsonSerde<>(Product.class),
+							new JsonSerde<>(Product.class)))
 					.windowedBy(TimeWindows.of(5000))
-					.count(Materialized.as("id-count-store-x"))
-					.toStream()
+					.count(Materialized.as("id-count-store-x")).toStream()
 					.map((key, value) -> new KeyValue<>(key.key().id, value));
 		}
+
 	}
 
 	static class Product {
@@ -143,5 +158,7 @@ public class KafkaStreamsBinderPojoInputAndPrimitiveTypeOutputTests {
 		public void setId(Integer id) {
 			this.id = id;
 		}
+
 	}
+
 }
diff --git a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/KafkaStreamsBinderWordCountIntegrationTests.java b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/KafkaStreamsBinderWordCountIntegrationTests.java
index 1f091f82c..7f0859b80 100644
--- a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/KafkaStreamsBinderWordCountIntegrationTests.java
+++ b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/KafkaStreamsBinderWordCountIntegrationTests.java
@@ -73,17 +73,21 @@ import static org.assertj.core.api.Assertions.assertThat;
 public class KafkaStreamsBinderWordCountIntegrationTests {
 
 	@ClassRule
-	public static EmbeddedKafkaRule embeddedKafkaRule = new EmbeddedKafkaRule(1, true, "counts");
+	public static EmbeddedKafkaRule embeddedKafkaRule = new EmbeddedKafkaRule(1, true,
+			"counts");
 
-	private static EmbeddedKafkaBroker embeddedKafka = embeddedKafkaRule.getEmbeddedKafka();
+	private static EmbeddedKafkaBroker embeddedKafka = embeddedKafkaRule
+			.getEmbeddedKafka();
 
 	private static Consumer consumer;
 
 	@BeforeClass
 	public static void setUp() throws Exception {
-		Map consumerProps = KafkaTestUtils.consumerProps("group", "false", embeddedKafka);
+		Map consumerProps = KafkaTestUtils.consumerProps("group", "false",
+				embeddedKafka);
 		consumerProps.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
-		DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(consumerProps);
+		DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(
+				consumerProps);
 		consumer = cf.createConsumer();
 		embeddedKafka.consumeFromAnEmbeddedTopic(consumer, "counts");
 	}
@@ -94,8 +98,10 @@ public class KafkaStreamsBinderWordCountIntegrationTests {
 	}
 
 	@Test
-	public void testKstreamWordCountWithApplicationIdSpecifiedAtDefaultConsumer() throws Exception {
-		SpringApplication app = new SpringApplication(WordCountProcessorApplication.class);
+	public void testKstreamWordCountWithApplicationIdSpecifiedAtDefaultConsumer()
+			throws Exception {
+		SpringApplication app = new SpringApplication(
+				WordCountProcessorApplication.class);
 		app.setWebApplicationType(WebApplicationType.NONE);
 
 		try (ConfigurableApplicationContext context = app.run("--server.port=0",
@@ -105,21 +111,27 @@ public class KafkaStreamsBinderWordCountIntegrationTests {
 				"--spring.cloud.stream.bindings.output.contentType=application/json",
 				"--spring.cloud.stream.kafka.streams.default.consumer.application-id=basic-word-count",
 				"--spring.cloud.stream.kafka.streams.binder.configuration.commit.interval.ms=1000",
-				"--spring.cloud.stream.kafka.streams.binder.configuration.default.key.serde=org.apache.kafka.common.serialization.Serdes$StringSerde",
-				"--spring.cloud.stream.kafka.streams.binder.configuration.default.value.serde=org.apache.kafka.common.serialization.Serdes$StringSerde",
+				"--spring.cloud.stream.kafka.streams.binder.configuration.default.key.serde"
+						+ "=org.apache.kafka.common.serialization.Serdes$StringSerde",
+				"--spring.cloud.stream.kafka.streams.binder.configuration.default.value.serde"
+						+ "=org.apache.kafka.common.serialization.Serdes$StringSerde",
 				"--spring.cloud.stream.bindings.output.producer.headerMode=raw",
 				"--spring.cloud.stream.bindings.input.consumer.headerMode=raw",
 				"--spring.cloud.stream.kafka.streams.timeWindow.length=5000",
 				"--spring.cloud.stream.kafka.streams.timeWindow.advanceBy=0",
-				"--spring.cloud.stream.kafka.streams.binder.brokers=" + embeddedKafka.getBrokersAsString(),
-				"--spring.cloud.stream.kafka.streams.binder.zkNodes=" + embeddedKafka.getZookeeperConnectionString())) {
+				"--spring.cloud.stream.kafka.streams.binder.brokers="
+						+ embeddedKafka.getBrokersAsString(),
+				"--spring.cloud.stream.kafka.streams.binder.zkNodes="
+						+ embeddedKafka.getZookeeperConnectionString())) {
 			receiveAndValidate(context);
 		}
 	}
 
 	@Test
-	public void testKstreamWordCountWithInputBindingLevelApplicationId() throws Exception {
-		SpringApplication app = new SpringApplication(WordCountProcessorApplication.class);
+	public void testKstreamWordCountWithInputBindingLevelApplicationId()
+			throws Exception {
+		SpringApplication app = new SpringApplication(
+				WordCountProcessorApplication.class);
 		app.setWebApplicationType(WebApplicationType.NONE);
 
 		try (ConfigurableApplicationContext context = app.run("--server.port=0",
@@ -129,43 +141,55 @@ public class KafkaStreamsBinderWordCountIntegrationTests {
 				"--spring.cloud.stream.bindings.output.contentType=application/json",
 				"--spring.cloud.stream.kafka.streams.bindings.input.consumer.application-id=basic-word-count",
 				"--spring.cloud.stream.kafka.streams.binder.configuration.commit.interval.ms=1000",
-				"--spring.cloud.stream.kafka.streams.binder.configuration.default.key.serde=org.apache.kafka.common.serialization.Serdes$StringSerde",
-				"--spring.cloud.stream.kafka.streams.binder.configuration.default.value.serde=org.apache.kafka.common.serialization.Serdes$StringSerde",
+				"--spring.cloud.stream.kafka.streams.binder.configuration.default.key.serde"
+						+ "=org.apache.kafka.common.serialization.Serdes$StringSerde",
+				"--spring.cloud.stream.kafka.streams.binder.configuration.default.value.serde"
+						+ "=org.apache.kafka.common.serialization.Serdes$StringSerde",
 				"--spring.cloud.stream.kafka.streams.timeWindow.length=5000",
 				"--spring.cloud.stream.kafka.streams.timeWindow.advanceBy=0",
 				"--spring.cloud.stream.bindings.input.consumer.concurrency=2",
-				"--spring.cloud.stream.kafka.streams.binder.brokers=" + embeddedKafka.getBrokersAsString(),
-				"--spring.cloud.stream.kafka.streams.binder.zkNodes=" + embeddedKafka.getZookeeperConnectionString())) {
+				"--spring.cloud.stream.kafka.streams.binder.brokers="
+						+ embeddedKafka.getBrokersAsString(),
+				"--spring.cloud.stream.kafka.streams.binder.zkNodes="
+						+ embeddedKafka.getZookeeperConnectionString())) {
 			receiveAndValidate(context);
-			//Assertions on StreamBuilderFactoryBean
-			StreamsBuilderFactoryBean streamsBuilderFactoryBean = context.getBean("&stream-builder-process", StreamsBuilderFactoryBean.class);
+			// Assertions on StreamBuilderFactoryBean
+			StreamsBuilderFactoryBean streamsBuilderFactoryBean = context
+					.getBean("&stream-builder-process", StreamsBuilderFactoryBean.class);
 			KafkaStreams kafkaStreams = streamsBuilderFactoryBean.getKafkaStreams();
-			ReadOnlyWindowStore store = kafkaStreams.store("foo-WordCounts", QueryableStoreTypes.windowStore());
+			ReadOnlyWindowStore store = kafkaStreams
+					.store("foo-WordCounts", QueryableStoreTypes.windowStore());
 			assertThat(store).isNotNull();
 
-			Map streamConfigGlobalProperties = context.getBean("streamConfigGlobalProperties", Map.class);
+			Map streamConfigGlobalProperties = context
+					.getBean("streamConfigGlobalProperties", Map.class);
 
-			//Ensure that concurrency settings are mapped to number of stream task threads in Kafka Streams.
-			final Integer concurrency = (Integer)streamConfigGlobalProperties.get(StreamsConfig.NUM_STREAM_THREADS_CONFIG);
+			// Ensure that concurrency settings are mapped to number of stream task
+			// threads in Kafka Streams.
+			final Integer concurrency = (Integer) streamConfigGlobalProperties
+					.get(StreamsConfig.NUM_STREAM_THREADS_CONFIG);
 			assertThat(concurrency).isEqualTo(2);
 
 			sendTombStoneRecordsAndVerifyGracefulHandling();
 
-			CleanupConfig cleanup = TestUtils.getPropertyValue(streamsBuilderFactoryBean, "cleanupConfig",
-					CleanupConfig.class);
+			CleanupConfig cleanup = TestUtils.getPropertyValue(streamsBuilderFactoryBean,
+					"cleanupConfig", CleanupConfig.class);
 			assertThat(cleanup.cleanupOnStart()).isTrue();
 			assertThat(cleanup.cleanupOnStop()).isFalse();
 		}
 	}
 
-	private void receiveAndValidate(ConfigurableApplicationContext context) throws Exception {
+	private void receiveAndValidate(ConfigurableApplicationContext context)
+			throws Exception {
 		Map senderProps = KafkaTestUtils.producerProps(embeddedKafka);
-		DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(senderProps);
+		DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(
+				senderProps);
 		try {
 			KafkaTemplate template = new KafkaTemplate<>(pf, true);
 			template.setDefaultTopic("words");
 			template.sendDefault("foobar");
-			ConsumerRecord cr = KafkaTestUtils.getSingleRecord(consumer, "counts");
+			ConsumerRecord cr = KafkaTestUtils.getSingleRecord(consumer,
+					"counts");
 			assertThat(cr.value().contains("\"word\":\"foobar\",\"count\":1")).isTrue();
 		}
 		finally {
@@ -175,14 +199,17 @@ public class KafkaStreamsBinderWordCountIntegrationTests {
 
 	private void sendTombStoneRecordsAndVerifyGracefulHandling() throws Exception {
 		Map senderProps = KafkaTestUtils.producerProps(embeddedKafka);
-		DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(senderProps);
+		DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(
+				senderProps);
 		try {
 			KafkaTemplate template = new KafkaTemplate<>(pf, true);
 			template.setDefaultTopic("words");
 			template.sendDefault(null);
-			ConsumerRecords received = consumer.poll(Duration.ofMillis(5000));
-			//By asserting that the received record is empty, we are ensuring that the tombstone record
-			//was handled by the binder gracefully.
+			ConsumerRecords received = consumer
+					.poll(Duration.ofMillis(5000));
+			// By asserting that the received record is empty, we are ensuring that the
+			// tombstone record
+			// was handled by the binder gracefully.
 			assertThat(received.isEmpty()).isTrue();
 		}
 		finally {
@@ -200,16 +227,20 @@ public class KafkaStreamsBinderWordCountIntegrationTests {
 
 		@StreamListener
 		@SendTo("output")
-		public KStream process(@Input("input") KStream input) {
+		public KStream process(
+				@Input("input") KStream input) {
 
 			return input
-					.flatMapValues(value -> Arrays.asList(value.toLowerCase().split("\\W+")))
+					.flatMapValues(
+							value -> Arrays.asList(value.toLowerCase().split("\\W+")))
 					.map((key, value) -> new KeyValue<>(value, value))
 					.groupByKey(Serialized.with(Serdes.String(), Serdes.String()))
-					.windowedBy(timeWindows)
-					.count(Materialized.as("foo-WordCounts"))
+					.windowedBy(timeWindows).count(Materialized.as("foo-WordCounts"))
 					.toStream()
-					.map((key, value) -> new KeyValue<>(null, new WordCount(key.key(), value, new Date(key.window().start()), new Date(key.window().end()))));
+					.map((key, value) -> new KeyValue<>(null,
+							new WordCount(key.key(), value,
+									new Date(key.window().start()),
+									new Date(key.window().end()))));
 		}
 
 		@Bean
@@ -267,6 +298,7 @@ public class KafkaStreamsBinderWordCountIntegrationTests {
 		public void setEnd(Date end) {
 			this.end = end;
 		}
+
 	}
 
 }
diff --git a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/KafkaStreamsInteractiveQueryIntegrationTests.java b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/KafkaStreamsInteractiveQueryIntegrationTests.java
index 8270fb31f..4d5fac090 100644
--- a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/KafkaStreamsInteractiveQueryIntegrationTests.java
+++ b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/KafkaStreamsInteractiveQueryIntegrationTests.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017 the original author or authors.
+ * Copyright 2017-2019 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -62,17 +62,21 @@ import static org.assertj.core.api.Assertions.assertThat;
 public class KafkaStreamsInteractiveQueryIntegrationTests {
 
 	@ClassRule
-	public static EmbeddedKafkaRule embeddedKafkaRule = new EmbeddedKafkaRule(1, true, "counts-id");
+	public static EmbeddedKafkaRule embeddedKafkaRule = new EmbeddedKafkaRule(1, true,
+			"counts-id");
 
-	private static EmbeddedKafkaBroker embeddedKafka = embeddedKafkaRule.getEmbeddedKafka();
+	private static EmbeddedKafkaBroker embeddedKafka = embeddedKafkaRule
+			.getEmbeddedKafka();
 
 	private static Consumer consumer;
 
 	@BeforeClass
 	public static void setUp() throws Exception {
-		Map consumerProps = KafkaTestUtils.consumerProps("group-id", "false", embeddedKafka);
+		Map consumerProps = KafkaTestUtils.consumerProps("group-id",
+				"false", embeddedKafka);
 		consumerProps.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
-		DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(consumerProps);
+		DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(
+				consumerProps);
 		consumer = cf.createConsumer();
 		embeddedKafka.consumeFromAnEmbeddedTopic(consumer, "counts-id");
 	}
@@ -91,40 +95,55 @@ public class KafkaStreamsInteractiveQueryIntegrationTests {
 				"--spring.cloud.stream.bindings.input.destination=foos",
 				"--spring.cloud.stream.bindings.output.destination=counts-id",
 				"--spring.cloud.stream.kafka.streams.binder.configuration.commit.interval.ms=1000",
-				"--spring.cloud.stream.kafka.streams.binder.configuration.default.key.serde=org.apache.kafka.common.serialization.Serdes$StringSerde",
-				"--spring.cloud.stream.kafka.streams.binder.configuration.default.value.serde=org.apache.kafka.common.serialization.Serdes$StringSerde",
+				"--spring.cloud.stream.kafka.streams.binder.configuration.default.key.serde"
+						+ "=org.apache.kafka.common.serialization.Serdes$StringSerde",
+				"--spring.cloud.stream.kafka.streams.binder.configuration.default.value.serde"
+						+ "=org.apache.kafka.common.serialization.Serdes$StringSerde",
 				"--spring.cloud.stream.kafka.streams.bindings.input.consumer.applicationId=ProductCountApplication-abc",
-				"--spring.cloud.stream.kafka.streams.binder.configuration.application.server=" + embeddedKafka.getBrokersAsString(),
-				"--spring.cloud.stream.kafka.streams.binder.brokers=" + embeddedKafka.getBrokersAsString(),
-				"--spring.cloud.stream.kafka.streams.binder.zkNodes=" + embeddedKafka.getZookeeperConnectionString());
+				"--spring.cloud.stream.kafka.streams.binder.configuration.application.server"
+						+ "=" + embeddedKafka.getBrokersAsString(),
+				"--spring.cloud.stream.kafka.streams.binder.brokers="
+						+ embeddedKafka.getBrokersAsString(),
+				"--spring.cloud.stream.kafka.streams.binder.zkNodes="
+						+ embeddedKafka.getZookeeperConnectionString());
 		try {
 			receiveAndValidateFoo(context);
-		} finally {
+		}
+		finally {
 			context.close();
 		}
 	}
 
-	private void receiveAndValidateFoo(ConfigurableApplicationContext context) throws Exception {
+	private void receiveAndValidateFoo(ConfigurableApplicationContext context)
+			throws Exception {
 		Map senderProps = KafkaTestUtils.producerProps(embeddedKafka);
-		DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(senderProps);
+		DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(
+				senderProps);
 		KafkaTemplate template = new KafkaTemplate<>(pf, true);
 		template.setDefaultTopic("foos");
 		template.sendDefault("{\"id\":\"123\"}");
-		ConsumerRecord cr = KafkaTestUtils.getSingleRecord(consumer, "counts-id");
+		ConsumerRecord cr = KafkaTestUtils.getSingleRecord(consumer,
+				"counts-id");
 		assertThat(cr.value().contains("Count for product with ID 123: 1")).isTrue();
 
-		ProductCountApplication.Foo foo = context.getBean(ProductCountApplication.Foo.class);
+		ProductCountApplication.Foo foo = context
+				.getBean(ProductCountApplication.Foo.class);
 		assertThat(foo.getProductStock(123).equals(1L));
 
-		//perform assertions on HostInfo related methods in InteractiveQueryService
-		InteractiveQueryService interactiveQueryService = context.getBean(InteractiveQueryService.class);
+		// perform assertions on HostInfo related methods in InteractiveQueryService
+		InteractiveQueryService interactiveQueryService = context
+				.getBean(InteractiveQueryService.class);
 		HostInfo currentHostInfo = interactiveQueryService.getCurrentHostInfo();
-		assertThat(currentHostInfo.host() + ":" + currentHostInfo.port()).isEqualTo(embeddedKafka.getBrokersAsString());
+		assertThat(currentHostInfo.host() + ":" + currentHostInfo.port())
+				.isEqualTo(embeddedKafka.getBrokersAsString());
 
-		HostInfo hostInfo = interactiveQueryService.getHostInfo("prod-id-count-store", 123, new IntegerSerializer());
-		assertThat(hostInfo.host() + ":" + hostInfo.port()).isEqualTo(embeddedKafka.getBrokersAsString());
+		HostInfo hostInfo = interactiveQueryService.getHostInfo("prod-id-count-store",
+				123, new IntegerSerializer());
+		assertThat(hostInfo.host() + ":" + hostInfo.port())
+				.isEqualTo(embeddedKafka.getBrokersAsString());
 
-		HostInfo hostInfoFoo = interactiveQueryService.getHostInfo("prod-id-count-store-foo", 123, new IntegerSerializer());
+		HostInfo hostInfoFoo = interactiveQueryService
+				.getHostInfo("prod-id-count-store-foo", 123, new IntegerSerializer());
 		assertThat(hostInfoFoo).isNull();
 	}
 
@@ -137,13 +156,13 @@ public class KafkaStreamsInteractiveQueryIntegrationTests {
 		@SuppressWarnings("deprecation")
 		public KStream process(KStream input) {
 
-			return input
-					.filter((key, product) -> product.getId() == 123)
+			return input.filter((key, product) -> product.getId() == 123)
 					.map((key, value) -> new KeyValue<>(value.id, value))
-					.groupByKey(Serialized.with(new Serdes.IntegerSerde(), new JsonSerde<>(Product.class)))
-					.count(Materialized.as("prod-id-count-store"))
-					.toStream()
-					.map((key, value) -> new KeyValue<>(null, "Count for product with ID 123: " + value));
+					.groupByKey(Serialized.with(new Serdes.IntegerSerde(),
+							new JsonSerde<>(Product.class)))
+					.count(Materialized.as("prod-id-count-store")).toStream()
+					.map((key, value) -> new KeyValue<>(null,
+							"Count for product with ID 123: " + value));
 		}
 
 		@Bean
@@ -152,6 +171,7 @@ public class KafkaStreamsInteractiveQueryIntegrationTests {
 		}
 
 		static class Foo {
+
 			InteractiveQueryService interactiveQueryService;
 
 			Foo(InteractiveQueryService interactiveQueryService) {
@@ -159,12 +179,15 @@ public class KafkaStreamsInteractiveQueryIntegrationTests {
 			}
 
 			public Long getProductStock(Integer id) {
-				ReadOnlyKeyValueStore keyValueStore =
-						interactiveQueryService.getQueryableStore("prod-id-count-store", QueryableStoreTypes.keyValueStore());
+				ReadOnlyKeyValueStore keyValueStore = interactiveQueryService
+						.getQueryableStore("prod-id-count-store",
+								QueryableStoreTypes.keyValueStore());
 
 				return (Long) keyValueStore.get(id);
 			}
+
 		}
+
 	}
 
 	static class Product {
@@ -178,5 +201,7 @@ public class KafkaStreamsInteractiveQueryIntegrationTests {
 		public void setId(Integer id) {
 			this.id = id;
 		}
+
 	}
+
 }
diff --git a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/KafkaStreamsNativeEncodingDecodingTests.java b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/KafkaStreamsNativeEncodingDecodingTests.java
index a8161a859..c9dabd1fb 100644
--- a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/KafkaStreamsNativeEncodingDecodingTests.java
+++ b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/KafkaStreamsNativeEncodingDecodingTests.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2018 the original author or authors.
+ * Copyright 2018-2019 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -69,26 +69,32 @@ import static org.mockito.Mockito.verify;
 public abstract class KafkaStreamsNativeEncodingDecodingTests {
 
 	@ClassRule
-	public static EmbeddedKafkaRule embeddedKafkaRule = new EmbeddedKafkaRule(1, true, "counts");
+	public static EmbeddedKafkaRule embeddedKafkaRule = new EmbeddedKafkaRule(1, true,
+			"counts");
 
-	private static EmbeddedKafkaBroker embeddedKafka = embeddedKafkaRule.getEmbeddedKafka();
+	private static EmbeddedKafkaBroker embeddedKafka = embeddedKafkaRule
+			.getEmbeddedKafka();
 
 	@SpyBean
-	org.springframework.cloud.stream.binder.kafka.streams.KafkaStreamsMessageConversionDelegate KafkaStreamsMessageConversionDelegate;
+	org.springframework.cloud.stream.binder.kafka.streams.KafkaStreamsMessageConversionDelegate conversionDelegate;
 
 	private static Consumer consumer;
 
 	@BeforeClass
-	public static void setUp() throws Exception {
-		System.setProperty("spring.cloud.stream.kafka.streams.binder.brokers", embeddedKafka.getBrokersAsString());
-		System.setProperty("spring.cloud.stream.kafka.streams.binder.zkNodes", embeddedKafka.getZookeeperConnectionString());
+	public static void setUp() {
+		System.setProperty("spring.cloud.stream.kafka.streams.binder.brokers",
+				embeddedKafka.getBrokersAsString());
+		System.setProperty("spring.cloud.stream.kafka.streams.binder.zkNodes",
+				embeddedKafka.getZookeeperConnectionString());
 
-		System.setProperty("server.port","0");
-		System.setProperty("spring.jmx.enabled","false");
+		System.setProperty("server.port", "0");
+		System.setProperty("spring.jmx.enabled", "false");
 
-		Map consumerProps = KafkaTestUtils.consumerProps("group", "false", embeddedKafka);
+		Map consumerProps = KafkaTestUtils.consumerProps("group", "false",
+				embeddedKafka);
 		consumerProps.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
-		DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(consumerProps);
+		DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(
+				consumerProps);
 		consumer = cf.createConsumer();
 		embeddedKafka.consumeFromAnEmbeddedTopic(consumer, "counts");
 	}
@@ -101,44 +107,54 @@ public abstract class KafkaStreamsNativeEncodingDecodingTests {
 	@SpringBootTest(properties = {
 			"spring.cloud.stream.bindings.input.consumer.useNativeDecoding=true",
 			"spring.cloud.stream.bindings.output.producer.useNativeEncoding=true",
-			"spring.cloud.stream.kafka.streams.bindings.input.consumer.applicationId=NativeEncodingDecodingEnabledTests-abc"
-	},
-			webEnvironment= SpringBootTest.WebEnvironment.NONE
-			)
-	public static class NativeEncodingDecodingEnabledTests extends KafkaStreamsNativeEncodingDecodingTests {
+			"spring.cloud.stream.kafka.streams.bindings.input.consumer.applicationId"
+					+ "=NativeEncodingDecodingEnabledTests-abc" }, webEnvironment = SpringBootTest.WebEnvironment.NONE)
+	public static class NativeEncodingDecodingEnabledTests
+			extends KafkaStreamsNativeEncodingDecodingTests {
 
 		@Test
 		public void test() throws Exception {
 			Map senderProps = KafkaTestUtils.producerProps(embeddedKafka);
-			DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(senderProps);
+			DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(
+					senderProps);
 			KafkaTemplate template = new KafkaTemplate<>(pf, true);
 			template.setDefaultTopic("words");
 			template.sendDefault("foobar");
-			ConsumerRecord cr = KafkaTestUtils.getSingleRecord(consumer, "counts");
+			ConsumerRecord cr = KafkaTestUtils.getSingleRecord(consumer,
+					"counts");
 			assertThat(cr.value().equals("Count for foobar : 1")).isTrue();
 
-			verify(KafkaStreamsMessageConversionDelegate, never()).serializeOnOutbound(any(KStream.class));
-			verify(KafkaStreamsMessageConversionDelegate, never()).deserializeOnInbound(any(Class.class), any(KStream.class));
+			verify(conversionDelegate, never()).serializeOnOutbound(any(KStream.class));
+			verify(conversionDelegate, never()).deserializeOnInbound(any(Class.class),
+					any(KStream.class));
 		}
+
 	}
 
-	@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.NONE,
-	properties = "spring.cloud.stream.kafka.streams.bindings.input.consumer.applicationId=NativeEncodingDecodingEnabledTests-xyz")
-	public static class NativeEncodingDecodingDisabledTests extends KafkaStreamsNativeEncodingDecodingTests {
+	// @checkstyle:off
+	@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, properties = "spring.cloud.stream.kafka.streams.bindings.input.consumer.applicationId"
+			+ "=NativeEncodingDecodingEnabledTests-xyz")
+	// @checkstyle:on
+	public static class NativeEncodingDecodingDisabledTests
+			extends KafkaStreamsNativeEncodingDecodingTests {
 
 		@Test
 		public void test() throws Exception {
 			Map senderProps = KafkaTestUtils.producerProps(embeddedKafka);
-			DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(senderProps);
+			DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(
+					senderProps);
 			KafkaTemplate template = new KafkaTemplate<>(pf, true);
 			template.setDefaultTopic("words");
 			template.sendDefault("foobar");
-			ConsumerRecord cr = KafkaTestUtils.getSingleRecord(consumer, "counts");
+			ConsumerRecord cr = KafkaTestUtils.getSingleRecord(consumer,
+					"counts");
 			assertThat(cr.value().equals("Count for foobar : 1")).isTrue();
 
-			verify(KafkaStreamsMessageConversionDelegate).serializeOnOutbound(any(KStream.class));
-			verify(KafkaStreamsMessageConversionDelegate).deserializeOnInbound(any(Class.class), any(KStream.class));
+			verify(conversionDelegate).serializeOnOutbound(any(KStream.class));
+			verify(conversionDelegate).deserializeOnInbound(any(Class.class),
+					any(KStream.class));
 		}
+
 	}
 
 	@EnableBinding(KafkaStreamsProcessor.class)
@@ -155,14 +171,15 @@ public abstract class KafkaStreamsNativeEncodingDecodingTests {
 		public KStream process(KStream input) {
 
 			return input
-					.flatMapValues(value -> Arrays.asList(value.toLowerCase().split("\\W+")))
+					.flatMapValues(
+							value -> Arrays.asList(value.toLowerCase().split("\\W+")))
 					.map((key, value) -> new KeyValue<>(value, value))
 					.groupByKey(Serialized.with(Serdes.String(), Serdes.String()))
-					.windowedBy(timeWindows)
-					.count(Materialized.as("foo-WordCounts-x"))
-					.toStream()
-					.map((key, value) -> new KeyValue<>(null, "Count for " + key.key() + " : " + value));
+					.windowedBy(timeWindows).count(Materialized.as("foo-WordCounts-x"))
+					.toStream().map((key, value) -> new KeyValue<>(null,
+							"Count for " + key.key() + " : " + value));
 		}
+
 	}
 
 }
diff --git a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/KafkaStreamsStateStoreIntegrationTests.java b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/KafkaStreamsStateStoreIntegrationTests.java
index de08e4195..8d7cb662d 100644
--- a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/KafkaStreamsStateStoreIntegrationTests.java
+++ b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/KafkaStreamsStateStoreIntegrationTests.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2018 the original author or authors.
+ * Copyright 2018-2019 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -16,7 +16,6 @@
 
 package org.springframework.cloud.stream.binder.kafka.streams.integration;
 
-
 import java.util.Map;
 
 import org.apache.kafka.streams.kstream.KStream;
@@ -50,9 +49,11 @@ import static org.assertj.core.api.Assertions.assertThat;
 public class KafkaStreamsStateStoreIntegrationTests {
 
 	@ClassRule
-	public static EmbeddedKafkaRule embeddedKafkaRule = new EmbeddedKafkaRule(1, true, "counts-id");
+	public static EmbeddedKafkaRule embeddedKafkaRule = new EmbeddedKafkaRule(1, true,
+			"counts-id");
 
-	private static EmbeddedKafkaBroker embeddedKafka = embeddedKafkaRule.getEmbeddedKafka();
+	private static EmbeddedKafkaBroker embeddedKafka = embeddedKafkaRule
+			.getEmbeddedKafka();
 
 	@Test
 	public void testKstreamStateStore() throws Exception {
@@ -62,31 +63,41 @@ public class KafkaStreamsStateStoreIntegrationTests {
 				"--spring.jmx.enabled=false",
 				"--spring.cloud.stream.bindings.input.destination=foobar",
 				"--spring.cloud.stream.kafka.streams.binder.configuration.commit.interval.ms=1000",
-				"--spring.cloud.stream.kafka.streams.binder.configuration.default.key.serde=org.apache.kafka.common.serialization.Serdes$StringSerde",
-				"--spring.cloud.stream.kafka.streams.binder.configuration.default.value.serde=org.apache.kafka.common.serialization.Serdes$StringSerde",
-				"--spring.cloud.stream.kafka.streams.bindings.input.consumer.applicationId=KafkaStreamsStateStoreIntegrationTests-abc",
-				"--spring.cloud.stream.kafka.streams.binder.brokers=" + embeddedKafka.getBrokersAsString(),
-				"--spring.cloud.stream.kafka.streams.binder.zkNodes=" + embeddedKafka.getZookeeperConnectionString());
+				"--spring.cloud.stream.kafka.streams.binder.configuration.default.key.serde"
+						+ "=org.apache.kafka.common.serialization.Serdes$StringSerde",
+				"--spring.cloud.stream.kafka.streams.binder.configuration.default.value.serde"
+						+ "=org.apache.kafka.common.serialization.Serdes$StringSerde",
+				"--spring.cloud.stream.kafka.streams.bindings.input.consumer.applicationId"
+						+ "=KafkaStreamsStateStoreIntegrationTests-abc",
+				"--spring.cloud.stream.kafka.streams.binder.brokers="
+						+ embeddedKafka.getBrokersAsString(),
+				"--spring.cloud.stream.kafka.streams.binder.zkNodes="
+						+ embeddedKafka.getZookeeperConnectionString());
 		try {
 			Thread.sleep(2000);
 			receiveAndValidateFoo(context);
-		} catch (Exception e) {
+		}
+		catch (Exception e) {
 			throw e;
-		} finally {
+		}
+		finally {
 			context.close();
 		}
 	}
 
-	private void receiveAndValidateFoo(ConfigurableApplicationContext context) throws Exception {
+	private void receiveAndValidateFoo(ConfigurableApplicationContext context)
+			throws Exception {
 		Map senderProps = KafkaTestUtils.producerProps(embeddedKafka);
-		DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(senderProps);
+		DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(
+				senderProps);
 		KafkaTemplate template = new KafkaTemplate<>(pf, true);
 		template.setDefaultTopic("foobar");
 		template.sendDefault("{\"id\":\"123\"}");
 		Thread.sleep(1000);
 
-		//assertions
-		ProductCountApplication productCount = context.getBean(ProductCountApplication.class);
+		// assertions
+		ProductCountApplication productCount = context
+				.getBean(ProductCountApplication.class);
 		WindowStore state = productCount.state;
 		assertThat(state != null).isTrue();
 		assertThat(state.name()).isEqualTo("mystate");
@@ -99,34 +110,35 @@ public class KafkaStreamsStateStoreIntegrationTests {
 	public static class ProductCountApplication {
 
 		WindowStore state;
+
 		boolean processed;
 
 		@StreamListener("input")
 		@KafkaStreamsStateStore(name = "mystate", type = KafkaStreamsStateStoreProperties.StoreType.WINDOW, lengthMs = 300000)
-		@SuppressWarnings({"deprecation", "unchecked"})
+		@SuppressWarnings({ "deprecation", "unchecked" })
 		public void process(KStream input) {
 
-			input
-				.process(() -> new Processor() {
+			input.process(() -> new Processor() {
 
-					@Override
-					public void init(ProcessorContext processorContext) {
-						state = (WindowStore) processorContext.getStateStore("mystate");
-					}
+				@Override
+				public void init(ProcessorContext processorContext) {
+					state = (WindowStore) processorContext.getStateStore("mystate");
+				}
 
-					@Override
-					public void process(Object s, Product product) {
-						processed = true;
-					}
+				@Override
+				public void process(Object s, Product product) {
+					processed = true;
+				}
 
-					@Override
-					public void close() {
-						if (state != null) {
-							state.close();
-						}
+				@Override
+				public void close() {
+					if (state != null) {
+						state.close();
 					}
-				}, "mystate");
+				}
+			}, "mystate");
 		}
+
 	}
 
 	public static class Product {
@@ -140,11 +152,14 @@ public class KafkaStreamsStateStoreIntegrationTests {
 		public void setId(Integer id) {
 			this.id = id;
 		}
+
 	}
 
 	interface KafkaStreamsProcessorX {
 
 		@Input("input")
 		KStream input();
+
 	}
+
 }
diff --git a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/KafkastreamsBinderPojoInputStringOutputIntegrationTests.java b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/KafkastreamsBinderPojoInputStringOutputIntegrationTests.java
index 960b45711..f57ac5de0 100644
--- a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/KafkastreamsBinderPojoInputStringOutputIntegrationTests.java
+++ b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/KafkastreamsBinderPojoInputStringOutputIntegrationTests.java
@@ -60,17 +60,21 @@ import static org.assertj.core.api.Assertions.assertThat;
 public class KafkastreamsBinderPojoInputStringOutputIntegrationTests {
 
 	@ClassRule
-	public static EmbeddedKafkaRule embeddedKafkaRule = new EmbeddedKafkaRule(1, true, "counts-id");
+	public static EmbeddedKafkaRule embeddedKafkaRule = new EmbeddedKafkaRule(1, true,
+			"counts-id");
 
-	private static EmbeddedKafkaBroker embeddedKafka = embeddedKafkaRule.getEmbeddedKafka();
+	private static EmbeddedKafkaBroker embeddedKafka = embeddedKafkaRule
+			.getEmbeddedKafka();
 
 	private static Consumer consumer;
 
 	@BeforeClass
 	public static void setUp() throws Exception {
-		Map consumerProps = KafkaTestUtils.consumerProps("group-id", "false", embeddedKafka);
+		Map consumerProps = KafkaTestUtils.consumerProps("group-id",
+				"false", embeddedKafka);
 		consumerProps.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
-		DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(consumerProps);
+		DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(
+				consumerProps);
 		consumer = cf.createConsumer();
 		embeddedKafka.consumeFromAnEmbeddedTopic(consumer, "counts-id");
 	}
@@ -89,19 +93,24 @@ public class KafkastreamsBinderPojoInputStringOutputIntegrationTests {
 				"--spring.cloud.stream.bindings.input.destination=foos",
 				"--spring.cloud.stream.bindings.output.destination=counts-id",
 				"--spring.cloud.stream.kafka.streams.binder.configuration.commit.interval.ms=1000",
-				"--spring.cloud.stream.kafka.streams.binder.configuration.default.key.serde=org.apache.kafka.common.serialization.Serdes$StringSerde",
-				"--spring.cloud.stream.kafka.streams.binder.configuration.default.value.serde=org.apache.kafka.common.serialization.Serdes$StringSerde",
-				"--spring.cloud.stream.kafka.streams.bindings.output.producer.keySerde=org.apache.kafka.common.serialization.Serdes$IntegerSerde",
+				"--spring.cloud.stream.kafka.streams.binder.configuration.default.key.serde"
+						+ "=org.apache.kafka.common.serialization.Serdes$StringSerde",
+				"--spring.cloud.stream.kafka.streams.binder.configuration.default.value.serde"
+						+ "=org.apache.kafka.common.serialization.Serdes$StringSerde",
+				"--spring.cloud.stream.kafka.streams.bindings.output.producer.keySerde"
+						+ "=org.apache.kafka.common.serialization.Serdes$IntegerSerde",
 				"--spring.cloud.stream.kafka.streams.bindings.input.consumer.applicationId=ProductCountApplication-xyz",
-				"--spring.cloud.stream.kafka.streams.binder.brokers=" + embeddedKafka.getBrokersAsString(),
-				"--spring.cloud.stream.kafka.streams.binder.zkNodes=" + embeddedKafka.getZookeeperConnectionString());
+				"--spring.cloud.stream.kafka.streams.binder.brokers="
+						+ embeddedKafka.getBrokersAsString(),
+				"--spring.cloud.stream.kafka.streams.binder.zkNodes="
+						+ embeddedKafka.getZookeeperConnectionString());
 		try {
 			receiveAndValidateFoo(context);
-			//Assertions on StreamBuilderFactoryBean
-			StreamsBuilderFactoryBean streamsBuilderFactoryBean = context.getBean("&stream-builder-process",
-					StreamsBuilderFactoryBean.class);
-			CleanupConfig cleanup = TestUtils.getPropertyValue(streamsBuilderFactoryBean, "cleanupConfig",
-					CleanupConfig.class);
+			// Assertions on StreamBuilderFactoryBean
+			StreamsBuilderFactoryBean streamsBuilderFactoryBean = context
+					.getBean("&stream-builder-process", StreamsBuilderFactoryBean.class);
+			CleanupConfig cleanup = TestUtils.getPropertyValue(streamsBuilderFactoryBean,
+					"cleanupConfig", CleanupConfig.class);
 			assertThat(cleanup.cleanupOnStart()).isFalse();
 			assertThat(cleanup.cleanupOnStop()).isTrue();
 		}
@@ -110,13 +119,16 @@ public class KafkastreamsBinderPojoInputStringOutputIntegrationTests {
 		}
 	}
 
-	private void receiveAndValidateFoo(ConfigurableApplicationContext context) throws Exception {
+	private void receiveAndValidateFoo(ConfigurableApplicationContext context)
+			throws Exception {
 		Map senderProps = KafkaTestUtils.producerProps(embeddedKafka);
-		DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(senderProps);
+		DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(
+				senderProps);
 		KafkaTemplate template = new KafkaTemplate<>(pf, true);
 		template.setDefaultTopic("foos");
 		template.sendDefault("{\"id\":\"123\"}");
-		ConsumerRecord cr = KafkaTestUtils.getSingleRecord(consumer, "counts-id");
+		ConsumerRecord cr = KafkaTestUtils.getSingleRecord(consumer,
+				"counts-id");
 		assertThat(cr.value().contains("Count for product with ID 123: 1")).isTrue();
 	}
 
@@ -128,15 +140,16 @@ public class KafkastreamsBinderPojoInputStringOutputIntegrationTests {
 		@SendTo("output")
 		public KStream process(KStream input) {
 
-			return input
-					.filter((key, product) -> product.getId() == 123)
+			return input.filter((key, product) -> product.getId() == 123)
 					.map((key, value) -> new KeyValue<>(value, value))
-					.groupByKey(Serialized.with(new JsonSerde<>(Product.class), new JsonSerde<>(Product.class)))
+					.groupByKey(Serialized.with(new JsonSerde<>(Product.class),
+							new JsonSerde<>(Product.class)))
 					.windowedBy(TimeWindows.of(5000))
-					.count(Materialized.as("id-count-store"))
-					.toStream()
-					.map((key, value) -> new KeyValue<>(key.key().id, "Count for product with ID 123: " + value));
+					.count(Materialized.as("id-count-store")).toStream()
+					.map((key, value) -> new KeyValue<>(key.key().id,
+							"Count for product with ID 123: " + value));
 		}
+
 	}
 
 	static class Product {
@@ -150,5 +163,7 @@ public class KafkastreamsBinderPojoInputStringOutputIntegrationTests {
 		public void setId(Integer id) {
 			this.id = id;
 		}
+
 	}
+
 }
diff --git a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/PerRecordAvroContentTypeTests.java b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/PerRecordAvroContentTypeTests.java
index cbf629f86..5be5ee210 100644
--- a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/PerRecordAvroContentTypeTests.java
+++ b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/PerRecordAvroContentTypeTests.java
@@ -66,21 +66,26 @@ import static org.assertj.core.api.Assertions.assertThat;
 public class PerRecordAvroContentTypeTests {
 
 	@ClassRule
-	public static EmbeddedKafkaRule embeddedKafkaRule = new EmbeddedKafkaRule(1, true, "received-sensors");
+	public static EmbeddedKafkaRule embeddedKafkaRule = new EmbeddedKafkaRule(1, true,
+			"received-sensors");
 
-	private static EmbeddedKafkaBroker embeddedKafka = embeddedKafkaRule.getEmbeddedKafka();
+	private static EmbeddedKafkaBroker embeddedKafka = embeddedKafkaRule
+			.getEmbeddedKafka();
 
 	private static Consumer consumer;
 
 	@BeforeClass
 	public static void setUp() throws Exception {
-		Map consumerProps = KafkaTestUtils.consumerProps("avro-ct-test", "false", embeddedKafka);
+		Map consumerProps = KafkaTestUtils.consumerProps("avro-ct-test",
+				"false", embeddedKafka);
 
-		//Receive the data as byte[]
-		consumerProps.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, ByteArrayDeserializer.class);
+		// Receive the data as byte[]
+		consumerProps.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG,
+				ByteArrayDeserializer.class);
 
 		consumerProps.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
-		DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(consumerProps);
+		DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(
+				consumerProps);
 		consumer = cf.createConsumer();
 		embeddedKafka.consumeFromAnEmbeddedTopic(consumer, "received-sensors");
 	}
@@ -102,12 +107,15 @@ public class PerRecordAvroContentTypeTests {
 				"--spring.cloud.stream.bindings.output.contentType=application/avro",
 				"--spring.cloud.stream.kafka.streams.bindings.input.consumer.application-id=per-record-avro-contentType-test",
 				"--spring.cloud.stream.kafka.streams.binder.configuration.commit.interval.ms=1000",
-				"--spring.cloud.stream.kafka.streams.binder.brokers=" + embeddedKafka.getBrokersAsString())) {
+				"--spring.cloud.stream.kafka.streams.binder.brokers="
+						+ embeddedKafka.getBrokersAsString())) {
 
 			Map senderProps = KafkaTestUtils.producerProps(embeddedKafka);
-			//Use a custom avro test serializer
-			senderProps.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, TestAvroSerializer.class);
-			DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(senderProps);
+			// Use a custom avro test serializer
+			senderProps.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG,
+					TestAvroSerializer.class);
+			DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(
+					senderProps);
 			try {
 				KafkaTemplate template = new KafkaTemplate<>(pf, true);
 
@@ -117,26 +125,32 @@ public class PerRecordAvroContentTypeTests {
 				sensor.setAcceleration(random.nextFloat() * 10);
 				sensor.setVelocity(random.nextFloat() * 100);
 				sensor.setTemperature(random.nextFloat() * 50);
-				//Send with avro content type set.
+				// Send with avro content type set.
 				Message message = MessageBuilder.withPayload(sensor)
-						.setHeader("contentType", "application/avro")
-						.build();
+						.setHeader("contentType", "application/avro").build();
 				template.setDefaultTopic("sensors");
 				template.send(message);
 
-				//Serialized byte[] ^^ is received by the binding process and deserialzed it using avro converter.
-				//Then finally, the data will be output to a return topic as byte[] (using the same avro converter).
+				// Serialized byte[] ^^ is received by the binding process and deserialzed
+				// it using avro converter.
+				// Then finally, the data will be output to a return topic as byte[]
+				// (using the same avro converter).
 
-				//Receive the byte[] from return topic
-				ConsumerRecord cr = KafkaTestUtils.getSingleRecord(consumer, "received-sensors");
+				// Receive the byte[] from return topic
+				ConsumerRecord cr = KafkaTestUtils
+						.getSingleRecord(consumer, "received-sensors");
 				final byte[] value = cr.value();
 
-				//Convert the byte[] received back to avro object and verify that it is the same as the one we sent ^^.
+				// Convert the byte[] received back to avro object and verify that it is
+				// the same as the one we sent ^^.
 				AvroSchemaMessageConverter avroSchemaMessageConverter = new AvroSchemaMessageConverter();
 
 				Message receivedMessage = MessageBuilder.withPayload(value)
-						.setHeader("contentType", MimeTypeUtils.parseMimeType("application/avro")).build();
-				Sensor messageConverted = (Sensor)avroSchemaMessageConverter.fromMessage(receivedMessage, Sensor.class);
+						.setHeader("contentType",
+								MimeTypeUtils.parseMimeType("application/avro"))
+						.build();
+				Sensor messageConverted = (Sensor) avroSchemaMessageConverter
+						.fromMessage(receivedMessage, Sensor.class);
 				assertThat(messageConverted).isEqualTo(sensor);
 			}
 			finally {
@@ -152,7 +166,8 @@ public class PerRecordAvroContentTypeTests {
 		@StreamListener
 		@SendTo("output")
 		public KStream process(@Input("input") KStream input) {
-			//return the same Sensor object unchanged so that we can do test verifications
+			// return the same Sensor object unchanged so that we can do test
+			// verifications
 			return input.map(KeyValue::new);
 		}
 
@@ -161,5 +176,7 @@ public class PerRecordAvroContentTypeTests {
 		public MessageConverter sensorMessageConverter() throws IOException {
 			return new AvroSchemaMessageConverter();
 		}
+
 	}
+
 }
diff --git a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/StreamToGlobalKTableJoinIntegrationTests.java b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/StreamToGlobalKTableJoinIntegrationTests.java
index 91aa4605c..2bd8a7adb 100644
--- a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/StreamToGlobalKTableJoinIntegrationTests.java
+++ b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/StreamToGlobalKTableJoinIntegrationTests.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2018 the original author or authors.
+ * Copyright 2018-2019 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -62,52 +62,18 @@ import static org.assertj.core.api.Assertions.assertThat;
 public class StreamToGlobalKTableJoinIntegrationTests {
 
 	@ClassRule
-	public static EmbeddedKafkaRule embeddedKafkaRule = new EmbeddedKafkaRule(1, true, "enriched-order");
+	public static EmbeddedKafkaRule embeddedKafkaRule = new EmbeddedKafkaRule(1, true,
+			"enriched-order");
 
-	private static EmbeddedKafkaBroker embeddedKafka = embeddedKafkaRule.getEmbeddedKafka();
+	private static EmbeddedKafkaBroker embeddedKafka = embeddedKafkaRule
+			.getEmbeddedKafka();
 
 	private static Consumer consumer;
 
-	interface CustomGlobalKTableProcessor extends KafkaStreamsProcessor {
-
-		@Input("input-x")
-		GlobalKTable inputX();
-
-		@Input("input-y")
-		GlobalKTable inputY();
-	}
-
-	@EnableBinding(CustomGlobalKTableProcessor.class)
-	@EnableAutoConfiguration
-	@EnableConfigurationProperties(KafkaStreamsApplicationSupportProperties.class)
-	public static class OrderEnricherApplication {
-
-		@StreamListener
-		@SendTo("output")
-		public KStream process(@Input("input") KStream ordersStream,
-													@Input("input-x") GlobalKTable customers,
-													@Input("input-y") GlobalKTable products) {
-
-			KStream customerOrdersStream = ordersStream.join(customers,
-					(orderId, order) -> order.getCustomerId(),
-					(order, customer) -> new CustomerOrder(customer, order));
-
-			return customerOrdersStream.join(products,
-					(orderId, customerOrder) -> customerOrder
-							.productId(),
-					(customerOrder, product) -> {
-						EnrichedOrder enrichedOrder = new EnrichedOrder();
-						enrichedOrder.setProduct(product);
-						enrichedOrder.setCustomer(customerOrder.customer);
-						enrichedOrder.setOrder(customerOrder.order);
-						return enrichedOrder;
-					});
-		}
-	}
-
 	@Test
 	public void testStreamToGlobalKTable() throws Exception {
-		SpringApplication app = new SpringApplication(StreamToGlobalKTableJoinIntegrationTests.OrderEnricherApplication.class);
+		SpringApplication app = new SpringApplication(
+				StreamToGlobalKTableJoinIntegrationTests.OrderEnricherApplication.class);
 		app.setWebApplicationType(WebApplicationType.NONE);
 		try (ConfigurableApplicationContext ignored = app.run("--server.port=0",
 				"--spring.jmx.enabled=false",
@@ -119,27 +85,49 @@ public class StreamToGlobalKTableJoinIntegrationTests {
 				"--spring.cloud.stream.bindings.input-x.consumer.useNativeDecoding=true",
 				"--spring.cloud.stream.bindings.input-y.consumer.useNativeDecoding=true",
 				"--spring.cloud.stream.bindings.output.producer.useNativeEncoding=true",
-				"--spring.cloud.stream.kafka.streams.bindings.input.consumer.keySerde=org.apache.kafka.common.serialization.Serdes$LongSerde",
-				"--spring.cloud.stream.kafka.streams.bindings.input.consumer.valueSerde=org.springframework.cloud.stream.binder.kafka.streams.integration.StreamToGlobalKTableJoinIntegrationTests$OrderSerde",
-				"--spring.cloud.stream.kafka.streams.bindings.input-x.consumer.keySerde=org.apache.kafka.common.serialization.Serdes$LongSerde",
-				"--spring.cloud.stream.kafka.streams.bindings.input-x.consumer.valueSerde=org.springframework.cloud.stream.binder.kafka.streams.integration.StreamToGlobalKTableJoinIntegrationTests$CustomerSerde",
-				"--spring.cloud.stream.kafka.streams.bindings.input-y.consumer.keySerde=org.apache.kafka.common.serialization.Serdes$LongSerde",
-				"--spring.cloud.stream.kafka.streams.bindings.input-y.consumer.valueSerde=org.springframework.cloud.stream.binder.kafka.streams.integration.StreamToGlobalKTableJoinIntegrationTests$ProductSerde",
-				"--spring.cloud.stream.kafka.streams.bindings.output.producer.keySerde=org.apache.kafka.common.serialization.Serdes$LongSerde",
-				"--spring.cloud.stream.kafka.streams.bindings.output.producer.valueSerde=org.springframework.cloud.stream.binder.kafka.streams.integration.StreamToGlobalKTableJoinIntegrationTests$EnrichedOrderSerde",
-				"--spring.cloud.stream.kafka.streams.binder.configuration.default.key.serde=org.apache.kafka.common.serialization.Serdes$StringSerde",
-				"--spring.cloud.stream.kafka.streams.binder.configuration.default.value.serde=org.apache.kafka.common.serialization.Serdes$StringSerde",
+				"--spring.cloud.stream.kafka.streams.bindings.input.consumer.keySerde"
+						+ "=org.apache.kafka.common.serialization.Serdes$LongSerde",
+				"--spring.cloud.stream.kafka.streams.bindings.input.consumer.valueSerde"
+						+ "=org.springframework.cloud.stream.binder.kafka.streams.integration"
+						+ ".StreamToGlobalKTableJoinIntegrationTests$OrderSerde",
+				"--spring.cloud.stream.kafka.streams.bindings.input-x.consumer.keySerde"
+						+ "=org.apache.kafka.common.serialization.Serdes$LongSerde",
+				"--spring.cloud.stream.kafka.streams.bindings.input-x.consumer.valueSerde"
+						+ "=org.springframework.cloud.stream.binder.kafka.streams.integration."
+						+ "StreamToGlobalKTableJoinIntegrationTests$CustomerSerde",
+				"--spring.cloud.stream.kafka.streams.bindings.input-y.consumer.keySerde"
+						+ "=org.apache.kafka.common.serialization.Serdes$LongSerde",
+				"--spring.cloud.stream.kafka.streams.bindings.input-y.consumer.valueSerde"
+						+ "=org.springframework.cloud.stream.binder.kafka.streams."
+						+ "integration.StreamToGlobalKTableJoinIntegrationTests$ProductSerde",
+				"--spring.cloud.stream.kafka.streams.bindings.output.producer.keySerde"
+						+ "=org.apache.kafka.common.serialization.Serdes$LongSerde",
+				"--spring.cloud.stream.kafka.streams.bindings.output.producer.valueSerde"
+						+ "=org.springframework.cloud.stream.binder.kafka.streams.integration"
+						+ ".StreamToGlobalKTableJoinIntegrationTests$EnrichedOrderSerde",
+				"--spring.cloud.stream.kafka.streams.binder.configuration.default.key.serde"
+						+ "=org.apache.kafka.common.serialization.Serdes$StringSerde",
+				"--spring.cloud.stream.kafka.streams.binder.configuration.default.value.serde"
+						+ "=org.apache.kafka.common.serialization.Serdes$StringSerde",
 				"--spring.cloud.stream.kafka.streams.binder.configuration.commit.interval.ms=10000",
-				"--spring.cloud.stream.kafka.streams.bindings.input.consumer.applicationId=StreamToGlobalKTableJoinIntegrationTests-abc",
-				"--spring.cloud.stream.kafka.streams.binder.brokers=" + embeddedKafka.getBrokersAsString(),
-				"--spring.cloud.stream.kafka.streams.binder.zkNodes=" + embeddedKafka.getZookeeperConnectionString())) {
-			Map senderPropsCustomer = KafkaTestUtils.producerProps(embeddedKafka);
-			senderPropsCustomer.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, LongSerializer.class);
+				"--spring.cloud.stream.kafka.streams.bindings.input.consumer.applicationId"
+						+ "=StreamToGlobalKTableJoinIntegrationTests-abc",
+				"--spring.cloud.stream.kafka.streams.binder.brokers="
+						+ embeddedKafka.getBrokersAsString(),
+				"--spring.cloud.stream.kafka.streams.binder.zkNodes="
+						+ embeddedKafka.getZookeeperConnectionString())) {
+			Map senderPropsCustomer = KafkaTestUtils
+					.producerProps(embeddedKafka);
+			senderPropsCustomer.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG,
+					LongSerializer.class);
 			CustomerSerde customerSerde = new CustomerSerde();
-			senderPropsCustomer.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, customerSerde.serializer().getClass());
+			senderPropsCustomer.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG,
+					customerSerde.serializer().getClass());
 
-			DefaultKafkaProducerFactory pfCustomer = new DefaultKafkaProducerFactory<>(senderPropsCustomer);
-			KafkaTemplate template = new KafkaTemplate<>(pfCustomer, true);
+			DefaultKafkaProducerFactory pfCustomer = new DefaultKafkaProducerFactory<>(
+					senderPropsCustomer);
+			KafkaTemplate template = new KafkaTemplate<>(pfCustomer,
+					true);
 			template.setDefaultTopic("customers");
 			for (long i = 0; i < 5; i++) {
 				final Customer customer = new Customer();
@@ -147,13 +135,18 @@ public class StreamToGlobalKTableJoinIntegrationTests {
 				template.sendDefault(i, customer);
 			}
 
-			Map senderPropsProduct = KafkaTestUtils.producerProps(embeddedKafka);
-			senderPropsProduct.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, LongSerializer.class);
+			Map senderPropsProduct = KafkaTestUtils
+					.producerProps(embeddedKafka);
+			senderPropsProduct.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG,
+					LongSerializer.class);
 			ProductSerde productSerde = new ProductSerde();
-			senderPropsProduct.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, productSerde.serializer().getClass());
+			senderPropsProduct.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG,
+					productSerde.serializer().getClass());
 
-			DefaultKafkaProducerFactory pfProduct = new DefaultKafkaProducerFactory<>(senderPropsProduct);
-			KafkaTemplate productTemplate = new KafkaTemplate<>(pfProduct, true);
+			DefaultKafkaProducerFactory pfProduct = new DefaultKafkaProducerFactory<>(
+					senderPropsProduct);
+			KafkaTemplate productTemplate = new KafkaTemplate<>(pfProduct,
+					true);
 			productTemplate.setDefaultTopic("products");
 
 			for (long i = 0; i < 5; i++) {
@@ -162,12 +155,16 @@ public class StreamToGlobalKTableJoinIntegrationTests {
 				productTemplate.sendDefault(i, product);
 			}
 
-			Map senderPropsOrder = KafkaTestUtils.producerProps(embeddedKafka);
-			senderPropsOrder.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, LongSerializer.class);
+			Map senderPropsOrder = KafkaTestUtils
+					.producerProps(embeddedKafka);
+			senderPropsOrder.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG,
+					LongSerializer.class);
 			OrderSerde orderSerde = new OrderSerde();
-			senderPropsOrder.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, orderSerde.serializer().getClass());
+			senderPropsOrder.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG,
+					orderSerde.serializer().getClass());
 
-			DefaultKafkaProducerFactory pfOrder = new DefaultKafkaProducerFactory<>(senderPropsOrder);
+			DefaultKafkaProducerFactory pfOrder = new DefaultKafkaProducerFactory<>(
+					senderPropsOrder);
 			KafkaTemplate orderTemplate = new KafkaTemplate<>(pfOrder, true);
 			orderTemplate.setDefaultTopic("orders");
 
@@ -178,13 +175,19 @@ public class StreamToGlobalKTableJoinIntegrationTests {
 				orderTemplate.sendDefault(i, order);
 			}
 
-			Map consumerProps = KafkaTestUtils.consumerProps("group", "false", embeddedKafka);
+			Map consumerProps = KafkaTestUtils.consumerProps("group",
+					"false", embeddedKafka);
 			consumerProps.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
-			consumerProps.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, LongDeserializer.class);
+			consumerProps.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG,
+					LongDeserializer.class);
 			EnrichedOrderSerde enrichedOrderSerde = new EnrichedOrderSerde();
-			consumerProps.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, enrichedOrderSerde.deserializer().getClass());
-			consumerProps.put(JsonDeserializer.VALUE_DEFAULT_TYPE, "org.springframework.cloud.stream.binder.kafka.streams.integration.StreamToGlobalKTableJoinIntegrationTests.EnrichedOrder");
-			DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(consumerProps);
+			consumerProps.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG,
+					enrichedOrderSerde.deserializer().getClass());
+			consumerProps.put(JsonDeserializer.VALUE_DEFAULT_TYPE,
+					"org.springframework.cloud.stream.binder.kafka.streams.integration."
+							+ "StreamToGlobalKTableJoinIntegrationTests.EnrichedOrder");
+			DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(
+					consumerProps);
 
 			consumer = cf.createConsumer();
 			embeddedKafka.consumeFromAnEmbeddedTopic(consumer, "enriched-order");
@@ -193,12 +196,14 @@ public class StreamToGlobalKTableJoinIntegrationTests {
 			long start = System.currentTimeMillis();
 			List> enrichedOrders = new ArrayList<>();
 			do {
-				ConsumerRecords records = KafkaTestUtils.getRecords(consumer);
+				ConsumerRecords records = KafkaTestUtils
+						.getRecords(consumer);
 				count = count + records.count();
 				for (ConsumerRecord record : records) {
 					enrichedOrders.add(new KeyValue<>(record.key(), record.value()));
 				}
-			} while (count < 5 && (System.currentTimeMillis() - start) < 30000);
+			}
+			while (count < 5 && (System.currentTimeMillis() - start) < 30000);
 
 			assertThat(count == 5).isTrue();
 			assertThat(enrichedOrders.size() == 5).isTrue();
@@ -206,13 +211,16 @@ public class StreamToGlobalKTableJoinIntegrationTests {
 			enrichedOrders.sort(Comparator.comparing(o -> o.key));
 
 			for (int i = 0; i < 5; i++) {
-				KeyValue enrichedOrderKeyValue = enrichedOrders.get(i);
+				KeyValue enrichedOrderKeyValue = enrichedOrders
+						.get(i);
 				assertThat(enrichedOrderKeyValue.key == i).isTrue();
 				EnrichedOrder enrichedOrder = enrichedOrderKeyValue.value;
 				assertThat(enrichedOrder.getOrder().customerId == i).isTrue();
 				assertThat(enrichedOrder.getOrder().productId == i).isTrue();
-				assertThat(enrichedOrder.getCustomer().name.equals("customer-" + i)).isTrue();
-				assertThat(enrichedOrder.getProduct().name.equals("product-" + i)).isTrue();
+				assertThat(enrichedOrder.getCustomer().name.equals("customer-" + i))
+						.isTrue();
+				assertThat(enrichedOrder.getProduct().name.equals("product-" + i))
+						.isTrue();
 			}
 			pfCustomer.destroy();
 			pfProduct.destroy();
@@ -222,9 +230,49 @@ public class StreamToGlobalKTableJoinIntegrationTests {
 
 	}
 
+	interface CustomGlobalKTableProcessor extends KafkaStreamsProcessor {
+
+		@Input("input-x")
+		GlobalKTable inputX();
+
+		@Input("input-y")
+		GlobalKTable inputY();
+
+	}
+
+	@EnableBinding(CustomGlobalKTableProcessor.class)
+	@EnableAutoConfiguration
+	@EnableConfigurationProperties(KafkaStreamsApplicationSupportProperties.class)
+	public static class OrderEnricherApplication {
+
+		@StreamListener
+		@SendTo("output")
+		public KStream process(
+				@Input("input") KStream ordersStream,
+				@Input("input-x") GlobalKTable customers,
+				@Input("input-y") GlobalKTable products) {
+
+			KStream customerOrdersStream = ordersStream.join(
+					customers, (orderId, order) -> order.getCustomerId(),
+					(order, customer) -> new CustomerOrder(customer, order));
+
+			return customerOrdersStream.join(products,
+					(orderId, customerOrder) -> customerOrder.productId(),
+					(customerOrder, product) -> {
+						EnrichedOrder enrichedOrder = new EnrichedOrder();
+						enrichedOrder.setProduct(product);
+						enrichedOrder.setCustomer(customerOrder.customer);
+						enrichedOrder.setOrder(customerOrder.order);
+						return enrichedOrder;
+					});
+		}
+
+	}
+
 	static class Order {
 
 		long customerId;
+
 		long productId;
 
 		public long getCustomerId() {
@@ -242,6 +290,7 @@ public class StreamToGlobalKTableJoinIntegrationTests {
 		public void setProductId(long productId) {
 			this.productId = productId;
 		}
+
 	}
 
 	static class Customer {
@@ -255,6 +304,7 @@ public class StreamToGlobalKTableJoinIntegrationTests {
 		public void setName(String name) {
 			this.name = name;
 		}
+
 	}
 
 	static class Product {
@@ -268,12 +318,15 @@ public class StreamToGlobalKTableJoinIntegrationTests {
 		public void setName(String name) {
 			this.name = name;
 		}
+
 	}
 
 	static class EnrichedOrder {
 
 		Product product;
+
 		Customer customer;
+
 		Order order;
 
 		public Product getProduct() {
@@ -299,10 +352,13 @@ public class StreamToGlobalKTableJoinIntegrationTests {
 		public void setOrder(Order order) {
 			this.order = order;
 		}
+
 	}
 
 	private static class CustomerOrder {
+
 		private final Customer customer;
+
 		private final Order order;
 
 		CustomerOrder(final Customer customer, final Order order) {
@@ -313,10 +369,23 @@ public class StreamToGlobalKTableJoinIntegrationTests {
 		long productId() {
 			return order.getProductId();
 		}
+
+	}
+
+	public static class OrderSerde extends JsonSerde {
+
+	}
+
+	public static class CustomerSerde extends JsonSerde {
+
+	}
+
+	public static class ProductSerde extends JsonSerde {
+
+	}
+
+	public static class EnrichedOrderSerde extends JsonSerde {
+
 	}
 
-	public static class OrderSerde extends JsonSerde {}
-	public static class CustomerSerde extends JsonSerde {}
-	public static class ProductSerde extends JsonSerde {}
-	public static class EnrichedOrderSerde extends JsonSerde {}
 }
diff --git a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/StreamToTableJoinIntegrationTests.java b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/StreamToTableJoinIntegrationTests.java
index b594b31c6..05b44bee9 100644
--- a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/StreamToTableJoinIntegrationTests.java
+++ b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/StreamToTableJoinIntegrationTests.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2018 the original author or authors.
+ * Copyright 2018-2019 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -65,47 +65,28 @@ import static org.assertj.core.api.Assertions.assertThat;
 public class StreamToTableJoinIntegrationTests {
 
 	@ClassRule
-	public static EmbeddedKafkaRule embeddedKafkaRule = new EmbeddedKafkaRule(1, true, "output-topic-1", "output-topic-2");
+	public static EmbeddedKafkaRule embeddedKafkaRule = new EmbeddedKafkaRule(1, true,
+			"output-topic-1", "output-topic-2");
 
-	private static EmbeddedKafkaBroker embeddedKafka = embeddedKafkaRule.getEmbeddedKafka();
-
-	@EnableBinding(KafkaStreamsProcessorX.class)
-	@EnableAutoConfiguration
-	@EnableConfigurationProperties(KafkaStreamsApplicationSupportProperties.class)
-	public static class CountClicksPerRegionApplication {
-
-		@StreamListener
-		@SendTo("output")
-		public KStream process(@Input("input") KStream userClicksStream,
-											@Input("input-x") KTable userRegionsTable) {
-
-			return userClicksStream
-					.leftJoin(userRegionsTable, (clicks, region) -> new RegionWithClicks(region == null ? "UNKNOWN" : region, clicks),
-							Joined.with(Serdes.String(), Serdes.Long(), null))
-					.map((user, regionWithClicks) -> new KeyValue<>(regionWithClicks.getRegion(), regionWithClicks.getClicks()))
-					.groupByKey(Serialized.with(Serdes.String(), Serdes.Long()))
-					.reduce((firstClicks, secondClicks) -> firstClicks + secondClicks)
-					.toStream();
-		}
-	}
-
-	interface KafkaStreamsProcessorX extends KafkaStreamsProcessor {
-
-		@Input("input-x")
-		KTable inputX();
-	}
+	private static EmbeddedKafkaBroker embeddedKafka = embeddedKafkaRule
+			.getEmbeddedKafka();
 
 	@Test
 	public void testStreamToTable() throws Exception {
-		SpringApplication app = new SpringApplication(CountClicksPerRegionApplication.class);
+		SpringApplication app = new SpringApplication(
+				CountClicksPerRegionApplication.class);
 		app.setWebApplicationType(WebApplicationType.NONE);
 
 		Consumer consumer;
-		Map consumerProps = KafkaTestUtils.consumerProps("group-1", "false", embeddedKafka);
+		Map consumerProps = KafkaTestUtils.consumerProps("group-1",
+				"false", embeddedKafka);
 		consumerProps.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
-		consumerProps.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class);
-		consumerProps.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, LongDeserializer.class);
-		DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(consumerProps);
+		consumerProps.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG,
+				StringDeserializer.class);
+		consumerProps.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG,
+				LongDeserializer.class);
+		DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(
+				consumerProps);
 		consumer = cf.createConsumer();
 		embeddedKafka.consumeFromAnEmbeddedTopic(consumer, "output-topic-1");
 
@@ -117,35 +98,47 @@ public class StreamToTableJoinIntegrationTests {
 				"--spring.cloud.stream.bindings.input.consumer.useNativeDecoding=true",
 				"--spring.cloud.stream.bindings.input-x.consumer.useNativeDecoding=true",
 				"--spring.cloud.stream.bindings.output.producer.useNativeEncoding=true",
-				"--spring.cloud.stream.kafka.streams.bindings.input.consumer.keySerde=org.apache.kafka.common.serialization.Serdes$StringSerde",
-				"--spring.cloud.stream.kafka.streams.bindings.input.consumer.valueSerde=org.apache.kafka.common.serialization.Serdes$LongSerde",
-				"--spring.cloud.stream.kafka.streams.bindings.inputX.consumer.keySerde=org.apache.kafka.common.serialization.Serdes$StringSerde",
-				"--spring.cloud.stream.kafka.streams.bindings.inputX.consumer.valueSerde=org.apache.kafka.common.serialization.Serdes$StringSerde",
-				"--spring.cloud.stream.kafka.streams.bindings.output.producer.keySerde=org.apache.kafka.common.serialization.Serdes$StringSerde",
-				"--spring.cloud.stream.kafka.streams.bindings.output.producer.valueSerde=org.apache.kafka.common.serialization.Serdes$LongSerde",
-				"--spring.cloud.stream.kafka.streams.binder.configuration.default.key.serde=org.apache.kafka.common.serialization.Serdes$StringSerde",
-				"--spring.cloud.stream.kafka.streams.binder.configuration.default.value.serde=org.apache.kafka.common.serialization.Serdes$StringSerde",
+				"--spring.cloud.stream.kafka.streams.bindings.input.consumer.keySerde"
+						+ "=org.apache.kafka.common.serialization.Serdes$StringSerde",
+				"--spring.cloud.stream.kafka.streams.bindings.input.consumer.valueSerde"
+						+ "=org.apache.kafka.common.serialization.Serdes$LongSerde",
+				"--spring.cloud.stream.kafka.streams.bindings.inputX.consumer.keySerde"
+						+ "=org.apache.kafka.common.serialization.Serdes$StringSerde",
+				"--spring.cloud.stream.kafka.streams.bindings.inputX.consumer.valueSerde"
+						+ "=org.apache.kafka.common.serialization.Serdes$StringSerde",
+				"--spring.cloud.stream.kafka.streams.bindings.output.producer.keySerde"
+						+ "=org.apache.kafka.common.serialization.Serdes$StringSerde",
+				"--spring.cloud.stream.kafka.streams.bindings.output.producer.valueSerde"
+						+ "=org.apache.kafka.common.serialization.Serdes$LongSerde",
+				"--spring.cloud.stream.kafka.streams.binder.configuration.default.key.serde"
+						+ "=org.apache.kafka.common.serialization.Serdes$StringSerde",
+				"--spring.cloud.stream.kafka.streams.binder.configuration.default.value.serde"
+						+ "=org.apache.kafka.common.serialization.Serdes$StringSerde",
 				"--spring.cloud.stream.kafka.streams.binder.configuration.commit.interval.ms=10000",
-				"--spring.cloud.stream.kafka.streams.bindings.input.consumer.applicationId=StreamToTableJoinIntegrationTests-abc",
-				"--spring.cloud.stream.kafka.streams.binder.brokers=" + embeddedKafka.getBrokersAsString(),
-				"--spring.cloud.stream.kafka.streams.binder.zkNodes=" + embeddedKafka.getZookeeperConnectionString())) {
+				"--spring.cloud.stream.kafka.streams.bindings.input.consumer.applicationId"
+						+ "=StreamToTableJoinIntegrationTests-abc",
+				"--spring.cloud.stream.kafka.streams.binder.brokers="
+						+ embeddedKafka.getBrokersAsString(),
+				"--spring.cloud.stream.kafka.streams.binder.zkNodes="
+						+ embeddedKafka.getZookeeperConnectionString())) {
 
 			// Input 1: Region per user (multiple records allowed per user).
-			List> userRegions = Arrays.asList(
-					new KeyValue<>("alice", "asia"),   /* Alice lived in Asia originally... */
-					new KeyValue<>("bob", "americas"),
-					new KeyValue<>("chao", "asia"),
-					new KeyValue<>("dave", "europe"),
-					new KeyValue<>("alice", "europe"), /* ...but moved to Europe some time later. */
-					new KeyValue<>("eve", "americas"),
-					new KeyValue<>("fang", "asia")
-			);
+			List> userRegions = Arrays.asList(new KeyValue<>(
+					"alice", "asia"), /* Alice lived in Asia originally... */
+					new KeyValue<>("bob", "americas"), new KeyValue<>("chao", "asia"),
+					new KeyValue<>("dave", "europe"), new KeyValue<>("alice",
+							"europe"), /* ...but moved to Europe some time later. */
+					new KeyValue<>("eve", "americas"), new KeyValue<>("fang", "asia"));
 
-			Map senderProps1 = KafkaTestUtils.producerProps(embeddedKafka);
-			senderProps1.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class);
-			senderProps1.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, StringSerializer.class);
+			Map senderProps1 = KafkaTestUtils
+					.producerProps(embeddedKafka);
+			senderProps1.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG,
+					StringSerializer.class);
+			senderProps1.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG,
+					StringSerializer.class);
 
-			DefaultKafkaProducerFactory pf1 = new DefaultKafkaProducerFactory<>(senderProps1);
+			DefaultKafkaProducerFactory pf1 = new DefaultKafkaProducerFactory<>(
+					senderProps1);
 			KafkaTemplate template1 = new KafkaTemplate<>(pf1, true);
 			template1.setDefaultTopic("user-regions-1");
 
@@ -155,21 +148,19 @@ public class StreamToTableJoinIntegrationTests {
 
 			// Input 2: Clicks per user (multiple records allowed per user).
 			List> userClicks = Arrays.asList(
-					new KeyValue<>("alice", 13L),
-					new KeyValue<>("bob", 4L),
-					new KeyValue<>("chao", 25L),
-					new KeyValue<>("bob", 19L),
-					new KeyValue<>("dave", 56L),
-					new KeyValue<>("eve", 78L),
-					new KeyValue<>("alice", 40L),
-					new KeyValue<>("fang", 99L)
-			);
+					new KeyValue<>("alice", 13L), new KeyValue<>("bob", 4L),
+					new KeyValue<>("chao", 25L), new KeyValue<>("bob", 19L),
+					new KeyValue<>("dave", 56L), new KeyValue<>("eve", 78L),
+					new KeyValue<>("alice", 40L), new KeyValue<>("fang", 99L));
 
 			Map senderProps = KafkaTestUtils.producerProps(embeddedKafka);
-			senderProps.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class);
-			senderProps.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, LongSerializer.class);
+			senderProps.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG,
+					StringSerializer.class);
+			senderProps.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG,
+					LongSerializer.class);
 
-			DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(senderProps);
+			DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(
+					senderProps);
 			KafkaTemplate template = new KafkaTemplate<>(pf, true);
 			template.setDefaultTopic("user-clicks-1");
 
@@ -178,22 +169,24 @@ public class StreamToTableJoinIntegrationTests {
 			}
 
 			List> expectedClicksPerRegion = Arrays.asList(
-					new KeyValue<>("americas", 101L),
-					new KeyValue<>("europe", 109L),
-					new KeyValue<>("asia", 124L)
-			);
+					new KeyValue<>("americas", 101L), new KeyValue<>("europe", 109L),
+					new KeyValue<>("asia", 124L));
 
-			//Verify that we receive the expected data
+			// Verify that we receive the expected data
 			int count = 0;
 			long start = System.currentTimeMillis();
 			List> actualClicksPerRegion = new ArrayList<>();
 			do {
-				ConsumerRecords records = KafkaTestUtils.getRecords(consumer);
+				ConsumerRecords records = KafkaTestUtils
+						.getRecords(consumer);
 				count = count + records.count();
 				for (ConsumerRecord record : records) {
-					actualClicksPerRegion.add(new KeyValue<>(record.key(), record.value()));
+					actualClicksPerRegion
+							.add(new KeyValue<>(record.key(), record.value()));
 				}
-			} while (count < expectedClicksPerRegion.size() && (System.currentTimeMillis() - start) < 30000);
+			}
+			while (count < expectedClicksPerRegion.size()
+					&& (System.currentTimeMillis() - start) < 30000);
 
 			assertThat(count == expectedClicksPerRegion.size()).isTrue();
 			assertThat(actualClicksPerRegion).hasSameElementsAs(expectedClicksPerRegion);
@@ -204,16 +197,22 @@ public class StreamToTableJoinIntegrationTests {
 	}
 
 	@Test
-	public void testGlobalStartOffsetWithLatestAndIndividualBindingWthEarliest() throws Exception {
-		SpringApplication app = new SpringApplication(CountClicksPerRegionApplication.class);
+	public void testGlobalStartOffsetWithLatestAndIndividualBindingWthEarliest()
+			throws Exception {
+		SpringApplication app = new SpringApplication(
+				CountClicksPerRegionApplication.class);
 		app.setWebApplicationType(WebApplicationType.NONE);
 
 		Consumer consumer;
-		Map consumerProps = KafkaTestUtils.consumerProps("group-2", "false", embeddedKafka);
+		Map consumerProps = KafkaTestUtils.consumerProps("group-2",
+				"false", embeddedKafka);
 		consumerProps.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
-		consumerProps.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class);
-		consumerProps.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, LongDeserializer.class);
-		DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(consumerProps);
+		consumerProps.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG,
+				StringDeserializer.class);
+		consumerProps.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG,
+				LongDeserializer.class);
+		DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(
+				consumerProps);
 		consumer = cf.createConsumer();
 		embeddedKafka.consumeFromAnEmbeddedTopic(consumer, "output-topic-2");
 
@@ -221,30 +220,27 @@ public class StreamToTableJoinIntegrationTests {
 		// binding (which is set to earliest below).
 		// Input 1: Clicks per user (multiple records allowed per user).
 		List> userClicks = Arrays.asList(
-				new KeyValue<>("alice", 100L),
-				new KeyValue<>("alice", 100L),
-				new KeyValue<>("alice", 100L),
-				new KeyValue<>("alice", 100L),
-				new KeyValue<>("alice", 100L),
-				new KeyValue<>("alice", 100L),
-				new KeyValue<>("alice", 100L),
-				new KeyValue<>("alice", 100L),
-				new KeyValue<>("alice", 100L),
-				new KeyValue<>("alice", 100L)
-		);
+				new KeyValue<>("alice", 100L), new KeyValue<>("alice", 100L),
+				new KeyValue<>("alice", 100L), new KeyValue<>("alice", 100L),
+				new KeyValue<>("alice", 100L), new KeyValue<>("alice", 100L),
+				new KeyValue<>("alice", 100L), new KeyValue<>("alice", 100L),
+				new KeyValue<>("alice", 100L), new KeyValue<>("alice", 100L));
 
 		Map senderProps = KafkaTestUtils.producerProps(embeddedKafka);
-		senderProps.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class);
-		senderProps.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, LongSerializer.class);
+		senderProps.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG,
+				StringSerializer.class);
+		senderProps.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG,
+				LongSerializer.class);
 
-		DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(senderProps);
+		DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(
+				senderProps);
 		KafkaTemplate template = new KafkaTemplate<>(pf, true);
 		template.setDefaultTopic("user-clicks-2");
 
 		for (KeyValue keyValue : userClicks) {
 			template.sendDefault(keyValue.key, keyValue.value);
 		}
-		//Thread.sleep(10000L);
+		// Thread.sleep(10000L);
 		try (ConfigurableApplicationContext ignored = app.run("--server.port=0",
 				"--spring.jmx.enabled=false",
 				"--spring.cloud.stream.bindings.input.destination=user-clicks-2",
@@ -255,36 +251,47 @@ public class StreamToTableJoinIntegrationTests {
 				"--spring.cloud.stream.bindings.output.producer.useNativeEncoding=true",
 				"--spring.cloud.stream.kafka.streams.binder.configuration.auto.offset.reset=latest",
 				"--spring.cloud.stream.kafka.streams.bindings.input.consumer.startOffset=earliest",
-				"--spring.cloud.stream.kafka.streams.bindings.input.consumer.keySerde=org.apache.kafka.common.serialization.Serdes$StringSerde",
-				"--spring.cloud.stream.kafka.streams.bindings.input.consumer.valueSerde=org.apache.kafka.common.serialization.Serdes$LongSerde",
-				"--spring.cloud.stream.kafka.streams.bindings.inputX.consumer.keySerde=org.apache.kafka.common.serialization.Serdes$StringSerde",
-				"--spring.cloud.stream.kafka.streams.bindings.inputX.consumer.valueSerde=org.apache.kafka.common.serialization.Serdes$StringSerde",
-				"--spring.cloud.stream.kafka.streams.bindings.output.producer.keySerde=org.apache.kafka.common.serialization.Serdes$StringSerde",
-				"--spring.cloud.stream.kafka.streams.bindings.output.producer.valueSerde=org.apache.kafka.common.serialization.Serdes$LongSerde",
-				"--spring.cloud.stream.kafka.streams.binder.configuration.default.key.serde=org.apache.kafka.common.serialization.Serdes$StringSerde",
-				"--spring.cloud.stream.kafka.streams.binder.configuration.default.value.serde=org.apache.kafka.common.serialization.Serdes$StringSerde",
+				"--spring.cloud.stream.kafka.streams.bindings.input.consumer.keySerde"
+						+ "=org.apache.kafka.common.serialization.Serdes$StringSerde",
+				"--spring.cloud.stream.kafka.streams.bindings.input.consumer.valueSerde"
+						+ "=org.apache.kafka.common.serialization.Serdes$LongSerde",
+				"--spring.cloud.stream.kafka.streams.bindings.inputX.consumer.keySerde"
+						+ "=org.apache.kafka.common.serialization.Serdes$StringSerde",
+				"--spring.cloud.stream.kafka.streams.bindings.inputX.consumer.valueSerde"
+						+ "=org.apache.kafka.common.serialization.Serdes$StringSerde",
+				"--spring.cloud.stream.kafka.streams.bindings.output.producer.keySerde"
+						+ "=org.apache.kafka.common.serialization.Serdes$StringSerde",
+				"--spring.cloud.stream.kafka.streams.bindings.output.producer.valueSerde"
+						+ "=org.apache.kafka.common.serialization.Serdes$LongSerde",
+				"--spring.cloud.stream.kafka.streams.binder.configuration.default.key.serde"
+						+ "=org.apache.kafka.common.serialization.Serdes$StringSerde",
+				"--spring.cloud.stream.kafka.streams.binder.configuration.default.value.serde"
+						+ "=org.apache.kafka.common.serialization.Serdes$StringSerde",
 				"--spring.cloud.stream.kafka.streams.binder.configuration.commit.interval.ms=10000",
 				"--spring.cloud.stream.kafka.streams.bindings.input.consumer.application-id=helloxyz-foobar",
-				"--spring.cloud.stream.kafka.streams.binder.brokers=" + embeddedKafka.getBrokersAsString(),
-				"--spring.cloud.stream.kafka.streams.binder.zkNodes=" + embeddedKafka.getZookeeperConnectionString())) {
+				"--spring.cloud.stream.kafka.streams.binder.brokers="
+						+ embeddedKafka.getBrokersAsString(),
+				"--spring.cloud.stream.kafka.streams.binder.zkNodes="
+						+ embeddedKafka.getZookeeperConnectionString())) {
 			Thread.sleep(1000L);
 
 			// Input 2: Region per user (multiple records allowed per user).
-			List> userRegions = Arrays.asList(
-					new KeyValue<>("alice", "asia"),   /* Alice lived in Asia originally... */
-					new KeyValue<>("bob", "americas"),
-					new KeyValue<>("chao", "asia"),
-					new KeyValue<>("dave", "europe"),
-					new KeyValue<>("alice", "europe"), /* ...but moved to Europe some time later. */
-					new KeyValue<>("eve", "americas"),
-					new KeyValue<>("fang", "asia")
-			);
+			List> userRegions = Arrays.asList(new KeyValue<>(
+					"alice", "asia"), /* Alice lived in Asia originally... */
+					new KeyValue<>("bob", "americas"), new KeyValue<>("chao", "asia"),
+					new KeyValue<>("dave", "europe"), new KeyValue<>("alice",
+							"europe"), /* ...but moved to Europe some time later. */
+					new KeyValue<>("eve", "americas"), new KeyValue<>("fang", "asia"));
 
-			Map senderProps1 = KafkaTestUtils.producerProps(embeddedKafka);
-			senderProps1.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class);
-			senderProps1.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, StringSerializer.class);
+			Map senderProps1 = KafkaTestUtils
+					.producerProps(embeddedKafka);
+			senderProps1.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG,
+					StringSerializer.class);
+			senderProps1.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG,
+					StringSerializer.class);
 
-			DefaultKafkaProducerFactory pf1 = new DefaultKafkaProducerFactory<>(senderProps1);
+			DefaultKafkaProducerFactory pf1 = new DefaultKafkaProducerFactory<>(
+					senderProps1);
 			KafkaTemplate template1 = new KafkaTemplate<>(pf1, true);
 			template1.setDefaultTopic("user-regions-2");
 
@@ -292,45 +299,41 @@ public class StreamToTableJoinIntegrationTests {
 				template1.sendDefault(keyValue.key, keyValue.value);
 			}
 
-
-
 			// Input 1: Clicks per user (multiple records allowed per user).
 			List> userClicks1 = Arrays.asList(
-					new KeyValue<>("bob", 4L),
-					new KeyValue<>("chao", 25L),
-					new KeyValue<>("bob", 19L),
-					new KeyValue<>("dave", 56L),
-					new KeyValue<>("eve", 78L),
-					new KeyValue<>("fang", 99L)
-			);
+					new KeyValue<>("bob", 4L), new KeyValue<>("chao", 25L),
+					new KeyValue<>("bob", 19L), new KeyValue<>("dave", 56L),
+					new KeyValue<>("eve", 78L), new KeyValue<>("fang", 99L));
 
 			for (KeyValue keyValue : userClicks1) {
 				template.sendDefault(keyValue.key, keyValue.value);
 			}
 
-
-
 			List> expectedClicksPerRegion = Arrays.asList(
-					new KeyValue<>("americas", 101L),
-					new KeyValue<>("europe", 56L),
+					new KeyValue<>("americas", 101L), new KeyValue<>("europe", 56L),
 					new KeyValue<>("asia", 124L),
-					//1000 alice entries which were there in the topic before the consumer started.
-					//Since we set the startOffset to earliest for the topic, it will read them,
-					//but the join fails to associate with a valid region, thus UNKNOWN.
-					new KeyValue<>("UNKNOWN", 1000L)
-			);
+					// 1000 alice entries which were there in the topic before the
+					// consumer started.
+					// Since we set the startOffset to earliest for the topic, it will
+					// read them,
+					// but the join fails to associate with a valid region, thus UNKNOWN.
+					new KeyValue<>("UNKNOWN", 1000L));
 
-			//Verify that we receive the expected data
+			// Verify that we receive the expected data
 			int count = 0;
 			long start = System.currentTimeMillis();
 			List> actualClicksPerRegion = new ArrayList<>();
 			do {
-				ConsumerRecords records = KafkaTestUtils.getRecords(consumer);
+				ConsumerRecords records = KafkaTestUtils
+						.getRecords(consumer);
 				count = count + records.count();
 				for (ConsumerRecord record : records) {
-					actualClicksPerRegion.add(new KeyValue<>(record.key(), record.value()));
+					actualClicksPerRegion
+							.add(new KeyValue<>(record.key(), record.value()));
 				}
-			} while (count < expectedClicksPerRegion.size() && (System.currentTimeMillis() - start) < 30000);
+			}
+			while (count < expectedClicksPerRegion.size()
+					&& (System.currentTimeMillis() - start) < 30000);
 
 			assertThat(count).isEqualTo(expectedClicksPerRegion.size());
 			assertThat(actualClicksPerRegion).hasSameElementsAs(expectedClicksPerRegion);
@@ -340,12 +343,45 @@ public class StreamToTableJoinIntegrationTests {
 		}
 	}
 
+	@EnableBinding(KafkaStreamsProcessorX.class)
+	@EnableAutoConfiguration
+	@EnableConfigurationProperties(KafkaStreamsApplicationSupportProperties.class)
+	public static class CountClicksPerRegionApplication {
+
+		@StreamListener
+		@SendTo("output")
+		public KStream process(
+				@Input("input") KStream userClicksStream,
+				@Input("input-x") KTable userRegionsTable) {
+
+			return userClicksStream
+					.leftJoin(userRegionsTable,
+							(clicks, region) -> new RegionWithClicks(
+									region == null ? "UNKNOWN" : region, clicks),
+							Joined.with(Serdes.String(), Serdes.Long(), null))
+					.map((user, regionWithClicks) -> new KeyValue<>(
+							regionWithClicks.getRegion(), regionWithClicks.getClicks()))
+					.groupByKey(Serialized.with(Serdes.String(), Serdes.Long()))
+					.reduce((firstClicks, secondClicks) -> firstClicks + secondClicks)
+					.toStream();
+		}
+
+	}
+
+	interface KafkaStreamsProcessorX extends KafkaStreamsProcessor {
+
+		@Input("input-x")
+		KTable inputX();
+
+	}
+
 	/**
 	 * Tuple for a region and its associated number of clicks.
 	 */
 	private static final class RegionWithClicks {
 
 		private final String region;
+
 		private final long clicks;
 
 		RegionWithClicks(String region, long clicks) {
@@ -368,4 +404,5 @@ public class StreamToTableJoinIntegrationTests {
 		}
 
 	}
+
 }
diff --git a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/WordCountMultipleBranchesIntegrationTests.java b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/WordCountMultipleBranchesIntegrationTests.java
index e862b2129..54e89d2ad 100644
--- a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/WordCountMultipleBranchesIntegrationTests.java
+++ b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/WordCountMultipleBranchesIntegrationTests.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017 the original author or authors.
+ * Copyright 2017-2019 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -62,17 +62,21 @@ import static org.assertj.core.api.Assertions.assertThat;
 public class WordCountMultipleBranchesIntegrationTests {
 
 	@ClassRule
-	public static EmbeddedKafkaRule embeddedKafkaRule = new EmbeddedKafkaRule(1, true, "counts","foo","bar");
+	public static EmbeddedKafkaRule embeddedKafkaRule = new EmbeddedKafkaRule(1, true,
+			"counts", "foo", "bar");
 
-	private static EmbeddedKafkaBroker embeddedKafka = embeddedKafkaRule.getEmbeddedKafka();
+	private static EmbeddedKafkaBroker embeddedKafka = embeddedKafkaRule
+			.getEmbeddedKafka();
 
 	private static Consumer consumer;
 
 	@BeforeClass
 	public static void setUp() throws Exception {
-		Map consumerProps = KafkaTestUtils.consumerProps("groupx", "false", embeddedKafka);
+		Map consumerProps = KafkaTestUtils.consumerProps("groupx",
+				"false", embeddedKafka);
 		consumerProps.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
-		DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(consumerProps);
+		DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(
+				consumerProps);
 		consumer = cf.createConsumer();
 		embeddedKafka.consumeFromEmbeddedTopics(consumer, "counts", "foo", "bar");
 	}
@@ -82,6 +86,66 @@ public class WordCountMultipleBranchesIntegrationTests {
 		consumer.close();
 	}
 
+	@Test
+	public void testKstreamWordCountWithStringInputAndPojoOuput() throws Exception {
+		SpringApplication app = new SpringApplication(
+				WordCountProcessorApplication.class);
+		app.setWebApplicationType(WebApplicationType.NONE);
+
+		ConfigurableApplicationContext context = app.run("--server.port=0",
+				"--spring.jmx.enabled=false",
+				"--spring.cloud.stream.bindings.input.destination=words",
+				"--spring.cloud.stream.bindings.output1.destination=counts",
+				"--spring.cloud.stream.bindings.output1.contentType=application/json",
+				"--spring.cloud.stream.bindings.output2.destination=foo",
+				"--spring.cloud.stream.bindings.output2.contentType=application/json",
+				"--spring.cloud.stream.bindings.output3.destination=bar",
+				"--spring.cloud.stream.bindings.output3.contentType=application/json",
+				"--spring.cloud.stream.kafka.streams.binder.configuration.commit.interval.ms=1000",
+				"--spring.cloud.stream.kafka.streams.binder.configuration.default.key.serde"
+						+ "=org.apache.kafka.common.serialization.Serdes$StringSerde",
+				"--spring.cloud.stream.kafka.streams.binder.configuration.default.value.serde"
+						+ "=org.apache.kafka.common.serialization.Serdes$StringSerde",
+				"--spring.cloud.stream.kafka.streams.timeWindow.length=5000",
+				"--spring.cloud.stream.kafka.streams.timeWindow.advanceBy=0",
+				"--spring.cloud.stream.kafka.streams.bindings.input.consumer.applicationId"
+						+ "=WordCountMultipleBranchesIntegrationTests-abc",
+				"--spring.cloud.stream.kafka.streams.binder.brokers="
+						+ embeddedKafka.getBrokersAsString(),
+				"--spring.cloud.stream.kafka.streams.binder.zkNodes="
+						+ embeddedKafka.getZookeeperConnectionString());
+		try {
+			receiveAndValidate(context);
+		}
+		finally {
+			context.close();
+		}
+	}
+
+	private void receiveAndValidate(ConfigurableApplicationContext context)
+			throws Exception {
+		Map senderProps = KafkaTestUtils.producerProps(embeddedKafka);
+		DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(
+				senderProps);
+		KafkaTemplate template = new KafkaTemplate<>(pf, true);
+		template.setDefaultTopic("words");
+		template.sendDefault("english");
+		ConsumerRecord cr = KafkaTestUtils.getSingleRecord(consumer,
+				"counts");
+		assertThat(cr.value().contains("\"word\":\"english\",\"count\":1")).isTrue();
+
+		template.sendDefault("french");
+		template.sendDefault("french");
+		cr = KafkaTestUtils.getSingleRecord(consumer, "foo");
+		assertThat(cr.value().contains("\"word\":\"french\",\"count\":2")).isTrue();
+
+		template.sendDefault("spanish");
+		template.sendDefault("spanish");
+		template.sendDefault("spanish");
+		cr = KafkaTestUtils.getSingleRecord(consumer, "bar");
+		assertThat(cr.value().contains("\"word\":\"spanish\",\"count\":3")).isTrue();
+	}
+
 	@EnableBinding(KStreamProcessorX.class)
 	@EnableAutoConfiguration
 	@EnableConfigurationProperties(KafkaStreamsApplicationSupportProperties.class)
@@ -91,23 +155,26 @@ public class WordCountMultipleBranchesIntegrationTests {
 		private TimeWindows timeWindows;
 
 		@StreamListener("input")
-		@SendTo({"output1","output2","output3"})
+		@SendTo({ "output1", "output2", "output3" })
 		@SuppressWarnings("unchecked")
 		public KStream[] process(KStream input) {
 
 			Predicate isEnglish = (k, v) -> v.word.equals("english");
-			Predicate isFrench =  (k, v) -> v.word.equals("french");
+			Predicate isFrench = (k, v) -> v.word.equals("french");
 			Predicate isSpanish = (k, v) -> v.word.equals("spanish");
 
 			return input
-					.flatMapValues(value -> Arrays.asList(value.toLowerCase().split("\\W+")))
-					.groupBy((key, value) -> value)
-					.windowedBy(timeWindows)
-					.count(Materialized.as("WordCounts-multi"))
-					.toStream()
-					.map((key, value) -> new KeyValue<>(null, new WordCount(key.key(), value, new Date(key.window().start()), new Date(key.window().end()))))
+					.flatMapValues(
+							value -> Arrays.asList(value.toLowerCase().split("\\W+")))
+					.groupBy((key, value) -> value).windowedBy(timeWindows)
+					.count(Materialized.as("WordCounts-multi")).toStream()
+					.map((key, value) -> new KeyValue<>(null,
+							new WordCount(key.key(), value,
+									new Date(key.window().start()),
+									new Date(key.window().end()))))
 					.branch(isEnglish, isFrench, isSpanish);
 		}
+
 	}
 
 	interface KStreamProcessorX {
@@ -123,56 +190,7 @@ public class WordCountMultipleBranchesIntegrationTests {
 
 		@Output("output3")
 		KStream output3();
-	}
 
-	@Test
-	public void testKstreamWordCountWithStringInputAndPojoOuput() throws Exception {
-		SpringApplication app = new SpringApplication(WordCountProcessorApplication.class);
-		app.setWebApplicationType(WebApplicationType.NONE);
-
-		ConfigurableApplicationContext context = app.run("--server.port=0",
-				"--spring.jmx.enabled=false",
-				"--spring.cloud.stream.bindings.input.destination=words",
-				"--spring.cloud.stream.bindings.output1.destination=counts",
-				"--spring.cloud.stream.bindings.output1.contentType=application/json",
-				"--spring.cloud.stream.bindings.output2.destination=foo",
-				"--spring.cloud.stream.bindings.output2.contentType=application/json",
-				"--spring.cloud.stream.bindings.output3.destination=bar",
-				"--spring.cloud.stream.bindings.output3.contentType=application/json",
-				"--spring.cloud.stream.kafka.streams.binder.configuration.commit.interval.ms=1000",
-				"--spring.cloud.stream.kafka.streams.binder.configuration.default.key.serde=org.apache.kafka.common.serialization.Serdes$StringSerde",
-				"--spring.cloud.stream.kafka.streams.binder.configuration.default.value.serde=org.apache.kafka.common.serialization.Serdes$StringSerde",
-				"--spring.cloud.stream.kafka.streams.timeWindow.length=5000",
-				"--spring.cloud.stream.kafka.streams.timeWindow.advanceBy=0",
-				"--spring.cloud.stream.kafka.streams.bindings.input.consumer.applicationId=WordCountMultipleBranchesIntegrationTests-abc",
-				"--spring.cloud.stream.kafka.streams.binder.brokers=" + embeddedKafka.getBrokersAsString(),
-				"--spring.cloud.stream.kafka.streams.binder.zkNodes=" + embeddedKafka.getZookeeperConnectionString());
-		try {
-			receiveAndValidate(context);
-		} finally {
-			context.close();
-		}
-	}
-
-	private void receiveAndValidate(ConfigurableApplicationContext context) throws Exception {
-		Map senderProps = KafkaTestUtils.producerProps(embeddedKafka);
-		DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory<>(senderProps);
-		KafkaTemplate template = new KafkaTemplate<>(pf, true);
-		template.setDefaultTopic("words");
-		template.sendDefault("english");
-		ConsumerRecord cr = KafkaTestUtils.getSingleRecord(consumer, "counts");
-		assertThat(cr.value().contains("\"word\":\"english\",\"count\":1")).isTrue();
-
-		template.sendDefault("french");
-		template.sendDefault("french");
-		cr = KafkaTestUtils.getSingleRecord(consumer, "foo");
-		assertThat(cr.value().contains("\"word\":\"french\",\"count\":2")).isTrue();
-
-		template.sendDefault("spanish");
-		template.sendDefault("spanish");
-		template.sendDefault("spanish");
-		cr = KafkaTestUtils.getSingleRecord(consumer, "bar");
-		assertThat(cr.value().contains("\"word\":\"spanish\",\"count\":3")).isTrue();
 	}
 
 	static class WordCount {
@@ -223,6 +241,7 @@ public class WordCountMultipleBranchesIntegrationTests {
 		public void setEnd(Date end) {
 			this.end = end;
 		}
+
 	}
 
 }
diff --git a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/utils/TestAvroSerializer.java b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/utils/TestAvroSerializer.java
index 1a22dab6b..5ba7cd751 100644
--- a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/utils/TestAvroSerializer.java
+++ b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/integration/utils/TestAvroSerializer.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2018 the original author or authors.
+ * Copyright 2018-2019 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -29,13 +29,13 @@ import org.springframework.messaging.support.MessageBuilder;
 /**
  * Custom avro serializer intended to be used for testing only.
  *
- * @author Soby Chacko
- *
  * @param  Target type to serialize
+ * @author Soby Chacko
  */
 public class TestAvroSerializer implements Serializer {
 
-	public TestAvroSerializer() {}
+	public TestAvroSerializer() {
+	}
 
 	@Override
 	public void configure(Map configs, boolean isKey) {
@@ -49,13 +49,14 @@ public class TestAvroSerializer implements Serializer {
 		Map headers = new HashMap<>(message.getHeaders());
 		headers.put(MessageHeaders.CONTENT_TYPE, "application/avro");
 		MessageHeaders messageHeaders = new MessageHeaders(headers);
-		final Object payload = avroSchemaMessageConverter.toMessage(message.getPayload(),
-				messageHeaders).getPayload();
-		return (byte[])payload;
+		final Object payload = avroSchemaMessageConverter
+				.toMessage(message.getPayload(), messageHeaders).getPayload();
+		return (byte[]) payload;
 	}
 
 	@Override
 	public void close() {
 
 	}
+
 }
diff --git a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/serde/CompositeNonNativeSerdeTest.java b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/serde/CompositeNonNativeSerdeTest.java
index 42573fd79..29e0a83e7 100644
--- a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/serde/CompositeNonNativeSerdeTest.java
+++ b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/serde/CompositeNonNativeSerdeTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2018 the original author or authors.
+ * Copyright 2018-2019 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -42,7 +42,7 @@ public class CompositeNonNativeSerdeTest {
 
 	@Test
 	@SuppressWarnings("unchecked")
-	public void testCompositeNonNativeSerdeUsingAvroContentType(){
+	public void testCompositeNonNativeSerdeUsingAvroContentType() {
 		Random random = new Random();
 		Sensor sensor = new Sensor();
 		sensor.setId(UUID.randomUUID().toString() + "-v1");
@@ -52,18 +52,22 @@ public class CompositeNonNativeSerdeTest {
 
 		List messageConverters = new ArrayList<>();
 		messageConverters.add(new AvroSchemaMessageConverter());
-		CompositeMessageConverterFactory compositeMessageConverterFactory =
-				new CompositeMessageConverterFactory(messageConverters, new ObjectMapper());
-		CompositeNonNativeSerde compositeNonNativeSerde = new CompositeNonNativeSerde(compositeMessageConverterFactory);
+		CompositeMessageConverterFactory compositeMessageConverterFactory = new CompositeMessageConverterFactory(
+				messageConverters, new ObjectMapper());
+		CompositeNonNativeSerde compositeNonNativeSerde = new CompositeNonNativeSerde(
+				compositeMessageConverterFactory);
 
 		Map configs = new HashMap<>();
 		configs.put("valueClass", Sensor.class);
 		configs.put("contentType", "application/avro");
 		compositeNonNativeSerde.configure(configs, false);
-		final byte[] serialized = compositeNonNativeSerde.serializer().serialize(null, sensor);
+		final byte[] serialized = compositeNonNativeSerde.serializer().serialize(null,
+				sensor);
 
-		final Object deserialized = compositeNonNativeSerde.deserializer().deserialize(null, serialized);
+		final Object deserialized = compositeNonNativeSerde.deserializer()
+				.deserialize(null, serialized);
 
 		assertThat(deserialized).isEqualTo(sensor);
 	}
+
 }
diff --git a/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/BinderHeaderMapper.java b/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/BinderHeaderMapper.java
index ec5720435..0cc2e83b6 100644
--- a/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/BinderHeaderMapper.java
+++ b/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/BinderHeaderMapper.java
@@ -45,33 +45,24 @@ import org.springframework.util.ClassUtils;
 import org.springframework.util.MimeType;
 
 /**
- * Default header mapper for Apache Kafka.
- * Most headers in {@link KafkaHeaders} are not mapped on outbound messages.
- * The exceptions are correlation and reply headers for request/reply
- * messaging.
- * Header types are added to a special header {@link #JSON_TYPES}.
+ * Default header mapper for Apache Kafka. Most headers in {@link KafkaHeaders} are not
+ * mapped on outbound messages. The exceptions are correlation and reply headers for
+ * request/reply messaging. Header types are added to a special header
+ * {@link #JSON_TYPES}.
  *
  * @author Gary Russell
  * @author Artem Bilan
- *
  * @since 2.0
- * @deprecated will be removed in the next point release after 2.1.0.
- * See issue https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/509
+ * @deprecated will be removed in the next point release after 2.1.0. See issue
+ * https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/509
  */
 public class BinderHeaderMapper extends AbstractKafkaHeaderMapper {
 
-	private static final List DEFAULT_TRUSTED_PACKAGES =
-			Arrays.asList(
-					"java.util",
-					"java.lang",
-					"org.springframework.util"
-			);
+	private static final List DEFAULT_TRUSTED_PACKAGES = Arrays
+			.asList("java.util", "java.lang", "org.springframework.util");
 
-	private static final List DEFAULT_TO_STRING_CLASSES =
-			Arrays.asList(
-					"org.springframework.util.MimeType",
-					"org.springframework.http.MediaType"
-			);
+	private static final List DEFAULT_TO_STRING_CLASSES = Arrays.asList(
+			"org.springframework.util.MimeType", "org.springframework.http.MediaType");
 
 	/**
 	 * Header name for java types of other headers.
@@ -80,9 +71,11 @@ public class BinderHeaderMapper extends AbstractKafkaHeaderMapper {
 
 	private final ObjectMapper objectMapper;
 
-	private final Set trustedPackages = new LinkedHashSet<>(DEFAULT_TRUSTED_PACKAGES);
+	private final Set trustedPackages = new LinkedHashSet<>(
+			DEFAULT_TRUSTED_PACKAGES);
 
-	private final Set toStringClasses = new LinkedHashSet<>(DEFAULT_TO_STRING_CLASSES);
+	private final Set toStringClasses = new LinkedHashSet<>(
+			DEFAULT_TO_STRING_CLASSES);
 
 	/**
 	 * Construct an instance with the default object mapper and default header patterns
@@ -108,10 +101,7 @@ public class BinderHeaderMapper extends AbstractKafkaHeaderMapper {
 	 * @see org.springframework.util.PatternMatchUtils#simpleMatch(String, String)
 	 */
 	public BinderHeaderMapper(ObjectMapper objectMapper) {
-		this(objectMapper,
-				"!" + MessageHeaders.ID,
-				"!" + MessageHeaders.TIMESTAMP,
-				"*");
+		this(objectMapper, "!" + MessageHeaders.ID, "!" + MessageHeaders.TIMESTAMP, "*");
 	}
 
 	/**
@@ -119,9 +109,9 @@ public class BinderHeaderMapper extends AbstractKafkaHeaderMapper {
 	 * for outbound headers; all inbound headers are mapped. The patterns are applied in
 	 * order, stopping on the first match (positive or negative). Patterns are negated by
 	 * preceding them with "!". The patterns will replace the default patterns; you
-	 * generally should not map the {@code "id" and "timestamp"} headers. Note:
-	 * most of the headers in {@link KafkaHeaders} are ever mapped as headers since they
-	 * represent data in consumer/producer records.
+	 * generally should not map the {@code "id" and "timestamp"} headers. Note: most of
+	 * the headers in {@link KafkaHeaders} are ever mapped as headers since they represent
+	 * data in consumer/producer records.
 	 * @param patterns the patterns.
 	 * @see org.springframework.util.PatternMatchUtils#simpleMatch(String, String)
 	 */
@@ -146,8 +136,8 @@ public class BinderHeaderMapper extends AbstractKafkaHeaderMapper {
 		Assert.notNull(objectMapper, "'objectMapper' must not be null");
 		Assert.noNullElements(patterns, "'patterns' must not have null elements");
 		this.objectMapper = objectMapper;
-		this.objectMapper
-				.registerModule(new SimpleModule().addDeserializer(MimeType.class, new MimeTypeJsonDeserializer()));
+		this.objectMapper.registerModule(new SimpleModule()
+				.addDeserializer(MimeType.class, new MimeTypeJsonDeserializer()));
 	}
 
 	/**
@@ -177,11 +167,11 @@ public class BinderHeaderMapper extends AbstractKafkaHeaderMapper {
 	}
 
 	/**
-	 * Add packages to the trusted packages list (default {@code java.util, java.lang}) used
-	 * when constructing objects from JSON.
-	 * If any of the supplied packages is {@code "*"}, all packages are trusted.
-	 * If a class for a non-trusted package is encountered, the header is returned to the
-	 * application with value of type {@link NonTrustedHeaderType}.
+	 * Add packages to the trusted packages list (default {@code java.util, java.lang})
+	 * used when constructing objects from JSON. If any of the supplied packages is
+	 * {@code "*"}, all packages are trusted. If a class for a non-trusted package is
+	 * encountered, the header is returned to the application with value of type
+	 * {@link NonTrustedHeaderType}.
 	 * @param trustedPackages the packages to trust.
 	 */
 	public void addTrustedPackages(String... trustedPackages) {
@@ -224,12 +214,14 @@ public class BinderHeaderMapper extends AbstractKafkaHeaderMapper {
 							value = v.toString();
 							className = "java.lang.String";
 						}
-						target.add(new RecordHeader(k, getObjectMapper().writeValueAsBytes(value)));
+						target.add(new RecordHeader(k,
+								getObjectMapper().writeValueAsBytes(value)));
 						jsonHeaders.put(k, className);
 					}
 					catch (Exception e) {
 						if (logger.isDebugEnabled()) {
-							logger.debug("Could not map " + k + " with type " + v.getClass().getName());
+							logger.debug("Could not map " + k + " with type "
+									+ v.getClass().getName());
 						}
 					}
 				}
@@ -237,7 +229,8 @@ public class BinderHeaderMapper extends AbstractKafkaHeaderMapper {
 		});
 		if (jsonHeaders.size() > 0) {
 			try {
-				target.add(new RecordHeader(JSON_TYPES, getObjectMapper().writeValueAsBytes(jsonHeaders)));
+				target.add(new RecordHeader(JSON_TYPES,
+						getObjectMapper().writeValueAsBytes(jsonHeaders)));
 			}
 			catch (IllegalStateException | JsonProcessingException e) {
 				logger.error("Could not add json types header", e);
@@ -265,17 +258,18 @@ public class BinderHeaderMapper extends AbstractKafkaHeaderMapper {
 					}
 					if (trusted) {
 						try {
-							headers.put(h.key(), getObjectMapper().readValue(h.value(), type));
+							headers.put(h.key(),
+									getObjectMapper().readValue(h.value(), type));
 						}
 						catch (IOException e) {
-							logger.error("Could not decode json type: " + new String(h.value()) + " for key: " + h
-											.key(),
-									e);
+							logger.error("Could not decode json type: "
+									+ new String(h.value()) + " for key: " + h.key(), e);
 							headers.put(h.key(), h.value());
 						}
 					}
 					else {
-						headers.put(h.key(), new NonTrustedHeaderType(h.value(), requestedType));
+						headers.put(h.key(),
+								new NonTrustedHeaderType(h.value(), requestedType));
 					}
 				}
 				else {
@@ -297,7 +291,9 @@ public class BinderHeaderMapper extends AbstractKafkaHeaderMapper {
 					types = getObjectMapper().readValue(next.value(), Map.class);
 				}
 				catch (IOException e) {
-					logger.error("Could not decode json types: " + new String(next.value()), e);
+					logger.error(
+							"Could not decode json types: " + new String(next.value()),
+							e);
 				}
 				break;
 			}
@@ -313,7 +309,8 @@ public class BinderHeaderMapper extends AbstractKafkaHeaderMapper {
 			}
 			String packageName = requestedType.substring(0, lastDot);
 			for (String trustedPackage : this.trustedPackages) {
-				if (packageName.equals(trustedPackage) || packageName.startsWith(trustedPackage + ".")) {
+				if (packageName.equals(trustedPackage)
+						|| packageName.startsWith(trustedPackage + ".")) {
 					return true;
 				}
 			}
@@ -322,11 +319,10 @@ public class BinderHeaderMapper extends AbstractKafkaHeaderMapper {
 		return true;
 	}
 
-
 	/**
-	 * The {@link StdNodeBasedDeserializer} extension for {@link MimeType} deserialization.
-	 * It is presented here for backward compatibility when older producers send {@link MimeType}
-	 * headers as serialization version.
+	 * The {@link StdNodeBasedDeserializer} extension for {@link MimeType}
+	 * deserialization. It is presented here for backward compatibility when older
+	 * producers send {@link MimeType} headers as serialization version.
 	 */
 	private class MimeTypeJsonDeserializer extends StdNodeBasedDeserializer {
 
@@ -337,14 +333,14 @@ public class BinderHeaderMapper extends AbstractKafkaHeaderMapper {
 		}
 
 		@Override
-		public MimeType convert(JsonNode root, DeserializationContext ctxt) throws IOException {
+		public MimeType convert(JsonNode root, DeserializationContext ctxt)
+				throws IOException {
 			JsonNode type = root.get("type");
 			JsonNode subType = root.get("subtype");
 			JsonNode parameters = root.get("parameters");
-			Map params =
-					BinderHeaderMapper.this.objectMapper.readValue(parameters.traverse(),
-							TypeFactory.defaultInstance()
-									.constructMapType(HashMap.class, String.class, String.class));
+			Map params = BinderHeaderMapper.this.objectMapper
+					.readValue(parameters.traverse(), TypeFactory.defaultInstance()
+							.constructMapType(HashMap.class, String.class, String.class));
 			return new MimeType(type.asText(), subType.asText(), params);
 		}
 
@@ -375,14 +371,17 @@ public class BinderHeaderMapper extends AbstractKafkaHeaderMapper {
 		@Override
 		public String toString() {
 			try {
-				return "NonTrustedHeaderType [headerValue=" + new String(this.headerValue, StandardCharsets.UTF_8)
+				return "NonTrustedHeaderType [headerValue="
+						+ new String(this.headerValue, StandardCharsets.UTF_8)
 						+ ", untrustedType=" + this.untrustedType + "]";
 			}
 			catch (Exception e) {
-				return "NonTrustedHeaderType [headerValue=" + Arrays.toString(this.headerValue) + ", untrustedType="
+				return "NonTrustedHeaderType [headerValue="
+						+ Arrays.toString(this.headerValue) + ", untrustedType="
 						+ this.untrustedType + "]";
 			}
 		}
 
 	}
+
 }
diff --git a/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderEnvironmentPostProcessor.java b/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderEnvironmentPostProcessor.java
index 09e8d5727..507d7a402 100644
--- a/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderEnvironmentPostProcessor.java
+++ b/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderEnvironmentPostProcessor.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017 the original author or authors.
+ * Copyright 2017-2019 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -28,8 +28,8 @@ import org.springframework.core.env.ConfigurableEnvironment;
 import org.springframework.core.env.MapPropertySource;
 
 /**
- * An {@link EnvironmentPostProcessor} that sets some common configuration properties (log config etc.,) for Kafka
- *  binder.
+ * An {@link EnvironmentPostProcessor} that sets some common configuration properties (log
+ * config etc.,) for Kafka binder.
  *
  * @author Ilayaperumal Gopinathan
  */
@@ -41,28 +41,42 @@ public class KafkaBinderEnvironmentPostProcessor implements EnvironmentPostProce
 
 	private static final String SPRING_KAFKA_CONSUMER = SPRING_KAFKA + ".consumer";
 
-	private static final String SPRING_KAFKA_PRODUCER_KEY_SERIALIZER = SPRING_KAFKA_PRODUCER + "." + "keySerializer";
+	private static final String SPRING_KAFKA_PRODUCER_KEY_SERIALIZER = SPRING_KAFKA_PRODUCER
+			+ "." + "keySerializer";
 
-	private static final String SPRING_KAFKA_PRODUCER_VALUE_SERIALIZER = SPRING_KAFKA_PRODUCER + "." + "valueSerializer";
+	private static final String SPRING_KAFKA_PRODUCER_VALUE_SERIALIZER = SPRING_KAFKA_PRODUCER
+			+ "." + "valueSerializer";
 
-	private static final String SPRING_KAFKA_CONSUMER_KEY_DESERIALIZER = SPRING_KAFKA_CONSUMER + "." + "keyDeserializer";
+	private static final String SPRING_KAFKA_CONSUMER_KEY_DESERIALIZER = SPRING_KAFKA_CONSUMER
+			+ "." + "keyDeserializer";
 
-	private static final String SPRING_KAFKA_CONSUMER_VALUE_DESERIALIZER = SPRING_KAFKA_CONSUMER + "." + "valueDeserializer";
+	private static final String SPRING_KAFKA_CONSUMER_VALUE_DESERIALIZER = SPRING_KAFKA_CONSUMER
+			+ "." + "valueDeserializer";
 
 	private static final String KAFKA_BINDER_DEFAULT_PROPERTIES = "kafkaBinderDefaultProperties";
 
 	@Override
-	public void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) {
+	public void postProcessEnvironment(ConfigurableEnvironment environment,
+			SpringApplication application) {
 		if (!environment.getPropertySources().contains(KAFKA_BINDER_DEFAULT_PROPERTIES)) {
 			Map kafkaBinderDefaultProperties = new HashMap<>();
-			kafkaBinderDefaultProperties.put("logging.level.org.I0Itec.zkclient", "ERROR");
-			kafkaBinderDefaultProperties.put("logging.level.kafka.server.KafkaConfig", "ERROR");
-			kafkaBinderDefaultProperties.put("logging.level.kafka.admin.AdminClient.AdminConfig", "ERROR");
-			kafkaBinderDefaultProperties.put(SPRING_KAFKA_PRODUCER_KEY_SERIALIZER, ByteArraySerializer.class.getName());
-			kafkaBinderDefaultProperties.put(SPRING_KAFKA_PRODUCER_VALUE_SERIALIZER, ByteArraySerializer.class.getName());
-			kafkaBinderDefaultProperties.put(SPRING_KAFKA_CONSUMER_KEY_DESERIALIZER, ByteArrayDeserializer.class.getName());
-			kafkaBinderDefaultProperties.put(SPRING_KAFKA_CONSUMER_VALUE_DESERIALIZER, ByteArrayDeserializer.class.getName());
-			environment.getPropertySources().addLast(new MapPropertySource(KAFKA_BINDER_DEFAULT_PROPERTIES, kafkaBinderDefaultProperties));
+			kafkaBinderDefaultProperties.put("logging.level.org.I0Itec.zkclient",
+					"ERROR");
+			kafkaBinderDefaultProperties.put("logging.level.kafka.server.KafkaConfig",
+					"ERROR");
+			kafkaBinderDefaultProperties
+					.put("logging.level.kafka.admin.AdminClient.AdminConfig", "ERROR");
+			kafkaBinderDefaultProperties.put(SPRING_KAFKA_PRODUCER_KEY_SERIALIZER,
+					ByteArraySerializer.class.getName());
+			kafkaBinderDefaultProperties.put(SPRING_KAFKA_PRODUCER_VALUE_SERIALIZER,
+					ByteArraySerializer.class.getName());
+			kafkaBinderDefaultProperties.put(SPRING_KAFKA_CONSUMER_KEY_DESERIALIZER,
+					ByteArrayDeserializer.class.getName());
+			kafkaBinderDefaultProperties.put(SPRING_KAFKA_CONSUMER_VALUE_DESERIALIZER,
+					ByteArrayDeserializer.class.getName());
+			environment.getPropertySources().addLast(new MapPropertySource(
+					KAFKA_BINDER_DEFAULT_PROPERTIES, kafkaBinderDefaultProperties));
 		}
 	}
+
 }
diff --git a/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderHealthIndicator.java b/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderHealthIndicator.java
index 414c043f7..e87295e1a 100644
--- a/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderHealthIndicator.java
+++ b/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderHealthIndicator.java
@@ -56,14 +56,14 @@ public class KafkaBinderHealthIndicator implements HealthIndicator {
 
 	private Consumer metadataConsumer;
 
-	public KafkaBinderHealthIndicator(KafkaMessageChannelBinder binder, ConsumerFactory consumerFactory) {
+	public KafkaBinderHealthIndicator(KafkaMessageChannelBinder binder,
+			ConsumerFactory consumerFactory) {
 		this.binder = binder;
 		this.consumerFactory = consumerFactory;
 	}
 
 	/**
 	 * Set the timeout in seconds to retrieve health information.
-	 *
 	 * @param timeout the timeout - default 60.
 	 */
 	public void setTimeout(int timeout) {
@@ -80,16 +80,16 @@ public class KafkaBinderHealthIndicator implements HealthIndicator {
 		catch (InterruptedException ex) {
 			Thread.currentThread().interrupt();
 			return Health.down()
-					.withDetail("Interrupted while waiting for partition information in", this.timeout + " seconds")
+					.withDetail("Interrupted while waiting for partition information in",
+							this.timeout + " seconds")
 					.build();
 		}
 		catch (ExecutionException ex) {
 			return Health.down(ex).build();
 		}
 		catch (TimeoutException ex) {
-			return Health.down()
-					.withDetail("Failed to retrieve partition information in", this.timeout + " seconds")
-					.build();
+			return Health.down().withDetail("Failed to retrieve partition information in",
+					this.timeout + " seconds").build();
 		}
 		finally {
 			exec.shutdownNow();
@@ -107,21 +107,23 @@ public class KafkaBinderHealthIndicator implements HealthIndicator {
 			}
 			synchronized (this.metadataConsumer) {
 				Set downMessages = new HashSet<>();
-				final Map topicsInUse =
-						KafkaBinderHealthIndicator.this.binder.getTopicsInUse();
+				final Map topicsInUse = KafkaBinderHealthIndicator.this.binder
+						.getTopicsInUse();
 				if (topicsInUse.isEmpty()) {
-					return Health.down()
-							.withDetail("No topic information available", "Kafka broker is not reachable")
-							.build();
+					return Health.down().withDetail("No topic information available",
+							"Kafka broker is not reachable").build();
 				}
 				else {
 					for (String topic : topicsInUse.keySet()) {
-						KafkaMessageChannelBinder.TopicInformation topicInformation = topicsInUse.get(topic);
+						KafkaMessageChannelBinder.TopicInformation topicInformation = topicsInUse
+								.get(topic);
 						if (!topicInformation.isTopicPattern()) {
-							List partitionInfos = this.metadataConsumer.partitionsFor(topic);
+							List partitionInfos = this.metadataConsumer
+									.partitionsFor(topic);
 							for (PartitionInfo partitionInfo : partitionInfos) {
 								if (topicInformation.getPartitionInfos()
-										.contains(partitionInfo) && partitionInfo.leader().id() == -1) {
+										.contains(partitionInfo)
+										&& partitionInfo.leader().id() == -1) {
 									downMessages.add(partitionInfo.toString());
 								}
 							}
@@ -133,8 +135,9 @@ public class KafkaBinderHealthIndicator implements HealthIndicator {
 				}
 				else {
 					return Health.down()
-						.withDetail("Following partitions in use have no leaders: ", downMessages.toString())
-						.build();
+							.withDetail("Following partitions in use have no leaders: ",
+									downMessages.toString())
+							.build();
 				}
 			}
 		}
diff --git a/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderMetrics.java b/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderMetrics.java
index 2ecb56a20..406acd98e 100644
--- a/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderMetrics.java
+++ b/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderMetrics.java
@@ -59,7 +59,8 @@ import org.springframework.util.ObjectUtils;
  * @author Thomas Cheyney
  * @author Gary Russell
  */
-public class KafkaBinderMetrics implements MeterBinder, ApplicationListener {
+public class KafkaBinderMetrics
+		implements MeterBinder, ApplicationListener {
 
 	private static final int DEFAULT_TIMEOUT = 60;
 
@@ -81,7 +82,8 @@ public class KafkaBinderMetrics implements MeterBinder, ApplicationListener defaultConsumerFactory, @Nullable MeterRegistry meterRegistry) {
+			ConsumerFactory defaultConsumerFactory,
+			@Nullable MeterRegistry meterRegistry) {
 
 		this.binder = binder;
 		this.binderConfigurationProperties = binderConfigurationProperties;
@@ -102,8 +104,8 @@ public class KafkaBinderMetrics implements MeterBinder, ApplicationListener topicInfo : this.binder.getTopicsInUse()
-				.entrySet()) {
+		for (Map.Entry topicInfo : this.binder
+				.getTopicsInUse().entrySet()) {
 
 			if (!topicInfo.getValue().isConsumerTopic()) {
 				continue;
@@ -113,8 +115,7 @@ public class KafkaBinderMetrics implements MeterBinder, ApplicationListener computeUnconsumedMessages(topic, group))
-					.tag("group", group)
+					(o) -> computeUnconsumedMessages(topic, group)).tag("group", group)
 					.tag("topic", topic)
 					.description("Unconsumed messages for a particular group and topic")
 					.register(registry);
@@ -131,16 +132,21 @@ public class KafkaBinderMetrics implements MeterBinder, ApplicationListener createConsumerFactory().createConsumer(g, "monitoring"));
 				synchronized (metadataConsumer) {
-					List partitionInfos = metadataConsumer.partitionsFor(topic);
+					List partitionInfos = metadataConsumer
+							.partitionsFor(topic);
 					List topicPartitions = new LinkedList<>();
 					for (PartitionInfo partitionInfo : partitionInfos) {
-						topicPartitions.add(new TopicPartition(partitionInfo.topic(), partitionInfo.partition()));
+						topicPartitions.add(new TopicPartition(partitionInfo.topic(),
+								partitionInfo.partition()));
 					}
 
-					Map endOffsets = metadataConsumer.endOffsets(topicPartitions);
+					Map endOffsets = metadataConsumer
+							.endOffsets(topicPartitions);
 
-					for (Map.Entry endOffset : endOffsets.entrySet()) {
-						OffsetAndMetadata current = metadataConsumer.committed(endOffset.getKey());
+					for (Map.Entry endOffset : endOffsets
+							.entrySet()) {
+						OffsetAndMetadata current = metadataConsumer
+								.committed(endOffset.getKey());
 						lag += endOffset.getValue();
 						if (current != null) {
 							lag -= current.offset();
@@ -173,17 +179,22 @@ public class KafkaBinderMetrics implements MeterBinder, ApplicationListener props = new HashMap<>();
-					props.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, ByteArrayDeserializer.class);
-					props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, ByteArrayDeserializer.class);
-					Map mergedConfig = this.binderConfigurationProperties.mergedConsumerConfiguration();
+					props.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG,
+							ByteArrayDeserializer.class);
+					props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG,
+							ByteArrayDeserializer.class);
+					Map mergedConfig = this.binderConfigurationProperties
+							.mergedConsumerConfiguration();
 					if (!ObjectUtils.isEmpty(mergedConfig)) {
 						props.putAll(mergedConfig);
 					}
 					if (!props.containsKey(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG)) {
 						props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG,
-								this.binderConfigurationProperties.getKafkaConnectionString());
+								this.binderConfigurationProperties
+										.getKafkaConnectionString());
 					}
-					this.defaultConsumerFactory = new DefaultKafkaConsumerFactory<>(props);
+					this.defaultConsumerFactory = new DefaultKafkaConsumerFactory<>(
+							props);
 				}
 			}
 		}
@@ -194,7 +205,8 @@ public class KafkaBinderMetrics implements MeterBinder, ApplicationListener consumer,
-			Collection partitions) {
+	default void onPartitionsRevokedBeforeCommit(String bindingName,
+			Consumer consumer, Collection partitions) {
 		// do nothing
 	}
 
@@ -48,20 +48,21 @@ public interface KafkaBindingRebalanceListener {
 	 * @param consumer the consumer.
 	 * @param partitions the partitions.
 	 */
-	default void onPartitionsRevokedAfterCommit(String bindingName, Consumer consumer, Collection partitions) {
+	default void onPartitionsRevokedAfterCommit(String bindingName,
+			Consumer consumer, Collection partitions) {
 		// do nothing
 	}
 
 	/**
-	 * Invoked when partitions are initially assigned or after a rebalance.
-	 * Applications might only want to perform seek operations on an initial assignment.
+	 * Invoked when partitions are initially assigned or after a rebalance. Applications
+	 * might only want to perform seek operations on an initial assignment.
 	 * @param bindingName the name of the binding.
 	 * @param consumer the consumer.
 	 * @param partitions the partitions.
 	 * @param initial true if this is the initial assignment.
 	 */
-	default void onPartitionsAssigned(String bindingName, Consumer consumer, Collection partitions,
-			boolean initial) {
+	default void onPartitionsAssigned(String bindingName, Consumer consumer,
+			Collection partitions, boolean initial) {
 		// do nothing
 	}
 
diff --git a/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/KafkaMessageChannelBinder.java b/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/KafkaMessageChannelBinder.java
index 7055f120e..a1901c8f9 100644
--- a/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/KafkaMessageChannelBinder.java
+++ b/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/KafkaMessageChannelBinder.java
@@ -117,7 +117,8 @@ import org.springframework.util.concurrent.ListenableFuture;
 import org.springframework.util.concurrent.ListenableFutureCallback;
 
 /**
- * A {@link org.springframework.cloud.stream.binder.Binder} that uses Kafka as the underlying middleware.
+ * A {@link org.springframework.cloud.stream.binder.Binder} that uses Kafka as the
+ * underlying middleware.
  *
  * @author Eric Bottard
  * @author Marius Bogoevici
@@ -130,8 +131,11 @@ import org.springframework.util.concurrent.ListenableFutureCallback;
  * @author Doug Saus
  */
 public class KafkaMessageChannelBinder extends
+		// @checkstyle:off
 		AbstractMessageChannelBinder, ExtendedProducerProperties, KafkaTopicProvisioner>
-		implements ExtendedPropertiesBinder {
+		// @checkstyle:on
+		implements
+		ExtendedPropertiesBinder {
 
 	/**
 	 * Kafka header for x-exception-fqcn.
@@ -187,23 +191,28 @@ public class KafkaMessageChannelBinder extends
 
 	private KafkaExtendedBindingProperties extendedBindingProperties = new KafkaExtendedBindingProperties();
 
-	public KafkaMessageChannelBinder(KafkaBinderConfigurationProperties configurationProperties,
+	public KafkaMessageChannelBinder(
+			KafkaBinderConfigurationProperties configurationProperties,
 			KafkaTopicProvisioner provisioningProvider) {
 
 		this(configurationProperties, provisioningProvider, null, null);
 	}
 
-	public KafkaMessageChannelBinder(KafkaBinderConfigurationProperties configurationProperties,
+	public KafkaMessageChannelBinder(
+			KafkaBinderConfigurationProperties configurationProperties,
 			KafkaTopicProvisioner provisioningProvider,
 			ListenerContainerCustomizer> containerCustomizer,
 			KafkaBindingRebalanceListener rebalanceListener) {
 
-		super(headersToMap(configurationProperties), provisioningProvider, containerCustomizer);
+		super(headersToMap(configurationProperties), provisioningProvider,
+				containerCustomizer);
 		this.configurationProperties = configurationProperties;
-		if (StringUtils.hasText(configurationProperties.getTransaction().getTransactionIdPrefix())) {
+		if (StringUtils.hasText(
+				configurationProperties.getTransaction().getTransactionIdPrefix())) {
 			this.transactionManager = new KafkaTransactionManager<>(getProducerFactory(
-					configurationProperties.getTransaction().getTransactionIdPrefix(), new ExtendedProducerProperties<>(
-							configurationProperties.getTransaction().getProducer().getExtension())));
+					configurationProperties.getTransaction().getTransactionIdPrefix(),
+					new ExtendedProducerProperties<>(configurationProperties
+							.getTransaction().getProducer().getExtension())));
 		}
 		else {
 			this.transactionManager = null;
@@ -211,23 +220,27 @@ public class KafkaMessageChannelBinder extends
 		this.rebalanceListener = rebalanceListener;
 	}
 
-	private static String[] headersToMap(KafkaBinderConfigurationProperties configurationProperties) {
+	private static String[] headersToMap(
+			KafkaBinderConfigurationProperties configurationProperties) {
 		String[] headersToMap;
 		if (ObjectUtils.isEmpty(configurationProperties.getHeaders())) {
 			headersToMap = BinderHeaders.STANDARD_HEADERS;
 		}
 		else {
-			String[] combinedHeadersToMap = Arrays.copyOfRange(BinderHeaders.STANDARD_HEADERS, 0,
-					BinderHeaders.STANDARD_HEADERS.length + configurationProperties.getHeaders().length);
-			System.arraycopy(configurationProperties.getHeaders(), 0, combinedHeadersToMap,
-					BinderHeaders.STANDARD_HEADERS.length,
+			String[] combinedHeadersToMap = Arrays.copyOfRange(
+					BinderHeaders.STANDARD_HEADERS, 0,
+					BinderHeaders.STANDARD_HEADERS.length
+							+ configurationProperties.getHeaders().length);
+			System.arraycopy(configurationProperties.getHeaders(), 0,
+					combinedHeadersToMap, BinderHeaders.STANDARD_HEADERS.length,
 					configurationProperties.getHeaders().length);
 			headersToMap = combinedHeadersToMap;
 		}
 		return headersToMap;
 	}
 
-	public void setExtendedBindingProperties(KafkaExtendedBindingProperties extendedBindingProperties) {
+	public void setExtendedBindingProperties(
+			KafkaExtendedBindingProperties extendedBindingProperties) {
 		this.extendedBindingProperties = extendedBindingProperties;
 	}
 
@@ -261,46 +274,56 @@ public class KafkaMessageChannelBinder extends
 	}
 
 	@Override
-	protected MessageHandler createProducerMessageHandler(final ProducerDestination destination,
-			ExtendedProducerProperties producerProperties, MessageChannel errorChannel)
-			throws Exception {
-		throw new IllegalStateException("The abstract binder should not call this method");
+	protected MessageHandler createProducerMessageHandler(
+			final ProducerDestination destination,
+			ExtendedProducerProperties producerProperties,
+			MessageChannel errorChannel) throws Exception {
+		throw new IllegalStateException(
+				"The abstract binder should not call this method");
 	}
 
 	@Override
-	protected MessageHandler createProducerMessageHandler(final ProducerDestination destination,
+	protected MessageHandler createProducerMessageHandler(
+			final ProducerDestination destination,
 			ExtendedProducerProperties producerProperties,
-			MessageChannel channel, MessageChannel errorChannel)
-			throws Exception {
+			MessageChannel channel, MessageChannel errorChannel) throws Exception {
 		/*
-		 * IMPORTANT: With a transactional binder, individual producer properties for Kafka are
-		 * ignored; the global binder (spring.cloud.stream.kafka.binder.transaction.producer.*)
-		 * properties are used instead, for all producers. A binder is transactional when
+		 * IMPORTANT: With a transactional binder, individual producer properties for
+		 * Kafka are ignored; the global binder
+		 * (spring.cloud.stream.kafka.binder.transaction.producer.*) properties are used
+		 * instead, for all producers. A binder is transactional when
 		 * 'spring.cloud.stream.kafka.binder.transaction.transaction-id-prefix' has text.
 		 */
 		final ProducerFactory producerFB = this.transactionManager != null
 				? this.transactionManager.getProducerFactory()
 				: getProducerFactory(null, producerProperties);
 		Collection partitions = provisioningProvider.getPartitionsForTopic(
-				producerProperties.getPartitionCount(), false,
-				() -> {
+				producerProperties.getPartitionCount(), false, () -> {
 					Producer producer = producerFB.createProducer();
-					List partitionsFor = producer.partitionsFor(destination.getName());
+					List partitionsFor = producer
+							.partitionsFor(destination.getName());
 					producer.close();
 					((DisposableBean) producerFB).destroy();
 					return partitionsFor;
 				}, destination.getName());
-		this.topicsInUse.put(destination.getName(), new TopicInformation(null, partitions, false));
-		if (producerProperties.isPartitioned() && producerProperties.getPartitionCount() < partitions.size()) {
+		this.topicsInUse.put(destination.getName(),
+				new TopicInformation(null, partitions, false));
+		if (producerProperties.isPartitioned()
+				&& producerProperties.getPartitionCount() < partitions.size()) {
 			if (this.logger.isInfoEnabled()) {
-				this.logger.info("The `partitionCount` of the producer for topic " + destination.getName() + " is "
-						+ producerProperties.getPartitionCount() + ", smaller than the actual partition count of "
-						+ partitions.size() + " for the topic. The larger number will be used instead.");
+				this.logger.info("The `partitionCount` of the producer for topic "
+						+ destination.getName() + " is "
+						+ producerProperties.getPartitionCount()
+						+ ", smaller than the actual partition count of "
+						+ partitions.size()
+						+ " for the topic. The larger number will be used instead.");
 			}
-			List interceptors = ((ChannelInterceptorAware) channel).getChannelInterceptors();
+			List interceptors = ((ChannelInterceptorAware) channel)
+					.getChannelInterceptors();
 			interceptors.forEach((interceptor) -> {
 				if (interceptor instanceof PartitioningInterceptor) {
-					((PartitioningInterceptor) interceptor).setPartitionCount(partitions.size());
+					((PartitioningInterceptor) interceptor)
+							.setPartitionCount(partitions.size());
 				}
 			});
 		}
@@ -309,27 +332,29 @@ public class KafkaMessageChannelBinder extends
 		if (this.producerListener != null) {
 			kafkaTemplate.setProducerListener(this.producerListener);
 		}
-		ProducerConfigurationMessageHandler handler = new ProducerConfigurationMessageHandler(kafkaTemplate,
-				destination.getName(), producerProperties, producerFB);
+		ProducerConfigurationMessageHandler handler = new ProducerConfigurationMessageHandler(
+				kafkaTemplate, destination.getName(), producerProperties, producerFB);
 		if (errorChannel != null) {
 			handler.setSendFailureChannel(errorChannel);
 		}
 		KafkaHeaderMapper mapper = null;
 		if (this.configurationProperties.getHeaderMapperBeanName() != null) {
-			mapper = getApplicationContext().getBean(this.configurationProperties.getHeaderMapperBeanName(),
+			mapper = getApplicationContext().getBean(
+					this.configurationProperties.getHeaderMapperBeanName(),
 					KafkaHeaderMapper.class);
 		}
 		/*
-		 *  Even if the user configures a bean, we must not use it if the header
-		 *  mode is not the default (headers); setting the mapper to null
-		 *  disables populating headers in the message handler.
+		 * Even if the user configures a bean, we must not use it if the header mode is
+		 * not the default (headers); setting the mapper to null disables populating
+		 * headers in the message handler.
 		 */
 		if (producerProperties.getHeaderMode() != null
 				&& !HeaderMode.headers.equals(producerProperties.getHeaderMode())) {
 			mapper = null;
 		}
 		else if (mapper == null) {
-			String[] headerPatterns = producerProperties.getExtension().getHeaderPatterns();
+			String[] headerPatterns = producerProperties.getExtension()
+					.getHeaderPatterns();
 			if (headerPatterns != null && headerPatterns.length > 0) {
 				List patterns = new LinkedList<>(Arrays.asList(headerPatterns));
 				if (!patterns.contains("!" + MessageHeaders.TIMESTAMP)) {
@@ -338,7 +363,8 @@ public class KafkaMessageChannelBinder extends
 				if (!patterns.contains("!" + MessageHeaders.ID)) {
 					patterns.add(0, "!" + MessageHeaders.ID);
 				}
-				mapper = new BinderHeaderMapper(patterns.toArray(new String[patterns.size()]));
+				mapper = new BinderHeaderMapper(
+						patterns.toArray(new String[patterns.size()]));
 			}
 			else {
 				mapper = new BinderHeaderMapper();
@@ -348,20 +374,25 @@ public class KafkaMessageChannelBinder extends
 		return handler;
 	}
 
-	protected DefaultKafkaProducerFactory getProducerFactory(String transactionIdPrefix,
+	protected DefaultKafkaProducerFactory getProducerFactory(
+			String transactionIdPrefix,
 			ExtendedProducerProperties producerProperties) {
 		Map props = new HashMap<>();
 		props.put(ProducerConfig.RETRIES_CONFIG, 0);
 		props.put(ProducerConfig.BUFFER_MEMORY_CONFIG, 33554432);
 		props.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, ByteArraySerializer.class);
-		props.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, ByteArraySerializer.class);
-		props.put(ProducerConfig.ACKS_CONFIG, String.valueOf(this.configurationProperties.getRequiredAcks()));
-		Map mergedConfig = this.configurationProperties.mergedProducerConfiguration();
+		props.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG,
+				ByteArraySerializer.class);
+		props.put(ProducerConfig.ACKS_CONFIG,
+				String.valueOf(this.configurationProperties.getRequiredAcks()));
+		Map mergedConfig = this.configurationProperties
+				.mergedProducerConfiguration();
 		if (!ObjectUtils.isEmpty(mergedConfig)) {
 			props.putAll(mergedConfig);
 		}
 		if (ObjectUtils.isEmpty(props.get(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG))) {
-			props.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, this.configurationProperties.getKafkaConnectionString());
+			props.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG,
+					this.configurationProperties.getKafkaConnectionString());
 		}
 		if (ObjectUtils.isEmpty(props.get(ProducerConfig.BATCH_SIZE_CONFIG))) {
 			props.put(ProducerConfig.BATCH_SIZE_CONFIG,
@@ -378,7 +409,8 @@ public class KafkaMessageChannelBinder extends
 		if (!ObjectUtils.isEmpty(producerProperties.getExtension().getConfiguration())) {
 			props.putAll(producerProperties.getExtension().getConfiguration());
 		}
-		DefaultKafkaProducerFactory producerFactory = new DefaultKafkaProducerFactory<>(props);
+		DefaultKafkaProducerFactory producerFactory = new DefaultKafkaProducerFactory<>(
+				props);
 		if (transactionIdPrefix != null) {
 			producerFactory.setTransactionIdPrefix(transactionIdPrefix);
 		}
@@ -386,51 +418,62 @@ public class KafkaMessageChannelBinder extends
 	}
 
 	@Override
-	protected boolean useNativeEncoding(ExtendedProducerProperties producerProperties) {
+	protected boolean useNativeEncoding(
+			ExtendedProducerProperties producerProperties) {
 		if (this.transactionManager != null) {
-			return this.configurationProperties.getTransaction().getProducer().isUseNativeEncoding();
+			return this.configurationProperties.getTransaction().getProducer()
+					.isUseNativeEncoding();
 		}
 		return super.useNativeEncoding(producerProperties);
 	}
 
 	@Override
 	@SuppressWarnings("unchecked")
-	protected MessageProducer createConsumerEndpoint(final ConsumerDestination destination, final String group,
+	protected MessageProducer createConsumerEndpoint(
+			final ConsumerDestination destination, final String group,
 			final ExtendedConsumerProperties extendedConsumerProperties) {
 		boolean anonymous = !StringUtils.hasText(group);
-		Assert.isTrue(!anonymous || !extendedConsumerProperties.getExtension().isEnableDlq(),
+		Assert.isTrue(
+				!anonymous || !extendedConsumerProperties.getExtension().isEnableDlq(),
 				"DLQ support is not available for anonymous subscriptions");
-		String consumerGroup = anonymous ? "anonymous." + UUID.randomUUID().toString() : group;
-		final ConsumerFactory consumerFactory = createKafkaConsumerFactory(anonymous, consumerGroup,
-				extendedConsumerProperties);
+		String consumerGroup = anonymous ? "anonymous." + UUID.randomUUID().toString()
+				: group;
+		final ConsumerFactory consumerFactory = createKafkaConsumerFactory(
+				anonymous, consumerGroup, extendedConsumerProperties);
 		int partitionCount = extendedConsumerProperties.getInstanceCount()
 				* extendedConsumerProperties.getConcurrency();
 
 		Collection listenedPartitions = new ArrayList<>();
 
-		boolean usingPatterns = extendedConsumerProperties.getExtension().isDestinationIsPattern();
+		boolean usingPatterns = extendedConsumerProperties.getExtension()
+				.isDestinationIsPattern();
 		Assert.isTrue(!usingPatterns || !extendedConsumerProperties.isMultiplex(),
 				"Cannot use a pattern with multiplexed destinations; "
-				+ "use the regex pattern to specify multiple topics instead");
-		boolean groupManagement = extendedConsumerProperties.getExtension().isAutoRebalanceEnabled();
+						+ "use the regex pattern to specify multiple topics instead");
+		boolean groupManagement = extendedConsumerProperties.getExtension()
+				.isAutoRebalanceEnabled();
 		if (!extendedConsumerProperties.isMultiplex()) {
-			listenedPartitions.addAll(processTopic(consumerGroup, extendedConsumerProperties, consumerFactory,
-					partitionCount, usingPatterns, groupManagement, destination.getName()));
+			listenedPartitions.addAll(processTopic(consumerGroup,
+					extendedConsumerProperties, consumerFactory, partitionCount,
+					usingPatterns, groupManagement, destination.getName()));
 		}
 		else {
-			for (String name : StringUtils.commaDelimitedListToStringArray(destination.getName())) {
-				listenedPartitions.addAll(processTopic(consumerGroup, extendedConsumerProperties, consumerFactory,
-						partitionCount, usingPatterns, groupManagement, name.trim()));
+			for (String name : StringUtils
+					.commaDelimitedListToStringArray(destination.getName())) {
+				listenedPartitions.addAll(processTopic(consumerGroup,
+						extendedConsumerProperties, consumerFactory, partitionCount,
+						usingPatterns, groupManagement, name.trim()));
 			}
 		}
 
-		String[] topics = extendedConsumerProperties.isMultiplex() ? StringUtils.commaDelimitedListToStringArray(destination.getName())
+		String[] topics = extendedConsumerProperties.isMultiplex()
+				? StringUtils.commaDelimitedListToStringArray(destination.getName())
 				: new String[] { destination.getName() };
 		for (int i = 0; i < topics.length; i++) {
 			topics[i] = topics[i].trim();
 		}
-		Assert.isTrue(usingPatterns
-				|| !CollectionUtils.isEmpty(listenedPartitions), "A list of partitions must be provided");
+		Assert.isTrue(usingPatterns || !CollectionUtils.isEmpty(listenedPartitions),
+				"A list of partitions must be provided");
 		final TopicPartitionInitialOffset[] topicPartitionInitialOffsets = getTopicPartitionInitialOffsets(
 				listenedPartitions);
 		final ContainerProperties containerProperties = anonymous
@@ -445,13 +488,16 @@ public class KafkaMessageChannelBinder extends
 		if (this.rebalanceListener != null) {
 			setupRebalanceListener(extendedConsumerProperties, containerProperties);
 		}
-		containerProperties.setIdleEventInterval(extendedConsumerProperties.getExtension().getIdleEventInterval());
+		containerProperties.setIdleEventInterval(
+				extendedConsumerProperties.getExtension().getIdleEventInterval());
 		int concurrency = usingPatterns ? extendedConsumerProperties.getConcurrency()
-				: Math.min(extendedConsumerProperties.getConcurrency(), listenedPartitions.size());
-		resetOffsets(extendedConsumerProperties, consumerFactory, groupManagement, containerProperties);
+				: Math.min(extendedConsumerProperties.getConcurrency(),
+						listenedPartitions.size());
+		resetOffsets(extendedConsumerProperties, consumerFactory, groupManagement,
+				containerProperties);
 		@SuppressWarnings("rawtypes")
-		final ConcurrentMessageListenerContainer messageListenerContainer =
-				new ConcurrentMessageListenerContainer(consumerFactory, containerProperties) {
+		final ConcurrentMessageListenerContainer messageListenerContainer = new ConcurrentMessageListenerContainer(
+				consumerFactory, containerProperties) {
 
 			@Override
 			public void stop(Runnable callback) {
@@ -462,10 +508,12 @@ public class KafkaMessageChannelBinder extends
 		messageListenerContainer.setConcurrency(concurrency);
 		// these won't be needed if the container is made a bean
 		if (getApplicationEventPublisher() != null) {
-			messageListenerContainer.setApplicationEventPublisher(getApplicationEventPublisher());
+			messageListenerContainer
+					.setApplicationEventPublisher(getApplicationEventPublisher());
 		}
 		else if (getApplicationContext() != null) {
-			messageListenerContainer.setApplicationEventPublisher(getApplicationContext());
+			messageListenerContainer
+					.setApplicationEventPublisher(getApplicationContext());
 		}
 		messageListenerContainer.setBeanName(topics + ".container");
 		// end of these won't be needed...
@@ -478,26 +526,34 @@ public class KafkaMessageChannelBinder extends
 			messageListenerContainer.getContainerProperties()
 					.setAckOnError(isAutoCommitOnError(extendedConsumerProperties));
 			if (extendedConsumerProperties.getExtension().isAckEachRecord()) {
-				messageListenerContainer.getContainerProperties().setAckMode(ContainerProperties.AckMode.RECORD);
+				messageListenerContainer.getContainerProperties()
+						.setAckMode(ContainerProperties.AckMode.RECORD);
 			}
 		}
 		if (this.logger.isDebugEnabled()) {
-			this.logger.debug(
-					"Listened partitions: " + StringUtils.collectionToCommaDelimitedString(listenedPartitions));
+			this.logger.debug("Listened partitions: "
+					+ StringUtils.collectionToCommaDelimitedString(listenedPartitions));
 		}
-		this.getContainerCustomizer().configure(messageListenerContainer, destination.getName(), group);
-		final KafkaMessageDrivenChannelAdapter kafkaMessageDrivenChannelAdapter =
-				new KafkaMessageDrivenChannelAdapter<>(messageListenerContainer);
-		kafkaMessageDrivenChannelAdapter.setMessageConverter(getMessageConverter(extendedConsumerProperties));
+		this.getContainerCustomizer().configure(messageListenerContainer,
+				destination.getName(), group);
+		// @checkstyle:off
+		final KafkaMessageDrivenChannelAdapter kafkaMessageDrivenChannelAdapter = new KafkaMessageDrivenChannelAdapter<>(
+				messageListenerContainer);
+		// @checkstyle:on
+		kafkaMessageDrivenChannelAdapter
+				.setMessageConverter(getMessageConverter(extendedConsumerProperties));
 		kafkaMessageDrivenChannelAdapter.setBeanFactory(this.getBeanFactory());
-		ErrorInfrastructure errorInfrastructure = registerErrorInfrastructure(destination, consumerGroup,
-				extendedConsumerProperties);
+		ErrorInfrastructure errorInfrastructure = registerErrorInfrastructure(destination,
+				consumerGroup, extendedConsumerProperties);
 		if (extendedConsumerProperties.getMaxAttempts() > 1) {
-			kafkaMessageDrivenChannelAdapter.setRetryTemplate(buildRetryTemplate(extendedConsumerProperties));
-			kafkaMessageDrivenChannelAdapter.setRecoveryCallback(errorInfrastructure.getRecoverer());
+			kafkaMessageDrivenChannelAdapter
+					.setRetryTemplate(buildRetryTemplate(extendedConsumerProperties));
+			kafkaMessageDrivenChannelAdapter
+					.setRecoveryCallback(errorInfrastructure.getRecoverer());
 		}
 		else {
-			kafkaMessageDrivenChannelAdapter.setErrorChannel(errorInfrastructure.getErrorChannel());
+			kafkaMessageDrivenChannelAdapter
+					.setErrorChannel(errorInfrastructure.getErrorChannel());
 		}
 		return kafkaMessageDrivenChannelAdapter;
 	}
@@ -511,61 +567,67 @@ public class KafkaMessageChannelBinder extends
 		bindingNameHolder.remove();
 		Assert.notNull(bindingName, "'bindingName' cannot be null");
 		final KafkaBindingRebalanceListener userRebalanceListener = this.rebalanceListener;
-		containerProperties.setConsumerRebalanceListener(new ConsumerAwareRebalanceListener() {
+		containerProperties
+				.setConsumerRebalanceListener(new ConsumerAwareRebalanceListener() {
 
-			private boolean initial = true;
+					private boolean initial = true;
 
-			@Override
-			public void onPartitionsRevokedBeforeCommit(Consumer consumer,
-					Collection partitions) {
+					@Override
+					public void onPartitionsRevokedBeforeCommit(Consumer consumer,
+							Collection partitions) {
 
-				userRebalanceListener.onPartitionsRevokedBeforeCommit(bindingName, consumer, partitions);
-			}
+						userRebalanceListener.onPartitionsRevokedBeforeCommit(bindingName,
+								consumer, partitions);
+					}
 
-			@Override
-			public void onPartitionsRevokedAfterCommit(Consumer consumer,
-					Collection partitions) {
+					@Override
+					public void onPartitionsRevokedAfterCommit(Consumer consumer,
+							Collection partitions) {
 
-				userRebalanceListener.onPartitionsRevokedAfterCommit(bindingName, consumer, partitions);
-			}
+						userRebalanceListener.onPartitionsRevokedAfterCommit(bindingName,
+								consumer, partitions);
+					}
 
-			@Override
-			public void onPartitionsAssigned(Consumer consumer, Collection partitions) {
-				try {
-					userRebalanceListener.onPartitionsAssigned(bindingName, consumer, partitions, this.initial);
-				}
-				finally {
-					this.initial = false;
-				}
-			}
+					@Override
+					public void onPartitionsAssigned(Consumer consumer,
+							Collection partitions) {
+						try {
+							userRebalanceListener.onPartitionsAssigned(bindingName,
+									consumer, partitions, this.initial);
+						}
+						finally {
+							this.initial = false;
+						}
+					}
 
-		});
+				});
 	}
 
 	public Collection processTopic(final String group,
 			final ExtendedConsumerProperties extendedConsumerProperties,
-			final ConsumerFactory consumerFactory, int partitionCount, boolean usingPatterns,
-			boolean groupManagement, String topic) {
+			final ConsumerFactory consumerFactory, int partitionCount,
+			boolean usingPatterns, boolean groupManagement, String topic) {
 		Collection listenedPartitions;
 		Collection allPartitions = usingPatterns ? Collections.emptyList()
-				: getPartitionInfo(topic, extendedConsumerProperties, consumerFactory, partitionCount);
+				: getPartitionInfo(topic, extendedConsumerProperties, consumerFactory,
+						partitionCount);
 
-		if (groupManagement ||
-				extendedConsumerProperties.getInstanceCount() == 1) {
+		if (groupManagement || extendedConsumerProperties.getInstanceCount() == 1) {
 			listenedPartitions = allPartitions;
 		}
 		else {
 			listenedPartitions = new ArrayList<>();
 			for (PartitionInfo partition : allPartitions) {
 				// divide partitions across modules
-				if ((partition.partition()
-						% extendedConsumerProperties.getInstanceCount()) == extendedConsumerProperties
+				if ((partition.partition() % extendedConsumerProperties
+						.getInstanceCount()) == extendedConsumerProperties
 								.getInstanceIndex()) {
 					listenedPartitions.add(partition);
 				}
 			}
 		}
-		this.topicsInUse.put(topic, new TopicInformation(group, listenedPartitions, usingPatterns));
+		this.topicsInUse.put(topic,
+				new TopicInformation(group, listenedPartitions, usingPatterns));
 		return listenedPartitions;
 	}
 
@@ -579,84 +641,101 @@ public class KafkaMessageChannelBinder extends
 			final ContainerProperties containerProperties) {
 
 		boolean resetOffsets = extendedConsumerProperties.getExtension().isResetOffsets();
-		final Object resetTo = consumerFactory.getConfigurationProperties().get(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG);
+		final Object resetTo = consumerFactory.getConfigurationProperties()
+				.get(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG);
 		final AtomicBoolean initialAssignment = new AtomicBoolean(true);
 		if (!"earliest".equals(resetTo) && !"latest".equals(resetTo)) {
-			logger.warn("no (or unknown) " + ConsumerConfig.AUTO_OFFSET_RESET_CONFIG +
-					" property cannot reset");
+			logger.warn("no (or unknown) " + ConsumerConfig.AUTO_OFFSET_RESET_CONFIG
+					+ " property cannot reset");
 			resetOffsets = false;
 		}
 		if (groupManagement && resetOffsets) {
-			containerProperties.setConsumerRebalanceListener(new ConsumerAwareRebalanceListener() {
+			containerProperties
+					.setConsumerRebalanceListener(new ConsumerAwareRebalanceListener() {
 
-				@Override
-				public void onPartitionsRevokedBeforeCommit(Consumer consumer, Collection tps) {
-					// no op
-				}
-
-				@Override
-				public void onPartitionsRevokedAfterCommit(Consumer consumer, Collection tps) {
-					// no op
-				}
-
-				@Override
-				public void onPartitionsAssigned(Consumer consumer, Collection tps) {
-					if (initialAssignment.getAndSet(false)) {
-						if ("earliest".equals(resetTo)) {
-							consumer.seekToBeginning(tps);
+						@Override
+						public void onPartitionsRevokedBeforeCommit(
+								Consumer consumer, Collection tps) {
+							// no op
 						}
-						else if ("latest".equals(resetTo)) {
-							consumer.seekToEnd(tps);
+
+						@Override
+						public void onPartitionsRevokedAfterCommit(
+								Consumer consumer, Collection tps) {
+							// no op
 						}
-					}
-				}
-			});
+
+						@Override
+						public void onPartitionsAssigned(Consumer consumer,
+								Collection tps) {
+							if (initialAssignment.getAndSet(false)) {
+								if ("earliest".equals(resetTo)) {
+									consumer.seekToBeginning(tps);
+								}
+								else if ("latest".equals(resetTo)) {
+									consumer.seekToEnd(tps);
+								}
+							}
+						}
+					});
 		}
 		else if (resetOffsets) {
 			Arrays.stream(containerProperties.getTopicPartitions())
-					.map(tpio -> new TopicPartitionInitialOffset(tpio.topic(), tpio.partition(),
-							"earliest".equals(resetTo) ? SeekPosition.BEGINNING : SeekPosition.END))
-					.collect(Collectors.toList()).toArray(containerProperties.getTopicPartitions());
+					.map(tpio -> new TopicPartitionInitialOffset(tpio.topic(),
+							tpio.partition(),
+							"earliest".equals(resetTo) ? SeekPosition.BEGINNING
+									: SeekPosition.END))
+					.collect(Collectors.toList())
+					.toArray(containerProperties.getTopicPartitions());
 		}
 	}
 
 	@Override
-	protected PolledConsumerResources createPolledConsumerResources(String name, String group,
-			ConsumerDestination destination, ExtendedConsumerProperties consumerProperties) {
+	protected PolledConsumerResources createPolledConsumerResources(String name,
+			String group, ConsumerDestination destination,
+			ExtendedConsumerProperties consumerProperties) {
 
 		boolean anonymous = !StringUtils.hasText(group);
 		Assert.isTrue(!anonymous || !consumerProperties.getExtension().isEnableDlq(),
 				"DLQ support is not available for anonymous subscriptions");
-		String consumerGroup = anonymous ? "anonymous." + UUID.randomUUID().toString() : group;
-		final ConsumerFactory consumerFactory = createKafkaConsumerFactory(anonymous, consumerGroup,
-				consumerProperties);
+		String consumerGroup = anonymous ? "anonymous." + UUID.randomUUID().toString()
+				: group;
+		final ConsumerFactory consumerFactory = createKafkaConsumerFactory(
+				anonymous, consumerGroup, consumerProperties);
 		String[] topics = consumerProperties.isMultiplex()
 				? StringUtils.commaDelimitedListToStringArray(destination.getName())
 				: new String[] { destination.getName() };
 		for (int i = 0; i < topics.length; i++) {
 			topics[i] = topics[i].trim();
 		}
-		KafkaMessageSource source = new KafkaMessageSource<>(consumerFactory, topics);
+		KafkaMessageSource source = new KafkaMessageSource<>(consumerFactory,
+				topics);
 		source.setMessageConverter(getMessageConverter(consumerProperties));
 		source.setRawMessageHeader(consumerProperties.getExtension().isEnableDlq());
 		String clientId = name;
-		if (consumerProperties.getExtension().getConfiguration().containsKey(ConsumerConfig.CLIENT_ID_CONFIG)) {
-			clientId = consumerProperties.getExtension().getConfiguration().get(ConsumerConfig.CLIENT_ID_CONFIG);
+		if (consumerProperties.getExtension().getConfiguration()
+				.containsKey(ConsumerConfig.CLIENT_ID_CONFIG)) {
+			clientId = consumerProperties.getExtension().getConfiguration()
+					.get(ConsumerConfig.CLIENT_ID_CONFIG);
 		}
 		source.setClientId(clientId);
 
 		if (!consumerProperties.isMultiplex()) {
-			// I copied this from the regular consumer - it looks bogus to me - includes all partitions
-			// not just the ones this binding is listening to; doesn't seem right for a health check.
-			Collection partitionInfos = getPartitionInfo(destination.getName(), consumerProperties,
-					consumerFactory, -1);
-			this.topicsInUse.put(destination.getName(), new TopicInformation(consumerGroup, partitionInfos, false));
+			// I copied this from the regular consumer - it looks bogus to me - includes
+			// all partitions
+			// not just the ones this binding is listening to; doesn't seem right for a
+			// health check.
+			Collection partitionInfos = getPartitionInfo(
+					destination.getName(), consumerProperties, consumerFactory, -1);
+			this.topicsInUse.put(destination.getName(),
+					new TopicInformation(consumerGroup, partitionInfos, false));
 		}
 		else {
 			for (int i = 0; i < topics.length; i++) {
-				Collection partitionInfos = getPartitionInfo(topics[i], consumerProperties,
-						consumerFactory, -1);
-				this.topicsInUse.put(topics[i], new TopicInformation(consumerGroup, partitionInfos, false));
+				Collection partitionInfos = getPartitionInfo(topics[i],
+						consumerProperties, consumerFactory, -1);
+				this.topicsInUse.put(topics[i],
+						new TopicInformation(consumerGroup, partitionInfos, false));
 			}
 		}
 
@@ -673,8 +752,8 @@ public class KafkaMessageChannelBinder extends
 			}
 
 		});
-		return new PolledConsumerResources(source,
-				registerErrorInfrastructure(destination, group, consumerProperties, true));
+		return new PolledConsumerResources(source, registerErrorInfrastructure(
+				destination, group, consumerProperties, true));
 	}
 
 	@Override
@@ -692,20 +771,24 @@ public class KafkaMessageChannelBinder extends
 		MessagingMessageConverter messageConverter;
 		if (extendedConsumerProperties.getExtension().getConverterBeanName() == null) {
 			messageConverter = new MessagingMessageConverter();
-			StandardHeaders standardHeaders = extendedConsumerProperties.getExtension().getStandardHeaders();
-			messageConverter.setGenerateMessageId(StandardHeaders.id.equals(standardHeaders)
-					|| StandardHeaders.both.equals(standardHeaders));
-			messageConverter.setGenerateTimestamp(StandardHeaders.timestamp.equals(standardHeaders)
-					|| StandardHeaders.both.equals(standardHeaders));
+			StandardHeaders standardHeaders = extendedConsumerProperties.getExtension()
+					.getStandardHeaders();
+			messageConverter
+					.setGenerateMessageId(StandardHeaders.id.equals(standardHeaders)
+							|| StandardHeaders.both.equals(standardHeaders));
+			messageConverter.setGenerateTimestamp(
+					StandardHeaders.timestamp.equals(standardHeaders)
+							|| StandardHeaders.both.equals(standardHeaders));
 		}
 		else {
 			try {
 				messageConverter = getApplicationContext().getBean(
-					extendedConsumerProperties.getExtension().getConverterBeanName(),
+						extendedConsumerProperties.getExtension().getConverterBeanName(),
 						MessagingMessageConverter.class);
 			}
 			catch (NoSuchBeanDefinitionException ex) {
-				throw new IllegalStateException("Converter bean not present in application context", ex);
+				throw new IllegalStateException(
+						"Converter bean not present in application context", ex);
 			}
 		}
 		messageConverter.setHeaderMapper(getHeaderMapper(extendedConsumerProperties));
@@ -716,7 +799,8 @@ public class KafkaMessageChannelBinder extends
 			final ExtendedConsumerProperties extendedConsumerProperties) {
 		KafkaHeaderMapper mapper = null;
 		if (this.configurationProperties.getHeaderMapperBeanName() != null) {
-			mapper = getApplicationContext().getBean(this.configurationProperties.getHeaderMapperBeanName(),
+			mapper = getApplicationContext().getBean(
+					this.configurationProperties.getHeaderMapperBeanName(),
 					KafkaHeaderMapper.class);
 		}
 		if (mapper == null) {
@@ -731,7 +815,8 @@ public class KafkaMessageChannelBinder extends
 				}
 
 			};
-			String[] trustedPackages = extendedConsumerProperties.getExtension().getTrustedPackages();
+			String[] trustedPackages = extendedConsumerProperties.getExtension()
+					.getTrustedPackages();
 			if (!StringUtils.isEmpty(trustedPackages)) {
 				headerMapper.addTrustedPackages(trustedPackages);
 			}
@@ -760,16 +845,19 @@ public class KafkaMessageChannelBinder extends
 
 	@SuppressWarnings("unchecked")
 	@Override
-	protected MessageHandler getErrorMessageHandler(final ConsumerDestination destination, final String group,
+	protected MessageHandler getErrorMessageHandler(final ConsumerDestination destination,
+			final String group,
 			final ExtendedConsumerProperties properties) {
 		KafkaConsumerProperties kafkaConsumerProperties = properties.getExtension();
 		if (kafkaConsumerProperties.isEnableDlq()) {
-			KafkaProducerProperties dlqProducerProperties = kafkaConsumerProperties.getDlqProducerProperties();
+			KafkaProducerProperties dlqProducerProperties = kafkaConsumerProperties
+					.getDlqProducerProperties();
 			ProducerFactory producerFactory = this.transactionManager != null
 					? this.transactionManager.getProducerFactory()
 					: getProducerFactory(null,
-						new ExtendedProducerProperties<>(dlqProducerProperties));
-			final KafkaTemplate kafkaTemplate = new KafkaTemplate<>(producerFactory);
+							new ExtendedProducerProperties<>(dlqProducerProperties));
+			final KafkaTemplate kafkaTemplate = new KafkaTemplate<>(
+					producerFactory);
 
 			@SuppressWarnings("rawtypes")
 			DlqSender dlqSender = new DlqSender(kafkaTemplate);
@@ -781,16 +869,23 @@ public class KafkaMessageChannelBinder extends
 
 				if (properties.isUseNativeDecoding()) {
 					if (record != null) {
-						Map configuration = this.transactionManager == null ? dlqProducerProperties.getConfiguration()
-								: this.configurationProperties.getTransaction().getProducer().getConfiguration();
-						if (record.key() != null && !record.key().getClass().isInstance(byte[].class)) {
-							ensureDlqMessageCanBeProperlySerialized(
-									configuration,
-									(Map config) -> !config.containsKey("key.serializer"), "Key");
-						}
-						if (record.value() != null && !record.value().getClass().isInstance(byte[].class)) {
+						Map configuration = this.transactionManager == null
+								? dlqProducerProperties.getConfiguration()
+								: this.configurationProperties.getTransaction()
+										.getProducer().getConfiguration();
+						if (record.key() != null
+								&& !record.key().getClass().isInstance(byte[].class)) {
 							ensureDlqMessageCanBeProperlySerialized(configuration,
-									(Map config) -> !config.containsKey("value.serializer"), "Payload");
+									(Map config) -> !config
+											.containsKey("key.serializer"),
+									"Key");
+						}
+						if (record.value() != null
+								&& !record.value().getClass().isInstance(byte[].class)) {
+							ensureDlqMessageCanBeProperlySerialized(configuration,
+									(Map config) -> !config
+											.containsKey("value.serializer"),
+									"Payload");
 						}
 					}
 				}
@@ -800,7 +895,8 @@ public class KafkaMessageChannelBinder extends
 					return;
 				}
 				Headers kafkaHeaders = new RecordHeaders(record.headers().toArray());
-				AtomicReference> recordToSend = new AtomicReference<>(record);
+				AtomicReference> recordToSend = new AtomicReference<>(
+						record);
 				if (message.getPayload() instanceof Throwable) {
 
 					Throwable throwable = (Throwable) message.getPayload();
@@ -809,42 +905,55 @@ public class KafkaMessageChannelBinder extends
 
 					if (headerMode == null || HeaderMode.headers.equals(headerMode)) {
 
-						kafkaHeaders.add(
-								new RecordHeader(X_ORIGINAL_TOPIC, record.topic().getBytes(StandardCharsets.UTF_8)));
+						kafkaHeaders.add(new RecordHeader(X_ORIGINAL_TOPIC,
+								record.topic().getBytes(StandardCharsets.UTF_8)));
 						kafkaHeaders.add(new RecordHeader(X_ORIGINAL_PARTITION,
-								ByteBuffer.allocate(Integer.BYTES).putInt(record.partition()).array()));
-						kafkaHeaders.add(new RecordHeader(X_ORIGINAL_OFFSET,
-								ByteBuffer.allocate(Long.BYTES).putLong(record.offset()).array()));
+								ByteBuffer.allocate(Integer.BYTES)
+										.putInt(record.partition()).array()));
+						kafkaHeaders.add(new RecordHeader(X_ORIGINAL_OFFSET, ByteBuffer
+								.allocate(Long.BYTES).putLong(record.offset()).array()));
 						kafkaHeaders.add(new RecordHeader(X_ORIGINAL_TIMESTAMP,
-								ByteBuffer.allocate(Long.BYTES).putLong(record.timestamp()).array()));
+								ByteBuffer.allocate(Long.BYTES)
+										.putLong(record.timestamp()).array()));
 						kafkaHeaders.add(new RecordHeader(X_ORIGINAL_TIMESTAMP_TYPE,
-								record.timestampType().toString().getBytes(StandardCharsets.UTF_8)));
-						kafkaHeaders.add(new RecordHeader(X_EXCEPTION_FQCN,
-								throwable.getClass().getName().getBytes(StandardCharsets.UTF_8)));
+								record.timestampType().toString()
+										.getBytes(StandardCharsets.UTF_8)));
+						kafkaHeaders.add(new RecordHeader(X_EXCEPTION_FQCN, throwable
+								.getClass().getName().getBytes(StandardCharsets.UTF_8)));
 						kafkaHeaders.add(new RecordHeader(X_EXCEPTION_MESSAGE,
 								throwable.getMessage().getBytes(StandardCharsets.UTF_8)));
 						kafkaHeaders.add(new RecordHeader(X_EXCEPTION_STACKTRACE,
-								getStackTraceAsString(throwable).getBytes(StandardCharsets.UTF_8)));
+								getStackTraceAsString(throwable)
+										.getBytes(StandardCharsets.UTF_8)));
 					}
 					else if (HeaderMode.embeddedHeaders.equals(headerMode)) {
 						try {
 							MessageValues messageValues = EmbeddedHeaderUtils
-									.extractHeaders(MessageBuilder.withPayload((byte[]) record.value()).build(), false);
+									.extractHeaders(MessageBuilder
+											.withPayload((byte[]) record.value()).build(),
+											false);
 							messageValues.put(X_ORIGINAL_TOPIC, record.topic());
 							messageValues.put(X_ORIGINAL_PARTITION, record.partition());
 							messageValues.put(X_ORIGINAL_OFFSET, record.offset());
 							messageValues.put(X_ORIGINAL_TIMESTAMP, record.timestamp());
-							messageValues.put(X_ORIGINAL_TIMESTAMP_TYPE, record.timestampType().toString());
-							messageValues.put(X_EXCEPTION_FQCN, throwable.getClass().getName());
-							messageValues.put(X_EXCEPTION_MESSAGE, throwable.getMessage());
-							messageValues.put(X_EXCEPTION_STACKTRACE, getStackTraceAsString(throwable));
+							messageValues.put(X_ORIGINAL_TIMESTAMP_TYPE,
+									record.timestampType().toString());
+							messageValues.put(X_EXCEPTION_FQCN,
+									throwable.getClass().getName());
+							messageValues.put(X_EXCEPTION_MESSAGE,
+									throwable.getMessage());
+							messageValues.put(X_EXCEPTION_STACKTRACE,
+									getStackTraceAsString(throwable));
 
-							final String[] headersToEmbed = new ArrayList<>(messageValues.keySet())
-									.toArray(new String[messageValues.keySet().size()]);
-							byte[] payload = EmbeddedHeaderUtils.embedHeaders(messageValues,
+							final String[] headersToEmbed = new ArrayList<>(
+									messageValues.keySet()).toArray(
+											new String[messageValues.keySet().size()]);
+							byte[] payload = EmbeddedHeaderUtils.embedHeaders(
+									messageValues,
 									EmbeddedHeaderUtils.headersToEmbed(headersToEmbed));
-							recordToSend.set(new ConsumerRecord(record.topic(), record.partition(),
-									record.offset(), record.key(), payload));
+							recordToSend.set(new ConsumerRecord(
+									record.topic(), record.partition(), record.offset(),
+									record.key(), payload));
 						}
 						catch (Exception ex) {
 							throw new RuntimeException(ex);
@@ -852,7 +961,8 @@ public class KafkaMessageChannelBinder extends
 					}
 				}
 				String dlqName = StringUtils.hasText(kafkaConsumerProperties.getDlqName())
-						? kafkaConsumerProperties.getDlqName() : "error." + record.topic() + "." + group;
+						? kafkaConsumerProperties.getDlqName()
+						: "error." + record.topic() + "." + group;
 				dlqSender.sendToDlq(recordToSend.get(), kafkaHeaders, dlqName);
 			};
 		}
@@ -860,17 +970,20 @@ public class KafkaMessageChannelBinder extends
 	}
 
 	@Override
-	protected MessageHandler getPolledConsumerErrorMessageHandler(ConsumerDestination destination, String group,
+	protected MessageHandler getPolledConsumerErrorMessageHandler(
+			ConsumerDestination destination, String group,
 			ExtendedConsumerProperties properties) {
 		if (properties.getExtension().isEnableDlq()) {
 			return getErrorMessageHandler(destination, group, properties);
 		}
-		final MessageHandler superHandler = super.getErrorMessageHandler(destination, group, properties);
+		final MessageHandler superHandler = super.getErrorMessageHandler(destination,
+				group, properties);
 		return (message) -> {
-			ConsumerRecord record = (ConsumerRecord) message.getHeaders().get(KafkaHeaders.RAW_DATA);
+			ConsumerRecord record = (ConsumerRecord) message.getHeaders()
+					.get(KafkaHeaders.RAW_DATA);
 			if (!(message instanceof ErrorMessage)) {
-				logger.error("Expected an ErrorMessage, not a " + message.getClass().toString() + " for: "
-						+ message);
+				logger.error("Expected an ErrorMessage, not a "
+						+ message.getClass().toString() + " for: " + message);
 			}
 			else if (record == null) {
 				if (superHandler != null) {
@@ -879,8 +992,10 @@ public class KafkaMessageChannelBinder extends
 			}
 			else {
 				if (message.getPayload() instanceof MessagingException) {
-					AcknowledgmentCallback ack = StaticMessageHeaderAccessor.getAcknowledgmentCallback(
-							((MessagingException) message.getPayload()).getFailedMessage());
+					AcknowledgmentCallback ack = StaticMessageHeaderAccessor
+							.getAcknowledgmentCallback(
+									((MessagingException) message.getPayload())
+											.getFailedMessage());
 					if (ack != null) {
 						if (isAutoCommitOnError(properties)) {
 							ack.acknowledge(AcknowledgmentCallback.Status.REJECT);
@@ -894,31 +1009,39 @@ public class KafkaMessageChannelBinder extends
 		};
 	}
 
-	private static void ensureDlqMessageCanBeProperlySerialized(Map configuration,
-																Predicate> configPredicate,
-																String dataType) {
-			if (CollectionUtils.isEmpty(configuration) || configPredicate.test(configuration)) {
-				throw new IllegalArgumentException("Native decoding is used on the consumer. " +
-						dataType + " is not byte[] and no serializer is set on the DLQ producer.");
-			}
+	private static void ensureDlqMessageCanBeProperlySerialized(
+			Map configuration,
+			Predicate> configPredicate, String dataType) {
+		if (CollectionUtils.isEmpty(configuration)
+				|| configPredicate.test(configuration)) {
+			throw new IllegalArgumentException("Native decoding is used on the consumer. "
+					+ dataType
+					+ " is not byte[] and no serializer is set on the DLQ producer.");
+		}
 	}
 
-	protected ConsumerFactory createKafkaConsumerFactory(boolean anonymous, String consumerGroup,
+	protected ConsumerFactory createKafkaConsumerFactory(boolean anonymous,
+			String consumerGroup,
 			ExtendedConsumerProperties consumerProperties) {
 		Map props = new HashMap<>();
-		props.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, ByteArrayDeserializer.class);
-		props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, ByteArrayDeserializer.class);
+		props.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG,
+				ByteArrayDeserializer.class);
+		props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG,
+				ByteArrayDeserializer.class);
 		props.put(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, false);
 		props.put(ConsumerConfig.AUTO_COMMIT_INTERVAL_MS_CONFIG, 100);
-		props.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, anonymous ? "latest" : "earliest");
+		props.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG,
+				anonymous ? "latest" : "earliest");
 		props.put(ConsumerConfig.GROUP_ID_CONFIG, consumerGroup);
 
-		Map mergedConfig = this.configurationProperties.mergedConsumerConfiguration();
+		Map mergedConfig = this.configurationProperties
+				.mergedConsumerConfiguration();
 		if (!ObjectUtils.isEmpty(mergedConfig)) {
 			props.putAll(mergedConfig);
 		}
 		if (ObjectUtils.isEmpty(props.get(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG))) {
-			props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, this.configurationProperties.getKafkaConnectionString());
+			props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG,
+					this.configurationProperties.getKafkaConnectionString());
 		}
 		if (!ObjectUtils.isEmpty(consumerProperties.getExtension().getConfiguration())) {
 			props.putAll(consumerProperties.getExtension().getConfiguration());
@@ -931,10 +1054,12 @@ public class KafkaMessageChannelBinder extends
 		return new DefaultKafkaConsumerFactory<>(props);
 	}
 
-	private boolean isAutoCommitOnError(ExtendedConsumerProperties properties) {
+	private boolean isAutoCommitOnError(
+			ExtendedConsumerProperties properties) {
 		return properties.getExtension().getAutoCommitOnError() != null
 				? properties.getExtension().getAutoCommitOnError()
-				: properties.getExtension().isAutoCommitOffset() && properties.getExtension().isEnableDlq();
+				: properties.getExtension().isAutoCommitOffset()
+						&& properties.getExtension().isEnableDlq();
 	}
 
 	private TopicPartitionInitialOffset[] getTopicPartitionInitialOffsets(
@@ -944,8 +1069,8 @@ public class KafkaMessageChannelBinder extends
 		int i = 0;
 		for (PartitionInfo partition : listenedPartitions) {
 
-			topicPartitionInitialOffsets[i++] = new TopicPartitionInitialOffset(partition.topic(),
-					partition.partition());
+			topicPartitionInitialOffsets[i++] = new TopicPartitionInitialOffset(
+					partition.topic(), partition.partition());
 		}
 		return topicPartitionInitialOffsets;
 	}
@@ -964,23 +1089,26 @@ public class KafkaMessageChannelBinder extends
 		return stringWriter.getBuffer().toString();
 	}
 
-	private final class ProducerConfigurationMessageHandler extends KafkaProducerMessageHandler
-			implements Lifecycle {
+	private final class ProducerConfigurationMessageHandler
+			extends KafkaProducerMessageHandler implements Lifecycle {
 
 		private boolean running = true;
 
 		private final ProducerFactory producerFactory;
 
-		ProducerConfigurationMessageHandler(KafkaTemplate kafkaTemplate, String topic,
+		ProducerConfigurationMessageHandler(KafkaTemplate kafkaTemplate,
+				String topic,
 				ExtendedProducerProperties producerProperties,
 				ProducerFactory producerFactory) {
 			super(kafkaTemplate);
 			setTopicExpression(new LiteralExpression(topic));
-			setMessageKeyExpression(producerProperties.getExtension().getMessageKeyExpression());
+			setMessageKeyExpression(
+					producerProperties.getExtension().getMessageKeyExpression());
 			setBeanFactory(KafkaMessageChannelBinder.this.getBeanFactory());
 			if (producerProperties.isPartitioned()) {
 				SpelExpressionParser parser = new SpelExpressionParser();
-				setPartitionIdExpression(parser.parseExpression("headers['" + BinderHeaders.PARTITION_HEADER + "']"));
+				setPartitionIdExpression(parser.parseExpression(
+						"headers['" + BinderHeaders.PARTITION_HEADER + "']"));
 			}
 			if (producerProperties.getExtension().isSync()) {
 				setSync(true);
@@ -1025,7 +1153,8 @@ public class KafkaMessageChannelBinder extends
 
 		private final boolean isTopicPattern;
 
-		TopicInformation(String consumerGroup, Collection partitionInfos, boolean isTopicPattern) {
+		TopicInformation(String consumerGroup, Collection partitionInfos,
+				boolean isTopicPattern) {
 			this.consumerGroup = consumerGroup;
 			this.partitionInfos = partitionInfos;
 			this.isTopicPattern = isTopicPattern;
@@ -1064,15 +1193,16 @@ public class KafkaMessageChannelBinder extends
 		}
 
 		@SuppressWarnings("unchecked")
-		void sendToDlq(ConsumerRecord consumerRecord, Headers headers, String dlqName) {
+		void sendToDlq(ConsumerRecord consumerRecord, Headers headers,
+				String dlqName) {
 			K key = (K) consumerRecord.key();
 			V value = (V) consumerRecord.value();
-			ProducerRecord producerRecord = new ProducerRecord<>(dlqName, consumerRecord.partition(),
-					key, value, headers);
+			ProducerRecord producerRecord = new ProducerRecord<>(dlqName,
+					consumerRecord.partition(), key, value, headers);
 
 			StringBuilder sb = new StringBuilder().append(" a message with key='")
-					.append(toDisplayString(ObjectUtils.nullSafeToString(key), 50)).append("'")
-					.append(" and payload='")
+					.append(toDisplayString(ObjectUtils.nullSafeToString(key), 50))
+					.append("'").append(" and payload='")
 					.append(toDisplayString(ObjectUtils.nullSafeToString(value), 50))
 					.append("'").append(" received from ")
 					.append(consumerRecord.partition());
@@ -1083,26 +1213,28 @@ public class KafkaMessageChannelBinder extends
 
 					@Override
 					public void onFailure(Throwable ex) {
-						KafkaMessageChannelBinder.this.logger.error(
-								"Error sending to DLQ " + sb.toString(), ex);
+						KafkaMessageChannelBinder.this.logger
+								.error("Error sending to DLQ " + sb.toString(), ex);
 					}
 
 					@Override
 					public void onSuccess(SendResult result) {
 						if (KafkaMessageChannelBinder.this.logger.isDebugEnabled()) {
-							KafkaMessageChannelBinder.this.logger.debug(
-									"Sent to DLQ " + sb.toString());
+							KafkaMessageChannelBinder.this.logger
+									.debug("Sent to DLQ " + sb.toString());
 						}
 					}
 				});
 			}
 			catch (Exception ex) {
 				if (sentDlq == null) {
-					KafkaMessageChannelBinder.this.logger.error(
-							"Error sending to DLQ " + sb.toString(), ex);
+					KafkaMessageChannelBinder.this.logger
+							.error("Error sending to DLQ " + sb.toString(), ex);
 				}
 			}
 
 		}
+
 	}
+
 }
diff --git a/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/config/ExtendedBindingHandlerMappingsProviderConfiguration.java b/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/config/ExtendedBindingHandlerMappingsProviderConfiguration.java
index 2e2d02b2b..671284edb 100644
--- a/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/config/ExtendedBindingHandlerMappingsProviderConfiguration.java
+++ b/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/config/ExtendedBindingHandlerMappingsProviderConfiguration.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2018 the original author or authors.
+ * Copyright 2018-2019 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -31,17 +31,21 @@ import org.springframework.context.annotation.Configuration;
  */
 
 @Configuration
-public class ExtendedBindingHandlerMappingsProviderConfiguration  {
+public class ExtendedBindingHandlerMappingsProviderConfiguration {
 
 	@Bean
 	public MappingsProvider kafkaExtendedPropertiesDefaultMappingsProvider() {
 		return () -> {
 			Map mappings = new HashMap<>();
-			mappings.put(ConfigurationPropertyName.of("spring.cloud.stream.kafka.bindings"),
+			mappings.put(
+					ConfigurationPropertyName.of("spring.cloud.stream.kafka.bindings"),
 					ConfigurationPropertyName.of("spring.cloud.stream.kafka.default"));
-			mappings.put(ConfigurationPropertyName.of("spring.cloud.stream.kafka.streams"),
-					ConfigurationPropertyName.of("spring.cloud.stream.kafka.streams.default"));
+			mappings.put(
+					ConfigurationPropertyName.of("spring.cloud.stream.kafka.streams"),
+					ConfigurationPropertyName
+							.of("spring.cloud.stream.kafka.streams.default"));
 			return mappings;
 		};
 	}
+
 }
diff --git a/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/config/KafkaBinderConfiguration.java b/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/config/KafkaBinderConfiguration.java
index 6081ab936..bef6264cc 100644
--- a/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/config/KafkaBinderConfiguration.java
+++ b/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/config/KafkaBinderConfiguration.java
@@ -76,29 +76,32 @@ public class KafkaBinderConfiguration {
 	@Autowired
 	private KafkaProperties kafkaProperties;
 
-
 	@Bean
-	KafkaBinderConfigurationProperties configurationProperties(KafkaProperties kafkaProperties) {
+	KafkaBinderConfigurationProperties configurationProperties(
+			KafkaProperties kafkaProperties) {
 		return new KafkaBinderConfigurationProperties(kafkaProperties);
 	}
 
 	@Bean
-	KafkaTopicProvisioner provisioningProvider(KafkaBinderConfigurationProperties configurationProperties) {
+	KafkaTopicProvisioner provisioningProvider(
+			KafkaBinderConfigurationProperties configurationProperties) {
 		return new KafkaTopicProvisioner(configurationProperties, this.kafkaProperties);
 	}
 
 	@SuppressWarnings("unchecked")
 	@Bean
-	KafkaMessageChannelBinder kafkaMessageChannelBinder(KafkaBinderConfigurationProperties configurationProperties,
+	KafkaMessageChannelBinder kafkaMessageChannelBinder(
+			KafkaBinderConfigurationProperties configurationProperties,
 			KafkaTopicProvisioner provisioningProvider,
 			@Nullable ListenerContainerCustomizer> listenerContainerCustomizer,
 			ObjectProvider rebalanceListener) {
 
 		KafkaMessageChannelBinder kafkaMessageChannelBinder = new KafkaMessageChannelBinder(
-				configurationProperties, provisioningProvider, listenerContainerCustomizer,
-				rebalanceListener.getIfUnique());
+				configurationProperties, provisioningProvider,
+				listenerContainerCustomizer, rebalanceListener.getIfUnique());
 		kafkaMessageChannelBinder.setProducerListener(this.producerListener);
-		kafkaMessageChannelBinder.setExtendedBindingProperties(this.kafkaExtendedBindingProperties);
+		kafkaMessageChannelBinder
+				.setExtendedBindingProperties(this.kafkaExtendedBindingProperties);
 		return kafkaMessageChannelBinder;
 	}
 
@@ -111,13 +114,16 @@ public class KafkaBinderConfiguration {
 
 	@Bean
 	@ConditionalOnMissingBean(KafkaJaasLoginModuleInitializer.class)
-	public KafkaJaasLoginModuleInitializer jaasInitializer(KafkaBinderConfigurationProperties configurationProperties) throws IOException {
+	public KafkaJaasLoginModuleInitializer jaasInitializer(
+			KafkaBinderConfigurationProperties configurationProperties)
+			throws IOException {
 		KafkaJaasLoginModuleInitializer kafkaJaasLoginModuleInitializer = new KafkaJaasLoginModuleInitializer();
 		JaasLoginModuleConfiguration jaas = configurationProperties.getJaas();
 		if (jaas != null) {
 			kafkaJaasLoginModuleInitializer.setLoginModule(jaas.getLoginModule());
 
-			KafkaJaasLoginModuleInitializer.ControlFlag controlFlag = jaas.getControlFlag();
+			KafkaJaasLoginModuleInitializer.ControlFlag controlFlag = jaas
+					.getControlFlag();
 
 			if (controlFlag != null) {
 				kafkaJaasLoginModuleInitializer.setControlFlag(controlFlag);
@@ -129,8 +135,8 @@ public class KafkaBinderConfiguration {
 
 	/**
 	 * A conditional configuration for the {@link KafkaBinderMetrics} bean when the
-	 * {@link MeterRegistry} class is in classpath, as well as a {@link MeterRegistry} bean is
-	 * present in the application context.
+	 * {@link MeterRegistry} class is in classpath, as well as a {@link MeterRegistry}
+	 * bean is present in the application context.
 	 */
 	@Configuration
 	@ConditionalOnClass(MeterRegistry.class)
@@ -139,11 +145,13 @@ public class KafkaBinderConfiguration {
 
 		@Bean
 		@ConditionalOnMissingBean(KafkaBinderMetrics.class)
-		public MeterBinder kafkaBinderMetrics(KafkaMessageChannelBinder kafkaMessageChannelBinder,
+		public MeterBinder kafkaBinderMetrics(
+				KafkaMessageChannelBinder kafkaMessageChannelBinder,
 				KafkaBinderConfigurationProperties configurationProperties,
 				MeterRegistry meterRegistry) {
 
-			return new KafkaBinderMetrics(kafkaMessageChannelBinder, configurationProperties, null, meterRegistry);
+			return new KafkaBinderMetrics(kafkaMessageChannelBinder,
+					configurationProperties, null, meterRegistry);
 		}
 
 	}
@@ -157,6 +165,7 @@ public class KafkaBinderConfiguration {
 		private JaasLoginModuleConfiguration kafka;
 
 		private JaasLoginModuleConfiguration zookeeper;
+
 	}
 
 }
diff --git a/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/config/KafkaBinderHealthIndicatorConfiguration.java b/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/config/KafkaBinderHealthIndicatorConfiguration.java
index d067b5c1c..ca6649315 100644
--- a/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/config/KafkaBinderHealthIndicatorConfiguration.java
+++ b/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/config/KafkaBinderHealthIndicatorConfiguration.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2018 the original author or authors.
+ * Copyright 2018-2019 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -45,22 +45,28 @@ import org.springframework.util.ObjectUtils;
 class KafkaBinderHealthIndicatorConfiguration {
 
 	@Bean
-	KafkaBinderHealthIndicator kafkaBinderHealthIndicator(KafkaMessageChannelBinder kafkaMessageChannelBinder,
-														KafkaBinderConfigurationProperties configurationProperties) {
+	KafkaBinderHealthIndicator kafkaBinderHealthIndicator(
+			KafkaMessageChannelBinder kafkaMessageChannelBinder,
+			KafkaBinderConfigurationProperties configurationProperties) {
 		Map props = new HashMap<>();
-		props.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, ByteArrayDeserializer.class);
-		props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, ByteArrayDeserializer.class);
-		Map mergedConfig = configurationProperties.mergedConsumerConfiguration();
+		props.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG,
+				ByteArrayDeserializer.class);
+		props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG,
+				ByteArrayDeserializer.class);
+		Map mergedConfig = configurationProperties
+				.mergedConsumerConfiguration();
 		if (!ObjectUtils.isEmpty(mergedConfig)) {
 			props.putAll(mergedConfig);
 		}
 		if (!props.containsKey(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG)) {
-			props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, configurationProperties.getKafkaConnectionString());
+			props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG,
+					configurationProperties.getKafkaConnectionString());
 		}
 		ConsumerFactory consumerFactory = new DefaultKafkaConsumerFactory<>(props);
-		KafkaBinderHealthIndicator indicator = new KafkaBinderHealthIndicator(kafkaMessageChannelBinder,
-				consumerFactory);
+		KafkaBinderHealthIndicator indicator = new KafkaBinderHealthIndicator(
+				kafkaMessageChannelBinder, consumerFactory);
 		indicator.setTimeout(configurationProperties.getHealthTimeout());
 		return indicator;
 	}
+
 }
diff --git a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/AbstractKafkaTestBinder.java b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/AbstractKafkaTestBinder.java
index 1f83a73f9..f9d664158 100644
--- a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/AbstractKafkaTestBinder.java
+++ b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/AbstractKafkaTestBinder.java
@@ -28,9 +28,10 @@ import org.springframework.context.ApplicationContext;
  * @author Gary Russell
  */
 public abstract class AbstractKafkaTestBinder extends
-		AbstractPollableConsumerTestBinder, ExtendedProducerProperties> {
+		// @checkstyle:off
+		AbstractPollableConsumerTestBinder, ExtendedProducerProperties> {
 
+	// @checkstyle:on
 	private ApplicationContext applicationContext;
 
 	@Override
diff --git a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/AdminConfigTests.java b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/AdminConfigTests.java
index 024cadaf4..55a8398d4 100644
--- a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/AdminConfigTests.java
+++ b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/AdminConfigTests.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2018 the original author or authors.
+ * Copyright 2018-2019 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -41,7 +41,7 @@ import static org.assertj.core.api.Assertions.assertThat;
  *
  */
 @RunWith(SpringRunner.class)
-@SpringBootTest(classes = {KafkaBinderConfiguration.class,
+@SpringBootTest(classes = { KafkaBinderConfiguration.class,
 		BindingServiceConfiguration.class })
 @TestPropertySource(properties = {
 		"spring.cloud.stream.kafka.bindings.input.consumer.admin.replication-factor=2",
@@ -53,7 +53,7 @@ import static org.assertj.core.api.Assertions.assertThat;
 		"spring.cloud.stream.kafka.bindings.output.producer.topic.replication-factor=2",
 		"spring.cloud.stream.kafka.bindings.output.producer.topic.replicas-assignments.0=0,1",
 		"spring.cloud.stream.kafka.bindings.output.producer.topic.properties.message.format.version=0.9.0.0",
-		"spring.main.allow-bean-definition-overriding=true"})
+		"spring.main.allow-bean-definition-overriding=true" })
 @EnableIntegration
 public class AdminConfigTests {
 
@@ -62,31 +62,41 @@ public class AdminConfigTests {
 
 	@Test
 	public void testDeprecatedAdminConfigurationToMapTopicProperties() {
-		final KafkaConsumerProperties consumerProps = this.binder.getExtendedConsumerProperties("input");
+		final KafkaConsumerProperties consumerProps = this.binder
+				.getExtendedConsumerProperties("input");
 		final KafkaTopicProperties kafkaTopicProperties = consumerProps.getTopic();
 
 		assertThat(kafkaTopicProperties.getReplicationFactor()).isEqualTo((short) 2);
-		assertThat(kafkaTopicProperties.getReplicasAssignments().get(0)).isEqualTo(Arrays.asList(0, 1));
-		assertThat(kafkaTopicProperties.getProperties().get("message.format.version")).isEqualTo("0.9.0.0");
+		assertThat(kafkaTopicProperties.getReplicasAssignments().get(0))
+				.isEqualTo(Arrays.asList(0, 1));
+		assertThat(kafkaTopicProperties.getProperties().get("message.format.version"))
+				.isEqualTo("0.9.0.0");
 	}
 
 	@Test
 	public void testConsumerTopicProperties() {
-		final KafkaConsumerProperties consumerProperties = this.binder.getExtendedConsumerProperties("secondInput");
+		final KafkaConsumerProperties consumerProperties = this.binder
+				.getExtendedConsumerProperties("secondInput");
 		final KafkaTopicProperties kafkaTopicProperties = consumerProperties.getTopic();
 
 		assertThat(kafkaTopicProperties.getReplicationFactor()).isEqualTo((short) 3);
-		assertThat(kafkaTopicProperties.getReplicasAssignments().get(0)).isEqualTo(Arrays.asList(0, 1));
-		assertThat(kafkaTopicProperties.getProperties().get("message.format.version")).isEqualTo("0.9.1.0");
+		assertThat(kafkaTopicProperties.getReplicasAssignments().get(0))
+				.isEqualTo(Arrays.asList(0, 1));
+		assertThat(kafkaTopicProperties.getProperties().get("message.format.version"))
+				.isEqualTo("0.9.1.0");
 	}
 
 	@Test
 	public void testProducerTopicProperties() {
-		final KafkaProducerProperties producerProperties = this.binder.getExtendedProducerProperties("output");
+		final KafkaProducerProperties producerProperties = this.binder
+				.getExtendedProducerProperties("output");
 		final KafkaTopicProperties kafkaTopicProperties = producerProperties.getTopic();
 
 		assertThat(kafkaTopicProperties.getReplicationFactor()).isEqualTo((short) 2);
-		assertThat(kafkaTopicProperties.getReplicasAssignments().get(0)).isEqualTo(Arrays.asList(0, 1));
-		assertThat(kafkaTopicProperties.getProperties().get("message.format.version")).isEqualTo("0.9.0.0");
+		assertThat(kafkaTopicProperties.getReplicasAssignments().get(0))
+				.isEqualTo(Arrays.asList(0, 1));
+		assertThat(kafkaTopicProperties.getProperties().get("message.format.version"))
+				.isEqualTo("0.9.0.0");
 	}
+
 }
diff --git a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/AutoCreateTopicDisabledTests.java b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/AutoCreateTopicDisabledTests.java
index 8537c557e..8733c5499 100644
--- a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/AutoCreateTopicDisabledTests.java
+++ b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/AutoCreateTopicDisabledTests.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2018 the original author or authors.
+ * Copyright 2018-2019 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -53,61 +53,69 @@ public class AutoCreateTopicDisabledTests {
 			.brokerProperty(KafkaConfig.AutoCreateTopicsEnableProp(), "false");
 
 	@Test
-	public void testAutoCreateTopicDisabledFailsOnConsumerIfTopicNonExistentOnBroker() throws Throwable {
+	public void testAutoCreateTopicDisabledFailsOnConsumerIfTopicNonExistentOnBroker()
+			throws Throwable {
 
 		KafkaProperties kafkaProperties = new TestKafkaProperties();
-		kafkaProperties.setBootstrapServers(Collections.singletonList(embeddedKafka.getEmbeddedKafka().getBrokersAsString()));
-		KafkaBinderConfigurationProperties configurationProperties =
-				new KafkaBinderConfigurationProperties(kafkaProperties);
-		//disable auto create topic on the binder.
+		kafkaProperties.setBootstrapServers(Collections
+				.singletonList(embeddedKafka.getEmbeddedKafka().getBrokersAsString()));
+		KafkaBinderConfigurationProperties configurationProperties = new KafkaBinderConfigurationProperties(
+				kafkaProperties);
+		// disable auto create topic on the binder.
 		configurationProperties.setAutoCreateTopics(false);
 
-		KafkaTopicProvisioner provisioningProvider = new KafkaTopicProvisioner(configurationProperties, kafkaProperties);
+		KafkaTopicProvisioner provisioningProvider = new KafkaTopicProvisioner(
+				configurationProperties, kafkaProperties);
 		provisioningProvider.setMetadataRetryOperations(new RetryTemplate());
 
-		KafkaMessageChannelBinder binder = new KafkaMessageChannelBinder(configurationProperties, provisioningProvider);
+		KafkaMessageChannelBinder binder = new KafkaMessageChannelBinder(
+				configurationProperties, provisioningProvider);
 
 		final String testTopicName = "nonExistent" + System.currentTimeMillis();
 
-		ExtendedConsumerProperties properties = new ExtendedConsumerProperties<>(new KafkaConsumerProperties());
+		ExtendedConsumerProperties properties = new ExtendedConsumerProperties<>(
+				new KafkaConsumerProperties());
 
 		expectedException.expect(BinderException.class);
-		expectedException
-				.expectCause(isA(UnknownTopicOrPartitionException.class));
+		expectedException.expectCause(isA(UnknownTopicOrPartitionException.class));
 		binder.createConsumerEndpoint(() -> testTopicName, "group", properties);
 	}
 
-
 	@Test
-	public void testAutoCreateTopicDisabledFailsOnProducerIfTopicNonExistentOnBroker() throws Throwable {
+	public void testAutoCreateTopicDisabledFailsOnProducerIfTopicNonExistentOnBroker()
+			throws Throwable {
 
 		KafkaProperties kafkaProperties = new TestKafkaProperties();
-		kafkaProperties.setBootstrapServers(Collections.singletonList(embeddedKafka.getEmbeddedKafka().getBrokersAsString()));
+		kafkaProperties.setBootstrapServers(Collections
+				.singletonList(embeddedKafka.getEmbeddedKafka().getBrokersAsString()));
 
-		KafkaBinderConfigurationProperties configurationProperties =
-				new KafkaBinderConfigurationProperties(kafkaProperties);
-		//disable auto create topic on the binder.
+		KafkaBinderConfigurationProperties configurationProperties = new KafkaBinderConfigurationProperties(
+				kafkaProperties);
+		// disable auto create topic on the binder.
 		configurationProperties.setAutoCreateTopics(false);
-		//reduce the wait time on the producer blocking operations.
+		// reduce the wait time on the producer blocking operations.
 		configurationProperties.getConfiguration().put("max.block.ms", "3000");
 
-		KafkaTopicProvisioner provisioningProvider = new KafkaTopicProvisioner(configurationProperties, kafkaProperties);
+		KafkaTopicProvisioner provisioningProvider = new KafkaTopicProvisioner(
+				configurationProperties, kafkaProperties);
 		SimpleRetryPolicy simpleRetryPolicy = new SimpleRetryPolicy(1);
 		final RetryTemplate metadataRetryOperations = new RetryTemplate();
 		metadataRetryOperations.setRetryPolicy(simpleRetryPolicy);
 		provisioningProvider.setMetadataRetryOperations(metadataRetryOperations);
 
-		KafkaMessageChannelBinder binder = new KafkaMessageChannelBinder(configurationProperties, provisioningProvider);
+		KafkaMessageChannelBinder binder = new KafkaMessageChannelBinder(
+				configurationProperties, provisioningProvider);
 
 		final String testTopicName = "nonExistent" + System.currentTimeMillis();
 
-		ExtendedProducerProperties properties = new ExtendedProducerProperties<>(new KafkaProducerProperties());
+		ExtendedProducerProperties properties = new ExtendedProducerProperties<>(
+				new KafkaProducerProperties());
 
 		expectedException.expect(BinderException.class);
-		expectedException
-				.expectCause(isA(UnknownTopicOrPartitionException.class));
+		expectedException.expectCause(isA(UnknownTopicOrPartitionException.class));
 
 		binder.bindProducer(testTopicName, new DirectChannel(), properties);
 
 	}
+
 }
diff --git a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderAutoConfigurationPropertiesTest.java b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderAutoConfigurationPropertiesTest.java
index 2043865ad..a7c375c28 100644
--- a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderAutoConfigurationPropertiesTest.java
+++ b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderAutoConfigurationPropertiesTest.java
@@ -41,16 +41,13 @@ import org.springframework.test.context.TestPropertySource;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 import org.springframework.util.ReflectionUtils;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import static org.assertj.core.api.Assertions.assertThat;
 
 /**
  * @author Ilayaperumal Gopinathan
  */
 @RunWith(SpringJUnit4ClassRunner.class)
-@SpringBootTest(classes = {KafkaBinderConfiguration.class })
+@SpringBootTest(classes = { KafkaBinderConfiguration.class })
 @TestPropertySource(locations = "classpath:binder-config-autoconfig.properties")
 public class KafkaBinderAutoConfigurationPropertiesTest {
 
@@ -63,66 +60,78 @@ public class KafkaBinderAutoConfigurationPropertiesTest {
 	@Test
 	@SuppressWarnings("unchecked")
 	public void testKafkaBinderConfigurationWithKafkaProperties() throws Exception {
-		assertNotNull(this.kafkaMessageChannelBinder);
+		assertThat(this.kafkaMessageChannelBinder).isNotNull();
 		ExtendedProducerProperties producerProperties = new ExtendedProducerProperties<>(
 				new KafkaProducerProperties());
-		Method getProducerFactoryMethod = KafkaMessageChannelBinder.class.getDeclaredMethod("getProducerFactory",
-				String.class, ExtendedProducerProperties.class);
+		Method getProducerFactoryMethod = KafkaMessageChannelBinder.class
+				.getDeclaredMethod("getProducerFactory", String.class,
+						ExtendedProducerProperties.class);
 		getProducerFactoryMethod.setAccessible(true);
 		DefaultKafkaProducerFactory producerFactory = (DefaultKafkaProducerFactory) getProducerFactoryMethod
 				.invoke(this.kafkaMessageChannelBinder, "foo", producerProperties);
-		Field producerFactoryConfigField = ReflectionUtils.findField(DefaultKafkaProducerFactory.class, "configs",
-				Map.class);
+		Field producerFactoryConfigField = ReflectionUtils
+				.findField(DefaultKafkaProducerFactory.class, "configs", Map.class);
 		ReflectionUtils.makeAccessible(producerFactoryConfigField);
-		Map producerConfigs = (Map) ReflectionUtils.getField(producerFactoryConfigField,
-				producerFactory);
-		assertTrue(producerConfigs.get("batch.size").equals(10));
-		assertEquals(producerConfigs.get("key.serializer"), LongSerializer.class);
-		assertNull(producerConfigs.get("key.deserializer"));
-		assertEquals(producerConfigs.get("value.serializer"), LongSerializer.class);
-		assertNull(producerConfigs.get("value.deserializer"));
-		assertEquals("snappy", producerConfigs.get("compression.type"));
+		Map producerConfigs = (Map) ReflectionUtils
+				.getField(producerFactoryConfigField, producerFactory);
+		assertThat(producerConfigs.get("batch.size").equals(10)).isTrue();
+		assertThat(producerConfigs.get("key.serializer")).isEqualTo(LongSerializer.class);
+		assertThat(producerConfigs.get("key.deserializer")).isNull();
+		assertThat(producerConfigs.get("value.serializer"))
+				.isEqualTo(LongSerializer.class);
+		assertThat(producerConfigs.get("value.deserializer")).isNull();
+		assertThat(producerConfigs.get("compression.type")).isEqualTo("snappy");
 		List bootstrapServers = new ArrayList<>();
 		bootstrapServers.add("10.98.09.199:9092");
 		bootstrapServers.add("10.98.09.196:9092");
-		assertTrue((((List) producerConfigs.get("bootstrap.servers")).containsAll(bootstrapServers)));
-		Method createKafkaConsumerFactoryMethod = KafkaMessageChannelBinder.class.getDeclaredMethod(
-				"createKafkaConsumerFactory", boolean.class, String.class, ExtendedConsumerProperties.class);
+		assertThat((((List) producerConfigs.get("bootstrap.servers"))
+				.containsAll(bootstrapServers))).isTrue();
+		Method createKafkaConsumerFactoryMethod = KafkaMessageChannelBinder.class
+				.getDeclaredMethod("createKafkaConsumerFactory", boolean.class,
+						String.class, ExtendedConsumerProperties.class);
 		createKafkaConsumerFactoryMethod.setAccessible(true);
 		ExtendedConsumerProperties consumerProperties = new ExtendedConsumerProperties<>(
 				new KafkaConsumerProperties());
 		DefaultKafkaConsumerFactory consumerFactory = (DefaultKafkaConsumerFactory) createKafkaConsumerFactoryMethod
 				.invoke(this.kafkaMessageChannelBinder, true, "test", consumerProperties);
-		Field consumerFactoryConfigField = ReflectionUtils.findField(DefaultKafkaConsumerFactory.class, "configs",
-				Map.class);
+		Field consumerFactoryConfigField = ReflectionUtils
+				.findField(DefaultKafkaConsumerFactory.class, "configs", Map.class);
 		ReflectionUtils.makeAccessible(consumerFactoryConfigField);
-		Map consumerConfigs = (Map) ReflectionUtils.getField(consumerFactoryConfigField,
-				consumerFactory);
-		assertEquals(consumerConfigs.get("key.deserializer"), LongDeserializer.class);
-		assertNull(consumerConfigs.get("key.serializer"));
-		assertEquals(consumerConfigs.get("value.deserializer"), LongDeserializer.class);
-		assertNull(consumerConfigs.get("value.serialized"));
-		assertEquals("groupIdFromBootConfig", consumerConfigs.get("group.id"));
-		assertEquals("earliest", consumerConfigs.get("auto.offset.reset"));
-		assertTrue((((List) consumerConfigs.get("bootstrap.servers")).containsAll(bootstrapServers)));
+		Map consumerConfigs = (Map) ReflectionUtils
+				.getField(consumerFactoryConfigField, consumerFactory);
+		assertThat(consumerConfigs.get("key.deserializer"))
+				.isEqualTo(LongDeserializer.class);
+		assertThat(consumerConfigs.get("key.serializer")).isNull();
+		assertThat(consumerConfigs.get("value.deserializer"))
+				.isEqualTo(LongDeserializer.class);
+		assertThat(consumerConfigs.get("value.serialized")).isNull();
+		assertThat(consumerConfigs.get("group.id")).isEqualTo("groupIdFromBootConfig");
+		assertThat(consumerConfigs.get("auto.offset.reset")).isEqualTo("earliest");
+		assertThat((((List) consumerConfigs.get("bootstrap.servers"))
+				.containsAll(bootstrapServers))).isTrue();
 	}
 
 	@Test
 	@SuppressWarnings("unchecked")
 	public void testKafkaHealthIndicatorProperties() {
-		assertNotNull(this.kafkaBinderHealthIndicator);
-		Field consumerFactoryField = ReflectionUtils.findField(KafkaBinderHealthIndicator.class, "consumerFactory",
+		assertThat(this.kafkaBinderHealthIndicator).isNotNull();
+		Field consumerFactoryField = ReflectionUtils.findField(
+				KafkaBinderHealthIndicator.class, "consumerFactory",
 				ConsumerFactory.class);
 		ReflectionUtils.makeAccessible(consumerFactoryField);
-		DefaultKafkaConsumerFactory consumerFactory = (DefaultKafkaConsumerFactory) ReflectionUtils.getField(
-				consumerFactoryField, this.kafkaBinderHealthIndicator);
-		Field configField = ReflectionUtils.findField(DefaultKafkaConsumerFactory.class, "configs", Map.class);
+		DefaultKafkaConsumerFactory consumerFactory = (DefaultKafkaConsumerFactory) ReflectionUtils
+				.getField(consumerFactoryField, this.kafkaBinderHealthIndicator);
+		Field configField = ReflectionUtils.findField(DefaultKafkaConsumerFactory.class,
+				"configs", Map.class);
 		ReflectionUtils.makeAccessible(configField);
-		Map configs = (Map) ReflectionUtils.getField(configField, consumerFactory);
-		assertTrue(configs.containsKey("bootstrap.servers"));
+		Map configs = (Map) ReflectionUtils
+				.getField(configField, consumerFactory);
+		assertThat(configs.containsKey("bootstrap.servers")).isTrue();
 		List bootstrapServers = new ArrayList<>();
 		bootstrapServers.add("10.98.09.199:9092");
 		bootstrapServers.add("10.98.09.196:9092");
-		assertTrue(((List) configs.get("bootstrap.servers")).containsAll(bootstrapServers));
+		assertThat(((List) configs.get("bootstrap.servers"))
+				.containsAll(bootstrapServers)).isTrue();
 	}
+
 }
diff --git a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderConfigurationPropertiesTest.java b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderConfigurationPropertiesTest.java
index 080c8da21..4212721a2 100644
--- a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderConfigurationPropertiesTest.java
+++ b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderConfigurationPropertiesTest.java
@@ -41,9 +41,7 @@ import org.springframework.test.context.TestPropertySource;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 import org.springframework.util.ReflectionUtils;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.assertj.core.api.Assertions.assertThat;
 
 /**
  * @author Ilayaperumal Gopinathan
@@ -60,46 +58,55 @@ public class KafkaBinderConfigurationPropertiesTest {
 	@Test
 	@SuppressWarnings("unchecked")
 	public void testKafkaBinderConfigurationProperties() throws Exception {
-		assertNotNull(this.kafkaMessageChannelBinder);
+		assertThat(this.kafkaMessageChannelBinder).isNotNull();
 		KafkaProducerProperties kafkaProducerProperties = new KafkaProducerProperties();
 		kafkaProducerProperties.setBufferSize(12345);
 		kafkaProducerProperties.setBatchTimeout(100);
-		kafkaProducerProperties.setCompressionType(KafkaProducerProperties.CompressionType.gzip);
+		kafkaProducerProperties
+				.setCompressionType(KafkaProducerProperties.CompressionType.gzip);
 		ExtendedProducerProperties producerProperties = new ExtendedProducerProperties<>(
 				kafkaProducerProperties);
-		Method getProducerFactoryMethod = KafkaMessageChannelBinder.class.getDeclaredMethod("getProducerFactory",
-				String.class, ExtendedProducerProperties.class);
+		Method getProducerFactoryMethod = KafkaMessageChannelBinder.class
+				.getDeclaredMethod("getProducerFactory", String.class,
+						ExtendedProducerProperties.class);
 		getProducerFactoryMethod.setAccessible(true);
 		DefaultKafkaProducerFactory producerFactory = (DefaultKafkaProducerFactory) getProducerFactoryMethod
 				.invoke(this.kafkaMessageChannelBinder, "bar", producerProperties);
-		Field producerFactoryConfigField = ReflectionUtils.findField(DefaultKafkaProducerFactory.class, "configs",
-				Map.class);
+		Field producerFactoryConfigField = ReflectionUtils
+				.findField(DefaultKafkaProducerFactory.class, "configs", Map.class);
 		ReflectionUtils.makeAccessible(producerFactoryConfigField);
-		Map producerConfigs = (Map) ReflectionUtils.getField(producerFactoryConfigField,
-				producerFactory);
-		assertEquals("12345", producerConfigs.get("batch.size"));;
-		assertEquals("100", producerConfigs.get("linger.ms"));
-		assertEquals(producerConfigs.get("key.serializer"), ByteArraySerializer.class);
-		assertEquals(producerConfigs.get("value.serializer"), ByteArraySerializer.class);
-		assertEquals("gzip", producerConfigs.get("compression.type"));
+		Map producerConfigs = (Map) ReflectionUtils
+				.getField(producerFactoryConfigField, producerFactory);
+		assertThat(producerConfigs.get("batch.size")).isEqualTo("12345");
+		assertThat(producerConfigs.get("linger.ms")).isEqualTo("100");
+		assertThat(producerConfigs.get("key.serializer"))
+				.isEqualTo(ByteArraySerializer.class);
+		assertThat(producerConfigs.get("value.serializer"))
+				.isEqualTo(ByteArraySerializer.class);
+		assertThat(producerConfigs.get("compression.type")).isEqualTo("gzip");
 		List bootstrapServers = new ArrayList<>();
 		bootstrapServers.add("10.98.09.199:9082");
-		assertTrue((((String) producerConfigs.get("bootstrap.servers")).contains("10.98.09.199:9082")));
-		Method createKafkaConsumerFactoryMethod = KafkaMessageChannelBinder.class.getDeclaredMethod(
-				"createKafkaConsumerFactory", boolean.class, String.class, ExtendedConsumerProperties.class);
+		assertThat((((String) producerConfigs.get("bootstrap.servers"))
+				.contains("10.98.09.199:9082"))).isTrue();
+		Method createKafkaConsumerFactoryMethod = KafkaMessageChannelBinder.class
+				.getDeclaredMethod("createKafkaConsumerFactory", boolean.class,
+						String.class, ExtendedConsumerProperties.class);
 		createKafkaConsumerFactoryMethod.setAccessible(true);
 		ExtendedConsumerProperties consumerProperties = new ExtendedConsumerProperties<>(
 				new KafkaConsumerProperties());
 		DefaultKafkaConsumerFactory consumerFactory = (DefaultKafkaConsumerFactory) createKafkaConsumerFactoryMethod
 				.invoke(this.kafkaMessageChannelBinder, true, "test", consumerProperties);
-		Field consumerFactoryConfigField = ReflectionUtils.findField(DefaultKafkaConsumerFactory.class, "configs",
-				Map.class);
+		Field consumerFactoryConfigField = ReflectionUtils
+				.findField(DefaultKafkaConsumerFactory.class, "configs", Map.class);
 		ReflectionUtils.makeAccessible(consumerFactoryConfigField);
-		Map consumerConfigs = (Map) ReflectionUtils.getField(consumerFactoryConfigField,
-				consumerFactory);
-		assertEquals(consumerConfigs.get("key.deserializer"), ByteArrayDeserializer.class);
-		assertEquals(consumerConfigs.get("value.deserializer"), ByteArrayDeserializer.class);
-		assertTrue((((String) consumerConfigs.get("bootstrap.servers")).contains("10.98.09.199:9082")));
+		Map consumerConfigs = (Map) ReflectionUtils
+				.getField(consumerFactoryConfigField, consumerFactory);
+		assertThat(consumerConfigs.get("key.deserializer"))
+				.isEqualTo(ByteArrayDeserializer.class);
+		assertThat(consumerConfigs.get("value.deserializer"))
+				.isEqualTo(ByteArrayDeserializer.class);
+		assertThat((((String) consumerConfigs.get("bootstrap.servers"))
+				.contains("10.98.09.199:9082"))).isTrue();
 	}
 
 }
diff --git a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderConfigurationTest.java b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderConfigurationTest.java
index 9a0f633ff..f52bc069f 100644
--- a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderConfigurationTest.java
+++ b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderConfigurationTest.java
@@ -29,14 +29,13 @@ import org.springframework.kafka.support.ProducerListener;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 import org.springframework.util.ReflectionUtils;
 
-import static org.junit.Assert.assertNotNull;
+import static org.assertj.core.api.Assertions.assertThat;
 
 /**
  * @author Ilayaperumal Gopinathan
  */
 @RunWith(SpringJUnit4ClassRunner.class)
-@SpringBootTest(classes = { KafkaBinderConfiguration.class,
-		KafkaAutoConfiguration.class,
+@SpringBootTest(classes = { KafkaBinderConfiguration.class, KafkaAutoConfiguration.class,
 		KafkaBinderConfigurationTest.class })
 public class KafkaBinderConfigurationTest {
 
@@ -45,14 +44,14 @@ public class KafkaBinderConfigurationTest {
 
 	@Test
 	public void testKafkaBinderProducerListener() {
-		assertNotNull(this.kafkaMessageChannelBinder);
+		assertThat(this.kafkaMessageChannelBinder).isNotNull();
 		Field producerListenerField = ReflectionUtils.findField(
 				KafkaMessageChannelBinder.class, "producerListener",
 				ProducerListener.class);
 		ReflectionUtils.makeAccessible(producerListenerField);
-		ProducerListener producerListener = (ProducerListener) ReflectionUtils.getField(
-				producerListenerField, this.kafkaMessageChannelBinder);
-		assertNotNull(producerListener);
+		ProducerListener producerListener = (ProducerListener) ReflectionUtils
+				.getField(producerListenerField, this.kafkaMessageChannelBinder);
+		assertThat(producerListener).isNotNull();
 	}
 
 }
diff --git a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderHealthIndicatorTest.java b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderHealthIndicatorTest.java
index 6fa837c12..70c4b1923 100644
--- a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderHealthIndicatorTest.java
+++ b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderHealthIndicatorTest.java
@@ -65,7 +65,8 @@ public class KafkaBinderHealthIndicatorTest {
 	@Before
 	public void setup() {
 		MockitoAnnotations.initMocks(this);
-		org.mockito.BDDMockito.given(consumerFactory.createConsumer()).willReturn(consumer);
+		org.mockito.BDDMockito.given(consumerFactory.createConsumer())
+				.willReturn(consumer);
 		org.mockito.BDDMockito.given(binder.getTopicsInUse()).willReturn(topicsInUse);
 		this.indicator = new KafkaBinderHealthIndicator(binder, consumerFactory);
 		this.indicator.setTimeout(10);
@@ -74,27 +75,33 @@ public class KafkaBinderHealthIndicatorTest {
 	@Test
 	public void kafkaBinderIsUp() {
 		final List partitions = partitions(new Node(0, null, 0));
-		topicsInUse.put(TEST_TOPIC, new KafkaMessageChannelBinder.TopicInformation("group1-healthIndicator", partitions, false));
-		org.mockito.BDDMockito.given(consumer.partitionsFor(TEST_TOPIC)).willReturn(partitions);
+		topicsInUse.put(TEST_TOPIC, new KafkaMessageChannelBinder.TopicInformation(
+				"group1-healthIndicator", partitions, false));
+		org.mockito.BDDMockito.given(consumer.partitionsFor(TEST_TOPIC))
+				.willReturn(partitions);
 		Health health = indicator.health();
 		assertThat(health.getStatus()).isEqualTo(Status.UP);
 	}
 
 	@Test
 	public void kafkaBinderIsUpWithRegexTopic() {
-		topicsInUse.put(REGEX_TOPIC, new KafkaMessageChannelBinder.TopicInformation("regex-healthIndicator", null, true));
+		topicsInUse.put(REGEX_TOPIC, new KafkaMessageChannelBinder.TopicInformation(
+				"regex-healthIndicator", null, true));
 		Health health = indicator.health();
-		//verify no consumer interaction for retrieving partitions
-		org.mockito.BDDMockito.verify(consumer, Mockito.never()).partitionsFor(REGEX_TOPIC);
-		//Ensuring the normal health check returns with status "up"
+		// verify no consumer interaction for retrieving partitions
+		org.mockito.BDDMockito.verify(consumer, Mockito.never())
+				.partitionsFor(REGEX_TOPIC);
+		// Ensuring the normal health check returns with status "up"
 		assertThat(health.getStatus()).isEqualTo(Status.UP);
 	}
 
 	@Test
 	public void kafkaBinderIsDown() {
 		final List partitions = partitions(new Node(-1, null, 0));
-		topicsInUse.put(TEST_TOPIC, new KafkaMessageChannelBinder.TopicInformation("group2-healthIndicator", partitions, false));
-		org.mockito.BDDMockito.given(consumer.partitionsFor(TEST_TOPIC)).willReturn(partitions);
+		topicsInUse.put(TEST_TOPIC, new KafkaMessageChannelBinder.TopicInformation(
+				"group2-healthIndicator", partitions, false));
+		org.mockito.BDDMockito.given(consumer.partitionsFor(TEST_TOPIC))
+				.willReturn(partitions);
 		Health health = indicator.health();
 		assertThat(health.getStatus()).isEqualTo(Status.DOWN);
 	}
@@ -102,12 +109,14 @@ public class KafkaBinderHealthIndicatorTest {
 	@Test(timeout = 5000)
 	public void kafkaBinderDoesNotAnswer() {
 		final List partitions = partitions(new Node(-1, null, 0));
-		topicsInUse.put(TEST_TOPIC, new KafkaMessageChannelBinder.TopicInformation("group3-healthIndicator", partitions, false));
-		org.mockito.BDDMockito.given(consumer.partitionsFor(TEST_TOPIC)).willAnswer(invocation -> {
-			final int fiveMinutes = 1000 * 60 * 5;
-			Thread.sleep(fiveMinutes);
-			return partitions;
-		});
+		topicsInUse.put(TEST_TOPIC, new KafkaMessageChannelBinder.TopicInformation(
+				"group3-healthIndicator", partitions, false));
+		org.mockito.BDDMockito.given(consumer.partitionsFor(TEST_TOPIC))
+				.willAnswer(invocation -> {
+					final int fiveMinutes = 1000 * 60 * 5;
+					Thread.sleep(fiveMinutes);
+					return partitions;
+				});
 		this.indicator.setTimeout(1);
 		Health health = indicator.health();
 		assertThat(health.getStatus()).isEqualTo(Status.DOWN);
@@ -116,8 +125,10 @@ public class KafkaBinderHealthIndicatorTest {
 	@Test
 	public void createsConsumerOnceWhenInvokedMultipleTimes() {
 		final List partitions = partitions(new Node(0, null, 0));
-		topicsInUse.put(TEST_TOPIC, new KafkaMessageChannelBinder.TopicInformation("group4-healthIndicator", partitions, false));
-		org.mockito.BDDMockito.given(consumer.partitionsFor(TEST_TOPIC)).willReturn(partitions);
+		topicsInUse.put(TEST_TOPIC, new KafkaMessageChannelBinder.TopicInformation(
+				"group4-healthIndicator", partitions, false));
+		org.mockito.BDDMockito.given(consumer.partitionsFor(TEST_TOPIC))
+				.willReturn(partitions);
 
 		indicator.health();
 		Health health = indicator.health();
@@ -129,10 +140,11 @@ public class KafkaBinderHealthIndicatorTest {
 	@Test
 	public void consumerCreationFailsFirstTime() {
 		final List partitions = partitions(new Node(0, null, 0));
-		topicsInUse.put(TEST_TOPIC, new KafkaMessageChannelBinder.TopicInformation("foo-healthIndicator", partitions, false));
+		topicsInUse.put(TEST_TOPIC, new KafkaMessageChannelBinder.TopicInformation(
+				"foo-healthIndicator", partitions, false));
 
-		org.mockito.BDDMockito.given(consumerFactory.createConsumer()).willThrow(KafkaException.class)
-				.willReturn(consumer);
+		org.mockito.BDDMockito.given(consumerFactory.createConsumer())
+				.willThrow(KafkaException.class).willReturn(consumer);
 
 		Health health = indicator.health();
 		assertThat(health.getStatus()).isEqualTo(Status.DOWN);
@@ -140,7 +152,8 @@ public class KafkaBinderHealthIndicatorTest {
 		health = indicator.health();
 		assertThat(health.getStatus()).isEqualTo(Status.UP);
 
-		org.mockito.Mockito.verify(this.consumerFactory, Mockito.times(2)).createConsumer();
+		org.mockito.Mockito.verify(this.consumerFactory, Mockito.times(2))
+				.createConsumer();
 	}
 
 	@Test
@@ -154,4 +167,5 @@ public class KafkaBinderHealthIndicatorTest {
 		partitions.add(new PartitionInfo(TEST_TOPIC, 0, leader, null, null));
 		return partitions;
 	}
+
 }
diff --git a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderJaasInitializerListenerTest.java b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderJaasInitializerListenerTest.java
index 19e39a456..b331ef7af 100644
--- a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderJaasInitializerListenerTest.java
+++ b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderJaasInitializerListenerTest.java
@@ -48,7 +48,8 @@ public class KafkaBinderJaasInitializerListenerTest {
 
 	@BeforeClass
 	public static void setup() {
-		System.setProperty(KAFKA_BROKERS_PROPERTY, kafkaEmbedded.getEmbeddedKafka().getBrokersAsString());
+		System.setProperty(KAFKA_BROKERS_PROPERTY,
+				kafkaEmbedded.getEmbeddedKafka().getBrokersAsString());
 	}
 
 	@AfterClass
@@ -58,68 +59,83 @@ public class KafkaBinderJaasInitializerListenerTest {
 
 	@Test
 	@Ignore("CI randomly fails this test, need to investigate further. ")
-	public void testConfigurationParsedCorrectlyWithKafkaClientAndDefaultControlFlag() throws Exception {
-		ConfigFile configFile = new ConfigFile(new ClassPathResource("jaas-sample-kafka-only.conf").getURI());
-		final AppConfigurationEntry[] kafkaConfigurationArray = configFile.getAppConfigurationEntry("KafkaClient");
+	public void testConfigurationParsedCorrectlyWithKafkaClientAndDefaultControlFlag()
+			throws Exception {
+		ConfigFile configFile = new ConfigFile(
+				new ClassPathResource("jaas-sample-kafka-only.conf").getURI());
+		final AppConfigurationEntry[] kafkaConfigurationArray = configFile
+				.getAppConfigurationEntry("KafkaClient");
 
-		final ConfigurableApplicationContext context =
-				SpringApplication.run(SimpleApplication.class,
-						"--spring.cloud.stream.kafka.binder.jaas.options.useKeyTab=true",
-						"--spring.cloud.stream.kafka.binder.jaas.options.storeKey=true",
-						"--spring.cloud.stream.kafka.binder.jaas.options.keyTab=/etc/security/keytabs/kafka_client.keytab",
-						"--spring.cloud.stream.kafka.binder.jaas.options.principal=kafka-client-1@EXAMPLE.COM",
-						"--spring.jmx.enabled=false");
-		javax.security.auth.login.Configuration configuration = javax.security.auth.login.Configuration.getConfiguration();
+		final ConfigurableApplicationContext context = SpringApplication.run(
+				SimpleApplication.class,
+				"--spring.cloud.stream.kafka.binder.jaas.options.useKeyTab=true",
+				"--spring.cloud.stream.kafka.binder.jaas.options.storeKey=true",
+				"--spring.cloud.stream.kafka.binder.jaas.options.keyTab=/etc/security/keytabs/kafka_client.keytab",
+				"--spring.cloud.stream.kafka.binder.jaas.options.principal=kafka-client-1@EXAMPLE.COM",
+				"--spring.jmx.enabled=false");
+		javax.security.auth.login.Configuration configuration = javax.security.auth.login.Configuration
+				.getConfiguration();
 
-		final AppConfigurationEntry[] kafkaConfiguration = configuration.getAppConfigurationEntry("KafkaClient");
+		final AppConfigurationEntry[] kafkaConfiguration = configuration
+				.getAppConfigurationEntry("KafkaClient");
 		assertThat(kafkaConfiguration).hasSize(1);
-		assertThat(kafkaConfiguration[0].getOptions()).isEqualTo(kafkaConfigurationArray[0].getOptions());
-		assertThat(kafkaConfiguration[0].getControlFlag()).isEqualTo(AppConfigurationEntry.LoginModuleControlFlag.REQUIRED);
+		assertThat(kafkaConfiguration[0].getOptions())
+				.isEqualTo(kafkaConfigurationArray[0].getOptions());
+		assertThat(kafkaConfiguration[0].getControlFlag())
+				.isEqualTo(AppConfigurationEntry.LoginModuleControlFlag.REQUIRED);
 		context.close();
 	}
 
 	@Test
 	@Ignore("CI randomly fails this test, need to investigate further. ")
-	public void testConfigurationParsedCorrectlyWithKafkaClientAndNonDefaultControlFlag() throws Exception {
-		ConfigFile configFile = new ConfigFile(new ClassPathResource("jaas-sample-kafka-only.conf").getURI());
-		final AppConfigurationEntry[] kafkaConfigurationArray = configFile.getAppConfigurationEntry("KafkaClient");
+	public void testConfigurationParsedCorrectlyWithKafkaClientAndNonDefaultControlFlag()
+			throws Exception {
+		ConfigFile configFile = new ConfigFile(
+				new ClassPathResource("jaas-sample-kafka-only.conf").getURI());
+		final AppConfigurationEntry[] kafkaConfigurationArray = configFile
+				.getAppConfigurationEntry("KafkaClient");
 
-		final ConfigurableApplicationContext context =
-				SpringApplication.run(SimpleApplication.class,
-						"--spring.cloud.stream.kafka.binder.jaas.options.useKeyTab=true",
-						"--spring.cloud.stream.kafka.binder.jaas.controlFlag=requisite",
-						"--spring.cloud.stream.kafka.binder.jaas.options.storeKey=true",
-						"--spring.cloud.stream.kafka.binder.jaas.options.keyTab=/etc/security/keytabs/kafka_client.keytab",
-						"--spring.cloud.stream.kafka.binder.jaas.options.principal=kafka-client-1@EXAMPLE.COM",
-						"--spring.jmx.enabled=false");
-		javax.security.auth.login.Configuration configuration = javax.security.auth.login.Configuration.getConfiguration();
+		final ConfigurableApplicationContext context = SpringApplication.run(
+				SimpleApplication.class,
+				"--spring.cloud.stream.kafka.binder.jaas.options.useKeyTab=true",
+				"--spring.cloud.stream.kafka.binder.jaas.controlFlag=requisite",
+				"--spring.cloud.stream.kafka.binder.jaas.options.storeKey=true",
+				"--spring.cloud.stream.kafka.binder.jaas.options.keyTab=/etc/security/keytabs/kafka_client.keytab",
+				"--spring.cloud.stream.kafka.binder.jaas.options.principal=kafka-client-1@EXAMPLE.COM",
+				"--spring.jmx.enabled=false");
+		javax.security.auth.login.Configuration configuration = javax.security.auth.login.Configuration
+				.getConfiguration();
 
-		final AppConfigurationEntry[] kafkaConfiguration = configuration.getAppConfigurationEntry("KafkaClient");
+		final AppConfigurationEntry[] kafkaConfiguration = configuration
+				.getAppConfigurationEntry("KafkaClient");
 		assertThat(kafkaConfiguration).hasSize(1);
-		assertThat(kafkaConfiguration[0].getOptions()).isEqualTo(kafkaConfigurationArray[0].getOptions());
-		assertThat(kafkaConfiguration[0].getControlFlag()).isEqualTo(AppConfigurationEntry.LoginModuleControlFlag.REQUISITE);
+		assertThat(kafkaConfiguration[0].getOptions())
+				.isEqualTo(kafkaConfigurationArray[0].getOptions());
+		assertThat(kafkaConfiguration[0].getControlFlag())
+				.isEqualTo(AppConfigurationEntry.LoginModuleControlFlag.REQUISITE);
 		context.close();
 	}
 
 	@Test
 	public void testConfigurationWithUnknownControlFlag() throws Exception {
-		ConfigFile configFile = new ConfigFile(new ClassPathResource("jaas-sample-kafka-only.conf").getURI());
+		ConfigFile configFile = new ConfigFile(
+				new ClassPathResource("jaas-sample-kafka-only.conf").getURI());
 
-		assertThatThrownBy(
-				() -> SpringApplication.run(SimpleApplication.class,
-						"--spring.cloud.stream.kafka.binder.jaas.options.useKeyTab=true",
-						"--spring.cloud.stream.kafka.binder.jaas.controlFlag=unknown",
-						"--spring.cloud.stream.kafka.binder.jaas.options.storeKey=true",
-						"--spring.cloud.stream.kafka.binder.jaas.options.keyTab=/etc/security/keytabs/kafka_client.keytab",
-						"--spring.cloud.stream.kafka.binder.jaas.options.principal=kafka-client-1@EXAMPLE.COM",
-						"--spring.jmx.enabled=false"))
-				.isInstanceOf(ConfigurationPropertiesBindException.class)
-				.hasMessageContaining("Error creating bean with name 'configurationProperties'");
+		assertThatThrownBy(() -> SpringApplication.run(SimpleApplication.class,
+				"--spring.cloud.stream.kafka.binder.jaas.options.useKeyTab=true",
+				"--spring.cloud.stream.kafka.binder.jaas.controlFlag=unknown",
+				"--spring.cloud.stream.kafka.binder.jaas.options.storeKey=true",
+				"--spring.cloud.stream.kafka.binder.jaas.options.keyTab=/etc/security/keytabs/kafka_client.keytab",
+				"--spring.cloud.stream.kafka.binder.jaas.options.principal=kafka-client-1@EXAMPLE.COM",
+				"--spring.jmx.enabled=false"))
+						.isInstanceOf(ConfigurationPropertiesBindException.class)
+						.hasMessageContaining(
+								"Error creating bean with name 'configurationProperties'");
 	}
 
-
 	@SpringBootApplication
 	public static class SimpleApplication {
 
 	}
+
 }
diff --git a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderMetricsTest.java b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderMetricsTest.java
index f6991d4a1..132e515aa 100644
--- a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderMetricsTest.java
+++ b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderMetricsTest.java
@@ -74,23 +74,33 @@ public class KafkaBinderMetricsTest {
 	@Before
 	public void setup() {
 		MockitoAnnotations.initMocks(this);
-		org.mockito.BDDMockito.given(consumerFactory.createConsumer(ArgumentMatchers.any(), ArgumentMatchers.any())).willReturn(consumer);
+		org.mockito.BDDMockito.given(consumerFactory
+				.createConsumer(ArgumentMatchers.any(), ArgumentMatchers.any()))
+				.willReturn(consumer);
 		org.mockito.BDDMockito.given(binder.getTopicsInUse()).willReturn(topicsInUse);
-		metrics = new KafkaBinderMetrics(binder, kafkaBinderConfigurationProperties, consumerFactory, null);
-		org.mockito.BDDMockito.given(consumer.endOffsets(ArgumentMatchers.anyCollection()))
-				.willReturn(java.util.Collections.singletonMap(new TopicPartition(TEST_TOPIC, 0), 1000L));
+		metrics = new KafkaBinderMetrics(binder, kafkaBinderConfigurationProperties,
+				consumerFactory, null);
+		org.mockito.BDDMockito
+				.given(consumer.endOffsets(ArgumentMatchers.anyCollection()))
+				.willReturn(java.util.Collections
+						.singletonMap(new TopicPartition(TEST_TOPIC, 0), 1000L));
 	}
 
 	@Test
 	public void shouldIndicateLag() {
-		org.mockito.BDDMockito.given(consumer.committed(ArgumentMatchers.any(TopicPartition.class))).willReturn(new OffsetAndMetadata(500));
+		org.mockito.BDDMockito
+				.given(consumer.committed(ArgumentMatchers.any(TopicPartition.class)))
+				.willReturn(new OffsetAndMetadata(500));
 		List partitions = partitions(new Node(0, null, 0));
-		topicsInUse.put(TEST_TOPIC, new TopicInformation("group1-metrics", partitions, false));
-		org.mockito.BDDMockito.given(consumer.partitionsFor(TEST_TOPIC)).willReturn(partitions);
+		topicsInUse.put(TEST_TOPIC,
+				new TopicInformation("group1-metrics", partitions, false));
+		org.mockito.BDDMockito.given(consumer.partitionsFor(TEST_TOPIC))
+				.willReturn(partitions);
 		metrics.bindTo(meterRegistry);
 		assertThat(meterRegistry.getMeters()).hasSize(1);
-		assertThat(meterRegistry.get(KafkaBinderMetrics.METRIC_NAME).tag("group", "group1-metrics").tag("topic", TEST_TOPIC).gauge()
-				.value()).isEqualTo(500.0);
+		assertThat(meterRegistry.get(KafkaBinderMetrics.METRIC_NAME)
+				.tag("group", "group1-metrics").tag("topic", TEST_TOPIC).gauge().value())
+						.isEqualTo(500.0);
 	}
 
 	@Test
@@ -98,26 +108,37 @@ public class KafkaBinderMetricsTest {
 		Map endOffsets = new HashMap<>();
 		endOffsets.put(new TopicPartition(TEST_TOPIC, 0), 1000L);
 		endOffsets.put(new TopicPartition(TEST_TOPIC, 1), 1000L);
-		org.mockito.BDDMockito.given(consumer.endOffsets(ArgumentMatchers.anyCollection())).willReturn(endOffsets);
-		org.mockito.BDDMockito.given(consumer.committed(ArgumentMatchers.any(TopicPartition.class))).willReturn(new OffsetAndMetadata(500));
-		List partitions = partitions(new Node(0, null, 0), new Node(0, null, 0));
-		topicsInUse.put(TEST_TOPIC, new TopicInformation("group2-metrics", partitions, false));
-		org.mockito.BDDMockito.given(consumer.partitionsFor(TEST_TOPIC)).willReturn(partitions);
+		org.mockito.BDDMockito
+				.given(consumer.endOffsets(ArgumentMatchers.anyCollection()))
+				.willReturn(endOffsets);
+		org.mockito.BDDMockito
+				.given(consumer.committed(ArgumentMatchers.any(TopicPartition.class)))
+				.willReturn(new OffsetAndMetadata(500));
+		List partitions = partitions(new Node(0, null, 0),
+				new Node(0, null, 0));
+		topicsInUse.put(TEST_TOPIC,
+				new TopicInformation("group2-metrics", partitions, false));
+		org.mockito.BDDMockito.given(consumer.partitionsFor(TEST_TOPIC))
+				.willReturn(partitions);
 		metrics.bindTo(meterRegistry);
 		assertThat(meterRegistry.getMeters()).hasSize(1);
-		assertThat(meterRegistry.get(KafkaBinderMetrics.METRIC_NAME).tag("group", "group2-metrics").tag("topic", TEST_TOPIC).gauge()
-				.value()).isEqualTo(1000.0);
+		assertThat(meterRegistry.get(KafkaBinderMetrics.METRIC_NAME)
+				.tag("group", "group2-metrics").tag("topic", TEST_TOPIC).gauge().value())
+						.isEqualTo(1000.0);
 	}
 
 	@Test
 	public void shouldIndicateFullLagForNotCommittedGroups() {
 		List partitions = partitions(new Node(0, null, 0));
-		topicsInUse.put(TEST_TOPIC, new TopicInformation("group3-metrics", partitions, false));
-		org.mockito.BDDMockito.given(consumer.partitionsFor(TEST_TOPIC)).willReturn(partitions);
+		topicsInUse.put(TEST_TOPIC,
+				new TopicInformation("group3-metrics", partitions, false));
+		org.mockito.BDDMockito.given(consumer.partitionsFor(TEST_TOPIC))
+				.willReturn(partitions);
 		metrics.bindTo(meterRegistry);
 		assertThat(meterRegistry.getMeters()).hasSize(1);
-		assertThat(meterRegistry.get(KafkaBinderMetrics.METRIC_NAME).tag("group", "group3-metrics").tag("topic", TEST_TOPIC).gauge()
-				.value()).isEqualTo(1000.0);
+		assertThat(meterRegistry.get(KafkaBinderMetrics.METRIC_NAME)
+				.tag("group", "group3-metrics").tag("topic", TEST_TOPIC).gauge().value())
+						.isEqualTo(1000.0);
 	}
 
 	@Test
@@ -131,58 +152,76 @@ public class KafkaBinderMetricsTest {
 	@Test
 	public void createsConsumerOnceWhenInvokedMultipleTimes() {
 		final List partitions = partitions(new Node(0, null, 0));
-		topicsInUse.put(TEST_TOPIC, new TopicInformation("group4-metrics", partitions, false));
+		topicsInUse.put(TEST_TOPIC,
+				new TopicInformation("group4-metrics", partitions, false));
 
 		metrics.bindTo(meterRegistry);
 
-		Gauge gauge = meterRegistry.get(KafkaBinderMetrics.METRIC_NAME).tag("group", "group4-metrics").tag("topic", TEST_TOPIC).gauge();
+		Gauge gauge = meterRegistry.get(KafkaBinderMetrics.METRIC_NAME)
+				.tag("group", "group4-metrics").tag("topic", TEST_TOPIC).gauge();
 		gauge.value();
 		assertThat(gauge.value()).isEqualTo(1000.0);
 
-		org.mockito.Mockito.verify(this.consumerFactory).createConsumer(ArgumentMatchers.any(), ArgumentMatchers.any());
+		org.mockito.Mockito.verify(this.consumerFactory)
+				.createConsumer(ArgumentMatchers.any(), ArgumentMatchers.any());
 	}
 
 	@Test
 	public void consumerCreationFailsFirstTime() {
-		org.mockito.BDDMockito.given(consumerFactory.createConsumer(ArgumentMatchers.any(), ArgumentMatchers.any())).willThrow(KafkaException.class)
-				.willReturn(consumer);
+		org.mockito.BDDMockito
+				.given(consumerFactory.createConsumer(ArgumentMatchers.any(),
+						ArgumentMatchers.any()))
+				.willThrow(KafkaException.class).willReturn(consumer);
 
 		final List partitions = partitions(new Node(0, null, 0));
-		topicsInUse.put(TEST_TOPIC, new TopicInformation("group5-metrics", partitions, false));
+		topicsInUse.put(TEST_TOPIC,
+				new TopicInformation("group5-metrics", partitions, false));
 
 		metrics.bindTo(meterRegistry);
 
-		Gauge gauge = meterRegistry.get(KafkaBinderMetrics.METRIC_NAME).tag("group", "group5-metrics").tag("topic", TEST_TOPIC).gauge();
+		Gauge gauge = meterRegistry.get(KafkaBinderMetrics.METRIC_NAME)
+				.tag("group", "group5-metrics").tag("topic", TEST_TOPIC).gauge();
 		assertThat(gauge.value()).isEqualTo(0);
 		assertThat(gauge.value()).isEqualTo(1000.0);
 
-		org.mockito.Mockito.verify(this.consumerFactory, Mockito.times(2)).createConsumer(ArgumentMatchers.any(), ArgumentMatchers.any());
+		org.mockito.Mockito.verify(this.consumerFactory, Mockito.times(2))
+				.createConsumer(ArgumentMatchers.any(), ArgumentMatchers.any());
 	}
-	
+
 	@Test
 	public void createOneConsumerPerGroup() {
 		final List partitions1 = partitions(new Node(0, null, 0));
 		final List partitions2 = partitions(new Node(0, null, 0));
-		topicsInUse.put(TEST_TOPIC, new TopicInformation("group1-metrics", partitions1, false));
-		topicsInUse.put("test2", new TopicInformation("group2-metrics", partitions2, false));
+		topicsInUse.put(TEST_TOPIC,
+				new TopicInformation("group1-metrics", partitions1, false));
+		topicsInUse.put("test2",
+				new TopicInformation("group2-metrics", partitions2, false));
 
 		metrics.bindTo(meterRegistry);
-		
-		KafkaConsumer consumer2 = mock(KafkaConsumer.class);
-		org.mockito.BDDMockito.given(consumerFactory.createConsumer(ArgumentMatchers.eq("group2-metrics"), ArgumentMatchers.any()))
-				.willReturn(consumer2);
-		org.mockito.BDDMockito.given(consumer2.endOffsets(ArgumentMatchers.anyCollection()))
-				.willReturn(java.util.Collections.singletonMap(new TopicPartition("test2", 0), 50L));
 
-		Gauge gauge1 = meterRegistry.get(KafkaBinderMetrics.METRIC_NAME).tag("group", "group1-metrics").tag("topic", TEST_TOPIC).gauge();
-		Gauge gauge2 = meterRegistry.get(KafkaBinderMetrics.METRIC_NAME).tag("group", "group2-metrics").tag("topic", "test2").gauge();
+		KafkaConsumer consumer2 = mock(KafkaConsumer.class);
+		org.mockito.BDDMockito
+				.given(consumerFactory.createConsumer(
+						ArgumentMatchers.eq("group2-metrics"), ArgumentMatchers.any()))
+				.willReturn(consumer2);
+		org.mockito.BDDMockito
+				.given(consumer2.endOffsets(ArgumentMatchers.anyCollection()))
+				.willReturn(java.util.Collections
+						.singletonMap(new TopicPartition("test2", 0), 50L));
+
+		Gauge gauge1 = meterRegistry.get(KafkaBinderMetrics.METRIC_NAME)
+				.tag("group", "group1-metrics").tag("topic", TEST_TOPIC).gauge();
+		Gauge gauge2 = meterRegistry.get(KafkaBinderMetrics.METRIC_NAME)
+				.tag("group", "group2-metrics").tag("topic", "test2").gauge();
 		gauge1.value();
 		gauge2.value();
 		assertThat(gauge1.value()).isEqualTo(1000.0);
 		assertThat(gauge2.value()).isEqualTo(50.0);
 
-		org.mockito.Mockito.verify(this.consumerFactory).createConsumer(ArgumentMatchers.eq("group1-metrics"), ArgumentMatchers.any());
-		org.mockito.Mockito.verify(this.consumerFactory).createConsumer(ArgumentMatchers.eq("group2-metrics"), ArgumentMatchers.any());
+		org.mockito.Mockito.verify(this.consumerFactory).createConsumer(
+				ArgumentMatchers.eq("group1-metrics"), ArgumentMatchers.any());
+		org.mockito.Mockito.verify(this.consumerFactory).createConsumer(
+				ArgumentMatchers.eq("group2-metrics"), ArgumentMatchers.any());
 	}
 
 	private List partitions(Node... nodes) {
diff --git a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderTests.java b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderTests.java
index 0fb4a75ac..309967db6 100644
--- a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderTests.java
+++ b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderTests.java
@@ -135,7 +135,6 @@ import org.springframework.util.concurrent.SettableListenableFuture;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assertions.fail;
-import static org.junit.Assert.assertTrue;
 import static org.mockito.Mockito.mock;
 
 /**
@@ -145,17 +144,21 @@ import static org.mockito.Mockito.mock;
  * @author Gary Russell
  */
 public class KafkaBinderTests extends
+		// @checkstyle:off
 		PartitionCapableBinderTests, ExtendedProducerProperties> {
 
+	// @checkstyle:on
 	private static final int DEFAULT_OPERATION_TIMEOUT = 30;
 
 	@Rule
 	public ExpectedException expectedProvisioningException = ExpectedException.none();
 
-	private final String CLASS_UNDER_TEST_NAME = KafkaMessageChannelBinder.class.getSimpleName();
+	private final String CLASS_UNDER_TEST_NAME = KafkaMessageChannelBinder.class
+			.getSimpleName();
 
 	@ClassRule
-	public static EmbeddedKafkaRule embeddedKafka = new EmbeddedKafkaRule(1, true, 10, "error.pollableDlq.group-pcWithDlq");
+	public static EmbeddedKafkaRule embeddedKafka = new EmbeddedKafkaRule(1, true, 10,
+			"error.pollableDlq.group-pcWithDlq");
 
 	private KafkaTestBinder binder;
 
@@ -188,7 +191,8 @@ public class KafkaBinderTests extends
 	protected KafkaTestBinder getBinder() {
 		if (binder == null) {
 			KafkaBinderConfigurationProperties binderConfiguration = createConfigurationProperties();
-			KafkaTopicProvisioner kafkaTopicProvisioner = new KafkaTopicProvisioner(binderConfiguration, new TestKafkaProperties());
+			KafkaTopicProvisioner kafkaTopicProvisioner = new KafkaTopicProvisioner(
+					binderConfiguration, new TestKafkaProperties());
 			try {
 				kafkaTopicProvisioner.afterPropertiesSet();
 			}
@@ -200,22 +204,25 @@ public class KafkaBinderTests extends
 		return binder;
 	}
 
-	private Binder getBinder(KafkaBinderConfigurationProperties kafkaBinderConfigurationProperties) {
-		KafkaTopicProvisioner provisioningProvider =
-				new KafkaTopicProvisioner(kafkaBinderConfigurationProperties, new TestKafkaProperties());
+	private Binder getBinder(
+			KafkaBinderConfigurationProperties kafkaBinderConfigurationProperties) {
+		KafkaTopicProvisioner provisioningProvider = new KafkaTopicProvisioner(
+				kafkaBinderConfigurationProperties, new TestKafkaProperties());
 		try {
 			provisioningProvider.afterPropertiesSet();
 		}
 		catch (Exception e) {
 			throw new RuntimeException(e);
 		}
-		return new KafkaTestBinder(kafkaBinderConfigurationProperties, provisioningProvider);
+		return new KafkaTestBinder(kafkaBinderConfigurationProperties,
+				provisioningProvider);
 	}
 
 	private KafkaBinderConfigurationProperties createConfigurationProperties() {
 		KafkaBinderConfigurationProperties binderConfiguration = new KafkaBinderConfigurationProperties(
 				new TestKafkaProperties());
-		BrokerAddress[] brokerAddresses = embeddedKafka.getEmbeddedKafka().getBrokerAddresses();
+		BrokerAddress[] brokerAddresses = embeddedKafka.getEmbeddedKafka()
+				.getBrokerAddresses();
 		List bAddresses = new ArrayList<>();
 		for (BrokerAddress bAddress : brokerAddresses) {
 			bAddresses.add(bAddress.toString());
@@ -229,11 +236,12 @@ public class KafkaBinderTests extends
 		return consumerFactory().createConsumer().partitionsFor(topic).size();
 	}
 
-	private void invokeCreateTopic(String topic, int partitions, int replicationFactor) throws Exception {
+	private void invokeCreateTopic(String topic, int partitions, int replicationFactor)
+			throws Exception {
 
-		NewTopic newTopic = new NewTopic(topic, partitions,
-				(short) replicationFactor);
-		CreateTopicsResult topics = adminClient.createTopics(Collections.singletonList(newTopic));
+		NewTopic newTopic = new NewTopic(topic, partitions, (short) replicationFactor);
+		CreateTopicsResult topics = adminClient
+				.createTopics(Collections.singletonList(newTopic));
 		topics.all().get(DEFAULT_OPERATION_TIMEOUT, TimeUnit.SECONDS);
 	}
 
@@ -248,7 +256,8 @@ public class KafkaBinderTests extends
 			timeoutMultiplier = Double.parseDouble(multiplier);
 		}
 
-		BrokerAddress[] brokerAddresses = embeddedKafka.getEmbeddedKafka().getBrokerAddresses();
+		BrokerAddress[] brokerAddresses = embeddedKafka.getEmbeddedKafka()
+				.getBrokerAddresses();
 		List bAddresses = new ArrayList<>();
 		for (BrokerAddress bAddress : brokerAddresses) {
 			bAddresses.add(bAddress.toString());
@@ -256,15 +265,18 @@ public class KafkaBinderTests extends
 		String[] foo = new String[bAddresses.size()];
 
 		Map adminConfigs = new HashMap<>();
-		adminConfigs.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, bAddresses.toArray(foo)[0]);
+		adminConfigs.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG,
+				bAddresses.toArray(foo)[0]);
 		adminClient = AdminClient.create(adminConfigs);
 	}
 
 	private int invokePartitionSize(String topic) throws Throwable {
 
-		DescribeTopicsResult describeTopicsResult = adminClient.describeTopics(Collections.singletonList(topic));
+		DescribeTopicsResult describeTopicsResult = adminClient
+				.describeTopics(Collections.singletonList(topic));
 		KafkaFuture> all = describeTopicsResult.all();
-		Map stringTopicDescriptionMap = all.get(DEFAULT_OPERATION_TIMEOUT, TimeUnit.SECONDS);
+		Map stringTopicDescriptionMap = all
+				.get(DEFAULT_OPERATION_TIMEOUT, TimeUnit.SECONDS);
 		TopicDescription topicDescription = stringTopicDescriptionMap.get(topic);
 		return topicDescription.partitions().size();
 	}
@@ -287,7 +299,8 @@ public class KafkaBinderTests extends
 	private ConsumerFactory consumerFactory() {
 		Map props = new HashMap<>();
 		KafkaBinderConfigurationProperties configurationProperties = createConfigurationProperties();
-		props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, configurationProperties.getKafkaConnectionString());
+		props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG,
+				configurationProperties.getKafkaConnectionString());
 		props.put(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, false);
 		props.put(ConsumerConfig.GROUP_ID_CONFIG, "TEST-CONSUMER-GROUP");
 		Deserializer valueDecoder = new ByteArrayDeserializer();
@@ -296,30 +309,35 @@ public class KafkaBinderTests extends
 		return new DefaultKafkaConsumerFactory<>(props, keyDecoder, valueDecoder);
 	}
 
-	@SuppressWarnings({"rawtypes", "unchecked"})
+	@SuppressWarnings({ "rawtypes", "unchecked" })
 	@Test
 	public void testTrustedPackages() throws Exception {
 		Binder binder = getBinder();
 
-		BindingProperties producerBindingProperties = createProducerBindingProperties(createProducerProperties());
-		DirectChannel moduleOutputChannel = createBindableChannel("output", producerBindingProperties);
+		BindingProperties producerBindingProperties = createProducerBindingProperties(
+				createProducerProperties());
+		DirectChannel moduleOutputChannel = createBindableChannel("output",
+				producerBindingProperties);
 
 		ExtendedConsumerProperties consumerProperties = createConsumerProperties();
-		consumerProperties.getExtension().setTrustedPackages(new String[]{"org.springframework.util"});
+		consumerProperties.getExtension()
+				.setTrustedPackages(new String[] { "org.springframework.util" });
 
-		DirectChannel moduleInputChannel = createBindableChannel("input", createConsumerBindingProperties(consumerProperties));
+		DirectChannel moduleInputChannel = createBindableChannel("input",
+				createConsumerBindingProperties(consumerProperties));
 
-		Binding producerBinding = binder.bindProducer("bar.0", moduleOutputChannel,
-				producerBindingProperties.getProducer());
+		Binding producerBinding = binder.bindProducer("bar.0",
+				moduleOutputChannel, producerBindingProperties.getProducer());
 
 		Binding consumerBinding = binder.bindConsumer("bar.0",
-				"testSendAndReceiveNoOriginalContentType", moduleInputChannel, consumerProperties);
+				"testSendAndReceiveNoOriginalContentType", moduleInputChannel,
+				consumerProperties);
 		binderBindUnbindLatency();
 
-		Message message = org.springframework.integration.support.MessageBuilder.withPayload("foo")
+		Message message = org.springframework.integration.support.MessageBuilder
+				.withPayload("foo")
 				.setHeader(MessageHeaders.CONTENT_TYPE, MimeTypeUtils.TEXT_PLAIN)
-				.setHeader("foo", MimeTypeUtils.TEXT_PLAIN)
-				.build();
+				.setHeader("foo", MimeTypeUtils.TEXT_PLAIN).build();
 
 		moduleOutputChannel.send(message);
 		CountDownLatch latch = new CountDownLatch(1);
@@ -334,13 +352,17 @@ public class KafkaBinderTests extends
 		});
 		Assert.isTrue(latch.await(5, TimeUnit.SECONDS), "Failed to receive message");
 
-
 		Assertions.assertThat(inboundMessageRef.get()).isNotNull();
-		Assertions.assertThat(inboundMessageRef.get().getPayload()).isEqualTo("foo".getBytes());
-		Assertions.assertThat(inboundMessageRef.get().getHeaders().get(BinderHeaders.BINDER_ORIGINAL_CONTENT_TYPE)).isNull();
-		Assertions.assertThat(inboundMessageRef.get().getHeaders().get(MessageHeaders.CONTENT_TYPE))
+		Assertions.assertThat(inboundMessageRef.get().getPayload())
+				.isEqualTo("foo".getBytes());
+		Assertions.assertThat(inboundMessageRef.get().getHeaders()
+				.get(BinderHeaders.BINDER_ORIGINAL_CONTENT_TYPE)).isNull();
+		Assertions
+				.assertThat(inboundMessageRef.get().getHeaders()
+						.get(MessageHeaders.CONTENT_TYPE))
 				.isEqualTo(MimeTypeUtils.TEXT_PLAIN);
-		Assertions.assertThat(inboundMessageRef.get().getHeaders().get("foo")).isInstanceOf(String.class);
+		Assertions.assertThat(inboundMessageRef.get().getHeaders().get("foo"))
+				.isInstanceOf(String.class);
 		String actual = (String) inboundMessageRef.get().getHeaders().get("foo");
 		Assertions.assertThat(actual).isEqualTo(MimeTypeUtils.TEXT_PLAIN.toString());
 		producerBinding.unbind();
@@ -358,19 +380,23 @@ public class KafkaBinderTests extends
 		DirectChannel moduleOutputChannel = createBindableChannel("output",
 				producerBindingProperties);
 		ExtendedConsumerProperties consumerProperties = createConsumerProperties();
-		DirectChannel moduleInputChannel = createBindableChannel("input", createConsumerBindingProperties(consumerProperties));
+		DirectChannel moduleInputChannel = createBindableChannel("input",
+				createConsumerBindingProperties(consumerProperties));
 		Binding producerBinding = binder.bindProducer("bar.0",
 				moduleOutputChannel, producerBindingProperties.getProducer());
 
-		consumerProperties.getExtension().setTrustedPackages(new String[]{"org.springframework.util"});
+		consumerProperties.getExtension()
+				.setTrustedPackages(new String[] { "org.springframework.util" });
 		Binding consumerBinding = binder.bindConsumer("bar.0",
 				"testSendAndReceiveNoOriginalContentType", moduleInputChannel,
 				consumerProperties);
 		binderBindUnbindLatency();
 
-		//TODO: Will have to fix the MimeType to convert to byte array once this issue has been resolved:
-		//https://github.com/spring-projects/spring-kafka/issues/424
-		Message message = org.springframework.integration.support.MessageBuilder.withPayload("foo")
+		// TODO: Will have to fix the MimeType to convert to byte array once this issue
+		// has been resolved:
+		// https://github.com/spring-projects/spring-kafka/issues/424
+		Message message = org.springframework.integration.support.MessageBuilder
+				.withPayload("foo")
 				.setHeader(MessageHeaders.CONTENT_TYPE, MimeTypeUtils.TEXT_PLAIN).build();
 		moduleOutputChannel.send(message);
 		CountDownLatch latch = new CountDownLatch(1);
@@ -403,13 +429,15 @@ public class KafkaBinderTests extends
 		DirectChannel moduleOutputChannel = createBindableChannel("output",
 				outputBindingProperties);
 		ExtendedConsumerProperties consumerProperties = createConsumerProperties();
-		DirectChannel moduleInputChannel = createBindableChannel("input", createConsumerBindingProperties(consumerProperties));
+		DirectChannel moduleInputChannel = createBindableChannel("input",
+				createConsumerBindingProperties(consumerProperties));
 
 		Binding producerBinding = binder.bindProducer("foo.bar",
 				moduleOutputChannel, outputBindingProperties.getProducer());
 		Binding consumerBinding = binder.bindConsumer("foo.bar",
 				"testSendAndReceive", moduleInputChannel, consumerProperties);
-		Message message = org.springframework.integration.support.MessageBuilder.withPayload("foo".getBytes(StandardCharsets.UTF_8))
+		Message message = org.springframework.integration.support.MessageBuilder
+				.withPayload("foo".getBytes(StandardCharsets.UTF_8))
 				.setHeader(MessageHeaders.CONTENT_TYPE,
 						MimeTypeUtils.APPLICATION_OCTET_STREAM)
 				.build();
@@ -430,11 +458,14 @@ public class KafkaBinderTests extends
 		Assert.isTrue(latch.await(5, TimeUnit.SECONDS), "Failed to receive message");
 
 		assertThat(inboundMessageRef.get()).isNotNull();
-		assertThat(new String(inboundMessageRef.get().getPayload(), StandardCharsets.UTF_8)).isEqualTo("foo");
+		assertThat(
+				new String(inboundMessageRef.get().getPayload(), StandardCharsets.UTF_8))
+						.isEqualTo("foo");
 		assertThat(inboundMessageRef.get().getHeaders().get(MessageHeaders.CONTENT_TYPE))
 				.isEqualTo(MimeTypeUtils.APPLICATION_OCTET_STREAM);
 
-		Map topicsInUse = ((KafkaTestBinder)binder).getCoreBinder().getTopicsInUse();
+		Map topicsInUse = ((KafkaTestBinder) binder)
+				.getCoreBinder().getTopicsInUse();
 		assertThat(topicsInUse.keySet()).contains("foo.bar");
 		TopicInformation topic = topicsInUse.get("foo.bar");
 		assertThat(topic.isConsumerTopic()).isTrue();
@@ -450,10 +481,11 @@ public class KafkaBinderTests extends
 		Binder binder = getBinder();
 		ExtendedProducerProperties producerProperties = createProducerProperties();
 
-		//Native serialization for producer
+		// Native serialization for producer
 		producerProperties.setUseNativeEncoding(true);
 		Map producerConfig = new HashMap<>();
-		producerConfig.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer");
+		producerConfig.put("value.serializer",
+				"org.apache.kafka.common.serialization.StringSerializer");
 		producerProperties.getExtension().setConfiguration(producerConfig);
 
 		BindingProperties outputBindingProperties = createProducerBindingProperties(
@@ -463,17 +495,20 @@ public class KafkaBinderTests extends
 				outputBindingProperties);
 		ExtendedConsumerProperties consumerProperties = createConsumerProperties();
 
-		//Native Deserialization for consumer
+		// Native Deserialization for consumer
 		consumerProperties.setUseNativeDecoding(true);
 		Map consumerConfig = new HashMap<>();
-		consumerConfig.put("value.deserializer", "org.apache.kafka.common.serialization.StringDeserializer");
+		consumerConfig.put("value.deserializer",
+				"org.apache.kafka.common.serialization.StringDeserializer");
 		consumerProperties.getExtension().setConfiguration(consumerConfig);
 
-		//Setting dlq producer properties on the consumer
-		consumerProperties.getExtension().setDlqProducerProperties(producerProperties.getExtension());
+		// Setting dlq producer properties on the consumer
+		consumerProperties.getExtension()
+				.setDlqProducerProperties(producerProperties.getExtension());
 		consumerProperties.getExtension().setEnableDlq(true);
 
-		DirectChannel moduleInputChannel = createBindableChannel("input", createConsumerBindingProperties(consumerProperties));
+		DirectChannel moduleInputChannel = createBindableChannel("input",
+				createConsumerBindingProperties(consumerProperties));
 
 		Binding producerBinding = binder.bindProducer("foo.bar",
 				moduleOutputChannel, outputBindingProperties.getProducer());
@@ -486,30 +521,34 @@ public class KafkaBinderTests extends
 		FailingInvocationCountingMessageHandler handler = new FailingInvocationCountingMessageHandler();
 		moduleInputChannel.subscribe(handler);
 
-		//Consumer for the DLQ destination
+		// Consumer for the DLQ destination
 		QueueChannel dlqChannel = new QueueChannel();
 		ExtendedConsumerProperties dlqConsumerProperties = createConsumerProperties();
 		dlqConsumerProperties.setMaxAttempts(1);
 
 		Binding dlqConsumerBinding = binder.bindConsumer(
-				"error.foo.bar." + "testDlqWithNativeEncoding-1", null, dlqChannel, dlqConsumerProperties);
+				"error.foo.bar." + "testDlqWithNativeEncoding-1", null, dlqChannel,
+				dlqConsumerProperties);
 		binderBindUnbindLatency();
 
-		Message message = org.springframework.integration.support.MessageBuilder.withPayload("foo")
-				.build();
+		Message message = org.springframework.integration.support.MessageBuilder
+				.withPayload("foo").build();
 
 		moduleOutputChannel.send(message);
 
 		Message receivedMessage = receive(dlqChannel, 5);
 		assertThat(receivedMessage).isNotNull();
 		assertThat(receivedMessage.getPayload()).isEqualTo("foo".getBytes());
-		assertThat(handler.getInvocationCount()).isEqualTo(consumerProperties.getMaxAttempts());
-		assertThat(receivedMessage.getHeaders().get(KafkaMessageChannelBinder.X_ORIGINAL_TOPIC))
-				.isEqualTo("foo.bar".getBytes(StandardCharsets.UTF_8));
-		assertThat(new String((byte[]) receivedMessage.getHeaders().get(KafkaMessageChannelBinder.X_EXCEPTION_MESSAGE)))
-				.startsWith("Dispatcher failed to deliver Message; nested exception is java.lang.RuntimeException: fail");
-		assertThat(receivedMessage.getHeaders().get(KafkaMessageChannelBinder.X_EXCEPTION_STACKTRACE))
-				.isNotNull();
+		assertThat(handler.getInvocationCount())
+				.isEqualTo(consumerProperties.getMaxAttempts());
+		assertThat(receivedMessage.getHeaders()
+				.get(KafkaMessageChannelBinder.X_ORIGINAL_TOPIC))
+						.isEqualTo("foo.bar".getBytes(StandardCharsets.UTF_8));
+		assertThat(new String((byte[]) receivedMessage.getHeaders()
+				.get(KafkaMessageChannelBinder.X_EXCEPTION_MESSAGE))).startsWith(
+						"Dispatcher failed to deliver Message; nested exception is java.lang.RuntimeException: fail");
+		assertThat(receivedMessage.getHeaders()
+				.get(KafkaMessageChannelBinder.X_EXCEPTION_STACKTRACE)).isNotNull();
 		binderBindUnbindLatency();
 
 		dlqConsumerBinding.unbind();
@@ -520,13 +559,15 @@ public class KafkaBinderTests extends
 
 	@Test
 	@SuppressWarnings("unchecked")
-	public void testDlqWithNativeDecodingOnConsumerButMissingSerializerOnDlqProducer() throws Exception {
+	public void testDlqWithNativeDecodingOnConsumerButMissingSerializerOnDlqProducer()
+			throws Exception {
 		Binder binder = getBinder();
 		ExtendedProducerProperties producerProperties = createProducerProperties();
-		//Native serialization for producer
+		// Native serialization for producer
 		producerProperties.setUseNativeEncoding(true);
 		Map producerConfig = new HashMap<>();
-		producerConfig.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer");
+		producerConfig.put("value.serializer",
+				"org.apache.kafka.common.serialization.StringSerializer");
 		producerProperties.getExtension().setConfiguration(producerConfig);
 		BindingProperties outputBindingProperties = createProducerBindingProperties(
 				producerProperties);
@@ -534,18 +575,21 @@ public class KafkaBinderTests extends
 				outputBindingProperties);
 
 		ExtendedConsumerProperties consumerProperties = createConsumerProperties();
-		//Native Deserialization for consumer
+		// Native Deserialization for consumer
 		consumerProperties.setUseNativeDecoding(true);
 
 		Map consumerConfig = new HashMap<>();
-		consumerConfig.put("value.deserializer", "org.apache.kafka.common.serialization.StringDeserializer");
+		consumerConfig.put("value.deserializer",
+				"org.apache.kafka.common.serialization.StringDeserializer");
 
-		//No Dlq producer properties set on the consumer with a native serializer. This should cause an error for DLQ sending.
+		// No Dlq producer properties set on the consumer with a native serializer.
+		// This should cause an error for DLQ sending.
 
 		consumerProperties.getExtension().setConfiguration(consumerConfig);
 		consumerProperties.getExtension().setEnableDlq(true);
 
-		DirectChannel moduleInputChannel = createBindableChannel("input", createConsumerBindingProperties(consumerProperties));
+		DirectChannel moduleInputChannel = createBindableChannel("input",
+				createConsumerBindingProperties(consumerProperties));
 
 		Binding producerBinding = binder.bindProducer("foo.bar",
 				moduleOutputChannel, outputBindingProperties.getProducer());
@@ -558,23 +602,25 @@ public class KafkaBinderTests extends
 		FailingInvocationCountingMessageHandler handler = new FailingInvocationCountingMessageHandler();
 		moduleInputChannel.subscribe(handler);
 
-		//Consumer for the DLQ destination
+		// Consumer for the DLQ destination
 		QueueChannel dlqChannel = new QueueChannel();
 		ExtendedConsumerProperties dlqConsumerProperties = createConsumerProperties();
 		dlqConsumerProperties.setMaxAttempts(1);
 
 		Binding dlqConsumerBinding = binder.bindConsumer(
-				"error.foo.bar." + "testDlqWithNativeEncoding-2", null, dlqChannel, dlqConsumerProperties);
+				"error.foo.bar." + "testDlqWithNativeEncoding-2", null, dlqChannel,
+				dlqConsumerProperties);
 		binderBindUnbindLatency();
 
-		Message message = org.springframework.integration.support.MessageBuilder.withPayload("foo")
-				.build();
+		Message message = org.springframework.integration.support.MessageBuilder
+				.withPayload("foo").build();
 
 		moduleOutputChannel.send(message);
 
 		Message receivedMessage = dlqChannel.receive(5000);
-		//Ensure that we didn't receive anything on DLQ because of serializer config missing
-		//on dlq producer while native Decoding is enabled.
+		// Ensure that we didn't receive anything on DLQ because of serializer config
+		// missing
+		// on dlq producer while native Decoding is enabled.
 		assertThat(receivedMessage).isNull();
 
 		binderBindUnbindLatency();
@@ -609,7 +655,8 @@ public class KafkaBinderTests extends
 		AbstractKafkaTestBinder binder = getBinder();
 
 		ExtendedProducerProperties producerProperties = createProducerProperties();
-		producerProperties.getExtension().setHeaderPatterns(new String[]{MessageHeaders.CONTENT_TYPE});
+		producerProperties.getExtension()
+				.setHeaderPatterns(new String[] { MessageHeaders.CONTENT_TYPE });
 		producerProperties.setHeaderMode(headerMode);
 
 		DirectChannel moduleOutputChannel = createBindableChannel("output",
@@ -624,7 +671,8 @@ public class KafkaBinderTests extends
 		consumerProperties.setHeaderMode(headerMode);
 		consumerProperties.setMultiplex(true);
 
-		DirectChannel moduleInputChannel = createBindableChannel("input", createConsumerBindingProperties(consumerProperties));
+		DirectChannel moduleInputChannel = createBindableChannel("input",
+				createConsumerBindingProperties(consumerProperties));
 
 		QueueChannel dlqChannel = new QueueChannel();
 		FailingInvocationCountingMessageHandler handler = new FailingInvocationCountingMessageHandler();
@@ -641,91 +689,114 @@ public class KafkaBinderTests extends
 
 		MessageListenerContainer container = TestUtils.getPropertyValue(consumerBinding,
 				"lifecycle.messageListenerContainer", MessageListenerContainer.class);
-		assertThat(container.getContainerProperties().getTopicPartitions().length).isEqualTo(2);
+		assertThat(container.getContainerProperties().getTopicPartitions().length)
+				.isEqualTo(2);
 
 		ExtendedConsumerProperties dlqConsumerProperties = createConsumerProperties();
 		dlqConsumerProperties.setMaxAttempts(1);
 		dlqConsumerProperties.setHeaderMode(headerMode);
 
-		ApplicationContext context = TestUtils.getPropertyValue(binder.getBinder(), "applicationContext",
-				ApplicationContext.class);
+		ApplicationContext context = TestUtils.getPropertyValue(binder.getBinder(),
+				"applicationContext", ApplicationContext.class);
 		SubscribableChannel boundErrorChannel = context
 				.getBean(consumerDest + ".testGroup.errors-0", SubscribableChannel.class);
-		SubscribableChannel globalErrorChannel = context.getBean("errorChannel", SubscribableChannel.class);
+		SubscribableChannel globalErrorChannel = context.getBean("errorChannel",
+				SubscribableChannel.class);
 		final AtomicReference> boundErrorChannelMessage = new AtomicReference<>();
 		final AtomicReference> globalErrorChannelMessage = new AtomicReference<>();
 		final AtomicBoolean hasRecovererInCallStack = new AtomicBoolean(!withRetry);
 		boundErrorChannel.subscribe(message -> {
 			boundErrorChannelMessage.set(message);
 			String stackTrace = Arrays.toString(new RuntimeException().getStackTrace());
-			hasRecovererInCallStack.set(stackTrace.contains("ErrorMessageSendingRecoverer"));
+			hasRecovererInCallStack
+					.set(stackTrace.contains("ErrorMessageSendingRecoverer"));
 		});
 		globalErrorChannel.subscribe(globalErrorChannelMessage::set);
 
 		Binding dlqConsumerBinding = binder.bindConsumer(
-				"error.dlqTest." + uniqueBindingId + ".0.testGroup", null, dlqChannel, dlqConsumerProperties);
+				"error.dlqTest." + uniqueBindingId + ".0.testGroup", null, dlqChannel,
+				dlqConsumerProperties);
 		binderBindUnbindLatency();
 		String testMessagePayload = "test." + UUID.randomUUID().toString();
-		Message testMessage = MessageBuilder.withPayload(testMessagePayload.getBytes()).build();
+		Message testMessage = MessageBuilder
+				.withPayload(testMessagePayload.getBytes()).build();
 		moduleOutputChannel.send(testMessage);
 
 		Message receivedMessage = receive(dlqChannel, 3);
 		assertThat(receivedMessage).isNotNull();
 		assertThat(receivedMessage.getPayload()).isEqualTo(testMessagePayload.getBytes());
 		if (HeaderMode.embeddedHeaders.equals(headerMode)) {
-			assertThat(handler.getInvocationCount()).isEqualTo(consumerProperties.getMaxAttempts());
+			assertThat(handler.getInvocationCount())
+					.isEqualTo(consumerProperties.getMaxAttempts());
 
-			assertThat(receivedMessage.getHeaders().get(KafkaMessageChannelBinder.X_ORIGINAL_TOPIC))
-					.isEqualTo(producerName);
+			assertThat(receivedMessage.getHeaders()
+					.get(KafkaMessageChannelBinder.X_ORIGINAL_TOPIC))
+							.isEqualTo(producerName);
 
-			assertThat(receivedMessage.getHeaders().get(KafkaMessageChannelBinder.X_ORIGINAL_PARTITION)).isEqualTo(0);
+			assertThat(receivedMessage.getHeaders()
+					.get(KafkaMessageChannelBinder.X_ORIGINAL_PARTITION)).isEqualTo(0);
 
-			assertThat(receivedMessage.getHeaders().get(KafkaMessageChannelBinder.X_ORIGINAL_OFFSET))
-					.isEqualTo(0);
+			assertThat(receivedMessage.getHeaders()
+					.get(KafkaMessageChannelBinder.X_ORIGINAL_OFFSET)).isEqualTo(0);
 
-			assertThat(receivedMessage.getHeaders().get(KafkaMessageChannelBinder.X_ORIGINAL_TIMESTAMP)).isNotNull();
+			assertThat(receivedMessage.getHeaders()
+					.get(KafkaMessageChannelBinder.X_ORIGINAL_TIMESTAMP)).isNotNull();
 
-			assertThat(receivedMessage.getHeaders().get(KafkaMessageChannelBinder.X_ORIGINAL_TIMESTAMP_TYPE))
-					.isEqualTo(TimestampType.CREATE_TIME.toString());
+			assertThat(receivedMessage.getHeaders()
+					.get(KafkaMessageChannelBinder.X_ORIGINAL_TIMESTAMP_TYPE))
+							.isEqualTo(TimestampType.CREATE_TIME.toString());
 
-			assertThat(((String) receivedMessage.getHeaders().get(KafkaMessageChannelBinder.X_EXCEPTION_MESSAGE)))
-					.startsWith("Dispatcher failed to deliver Message; nested exception is java.lang.RuntimeException: fail");
-			assertThat(receivedMessage.getHeaders().get(KafkaMessageChannelBinder.X_EXCEPTION_STACKTRACE))
-					.isNotNull();
-			assertThat(receivedMessage.getHeaders().get(KafkaMessageChannelBinder.X_EXCEPTION_FQCN)).isNotNull();
+			assertThat(((String) receivedMessage.getHeaders()
+					.get(KafkaMessageChannelBinder.X_EXCEPTION_MESSAGE))).startsWith(
+							"Dispatcher failed to deliver Message; nested exception "
+									+ "is java.lang.RuntimeException: fail");
+			assertThat(receivedMessage.getHeaders()
+					.get(KafkaMessageChannelBinder.X_EXCEPTION_STACKTRACE)).isNotNull();
+			assertThat(receivedMessage.getHeaders()
+					.get(KafkaMessageChannelBinder.X_EXCEPTION_FQCN)).isNotNull();
 		}
 		else if (!HeaderMode.none.equals(headerMode)) {
-			assertThat(handler.getInvocationCount()).isEqualTo(consumerProperties.getMaxAttempts());
+			assertThat(handler.getInvocationCount())
+					.isEqualTo(consumerProperties.getMaxAttempts());
 
-			assertThat(receivedMessage.getHeaders().get(KafkaMessageChannelBinder.X_ORIGINAL_TOPIC))
-					.isEqualTo(producerName.getBytes(StandardCharsets.UTF_8));
+			assertThat(receivedMessage.getHeaders()
+					.get(KafkaMessageChannelBinder.X_ORIGINAL_TOPIC))
+							.isEqualTo(producerName.getBytes(StandardCharsets.UTF_8));
 
-			assertThat(receivedMessage.getHeaders().get(KafkaMessageChannelBinder.X_ORIGINAL_PARTITION))
-					.isEqualTo(ByteBuffer.allocate(Integer.BYTES).putInt(0).array());
+			assertThat(receivedMessage.getHeaders()
+					.get(KafkaMessageChannelBinder.X_ORIGINAL_PARTITION)).isEqualTo(
+							ByteBuffer.allocate(Integer.BYTES).putInt(0).array());
 
-			assertThat(receivedMessage.getHeaders().get(KafkaMessageChannelBinder.X_ORIGINAL_OFFSET))
-					.isEqualTo(ByteBuffer.allocate(Long.BYTES).putLong(0).array());
+			assertThat(receivedMessage.getHeaders()
+					.get(KafkaMessageChannelBinder.X_ORIGINAL_OFFSET)).isEqualTo(
+							ByteBuffer.allocate(Long.BYTES).putLong(0).array());
 
+			assertThat(receivedMessage.getHeaders()
+					.get(KafkaMessageChannelBinder.X_ORIGINAL_TIMESTAMP)).isNotNull();
 
-			assertThat(receivedMessage.getHeaders().get(KafkaMessageChannelBinder.X_ORIGINAL_TIMESTAMP)).isNotNull();
+			assertThat(receivedMessage.getHeaders()
+					.get(KafkaMessageChannelBinder.X_ORIGINAL_TIMESTAMP_TYPE))
+							.isEqualTo(TimestampType.CREATE_TIME.toString().getBytes());
 
-			assertThat(receivedMessage.getHeaders().get(KafkaMessageChannelBinder.X_ORIGINAL_TIMESTAMP_TYPE))
-					.isEqualTo(TimestampType.CREATE_TIME.toString().getBytes());
+			assertThat(new String((byte[]) receivedMessage.getHeaders()
+					.get(KafkaMessageChannelBinder.X_EXCEPTION_MESSAGE))).startsWith(
+							"Dispatcher failed to deliver Message; nested exception "
+									+ "is java.lang.RuntimeException: fail");
 
-			assertThat(new String((byte[]) receivedMessage.getHeaders().get(KafkaMessageChannelBinder.X_EXCEPTION_MESSAGE)))
-					.startsWith("Dispatcher failed to deliver Message; nested exception is java.lang.RuntimeException: fail");
+			assertThat(receivedMessage.getHeaders()
+					.get(KafkaMessageChannelBinder.X_EXCEPTION_STACKTRACE)).isNotNull();
 
-			assertThat(receivedMessage.getHeaders().get(KafkaMessageChannelBinder.X_EXCEPTION_STACKTRACE))
-					.isNotNull();
-
-			assertThat(receivedMessage.getHeaders().get(KafkaMessageChannelBinder.X_EXCEPTION_FQCN)).isNotNull();
+			assertThat(receivedMessage.getHeaders()
+					.get(KafkaMessageChannelBinder.X_EXCEPTION_FQCN)).isNotNull();
 		}
 		else {
-			assertThat(receivedMessage.getHeaders().get(KafkaMessageChannelBinder.X_ORIGINAL_TOPIC)).isNull();
+			assertThat(receivedMessage.getHeaders()
+					.get(KafkaMessageChannelBinder.X_ORIGINAL_TOPIC)).isNull();
 		}
 		binderBindUnbindLatency();
 
-		// verify we got a message on the dedicated error channel and the global (via bridge)
+		// verify we got a message on the dedicated error channel and the global (via
+		// bridge)
 		assertThat(boundErrorChannelMessage.get()).isNotNull();
 		assertThat(globalErrorChannelMessage.get()).isNotNull();
 		assertThat(hasRecovererInCallStack.get()).isEqualTo(withRetry);
@@ -753,37 +824,47 @@ public class KafkaBinderTests extends
 		consumerProperties.setBackOffMaxInterval(150);
 		consumerProperties.getExtension().setAutoRebalanceEnabled(false);
 
-		DirectChannel moduleInputChannel = createBindableChannel("input", createConsumerBindingProperties(consumerProperties));
+		DirectChannel moduleInputChannel = createBindableChannel("input",
+				createConsumerBindingProperties(consumerProperties));
 
 		FailingInvocationCountingMessageHandler handler = new FailingInvocationCountingMessageHandler();
 		moduleInputChannel.subscribe(handler);
 
 		long uniqueBindingId = System.currentTimeMillis();
-		Binding producerBinding = binder.bindProducer("retryTest." + uniqueBindingId + ".0",
-				moduleOutputChannel, producerProperties);
-		Binding consumerBinding = binder.bindConsumer("retryTest." + uniqueBindingId + ".0",
-				"testGroup", moduleInputChannel, consumerProperties);
+		Binding producerBinding = binder.bindProducer(
+				"retryTest." + uniqueBindingId + ".0", moduleOutputChannel,
+				producerProperties);
+		Binding consumerBinding = binder.bindConsumer(
+				"retryTest." + uniqueBindingId + ".0", "testGroup", moduleInputChannel,
+				consumerProperties);
 
 		String testMessagePayload = "test." + UUID.randomUUID().toString();
-		Message testMessage = MessageBuilder.withPayload(testMessagePayload.getBytes()).build();
+		Message testMessage = MessageBuilder
+				.withPayload(testMessagePayload.getBytes()).build();
 		moduleOutputChannel.send(testMessage);
 
-		assertThat(handler.getLatch().await((int) (timeoutMultiplier * 1000), TimeUnit.MILLISECONDS));
+		assertThat(handler.getLatch().await((int) (timeoutMultiplier * 1000),
+				TimeUnit.MILLISECONDS));
 		// first attempt fails
 		assertThat(handler.getReceivedMessages().entrySet()).hasSize(1);
-		Message receivedMessage = handler.getReceivedMessages().entrySet().iterator().next().getValue();
+		Message receivedMessage = handler.getReceivedMessages().entrySet().iterator()
+				.next().getValue();
 		assertThat(receivedMessage).isNotNull();
-		assertThat(new String((byte[])receivedMessage.getPayload(), StandardCharsets.UTF_8)).isEqualTo(testMessagePayload);
-		assertThat(handler.getInvocationCount()).isEqualTo(consumerProperties.getMaxAttempts());
+		assertThat(
+				new String((byte[]) receivedMessage.getPayload(), StandardCharsets.UTF_8))
+						.isEqualTo(testMessagePayload);
+		assertThat(handler.getInvocationCount())
+				.isEqualTo(consumerProperties.getMaxAttempts());
 		consumerBinding.unbind();
 
 		// on the second attempt the message is redelivered
 		QueueChannel successfulInputChannel = new QueueChannel();
-		consumerBinding = binder.bindConsumer("retryTest." + uniqueBindingId + ".0", "testGroup",
-				successfulInputChannel, consumerProperties);
+		consumerBinding = binder.bindConsumer("retryTest." + uniqueBindingId + ".0",
+				"testGroup", successfulInputChannel, consumerProperties);
 		binderBindUnbindLatency();
 		String testMessage2Payload = "test." + UUID.randomUUID().toString();
-		Message testMessage2 = MessageBuilder.withPayload(testMessage2Payload.getBytes()).build();
+		Message testMessage2 = MessageBuilder
+				.withPayload(testMessage2Payload.getBytes()).build();
 		moduleOutputChannel.send(testMessage2);
 
 		Message firstReceived = receive(successfulInputChannel);
@@ -812,23 +893,28 @@ public class KafkaBinderTests extends
 		consumerProperties.getExtension().setEnableDlq(true);
 		consumerProperties.getExtension().setAutoRebalanceEnabled(false);
 
-		DirectChannel moduleInputChannel = createBindableChannel("input", createConsumerBindingProperties(consumerProperties));
+		DirectChannel moduleInputChannel = createBindableChannel("input",
+				createConsumerBindingProperties(consumerProperties));
 
 		FailingInvocationCountingMessageHandler handler = new FailingInvocationCountingMessageHandler();
 		moduleInputChannel.subscribe(handler);
 		long uniqueBindingId = System.currentTimeMillis();
-		Binding producerBinding = binder.bindProducer("retryTest." + uniqueBindingId + ".0",
-				moduleOutputChannel, producerProperties);
-		Binding consumerBinding = binder.bindConsumer("retryTest." + uniqueBindingId + ".0",
-				"testGroup", moduleInputChannel, consumerProperties);
+		Binding producerBinding = binder.bindProducer(
+				"retryTest." + uniqueBindingId + ".0", moduleOutputChannel,
+				producerProperties);
+		Binding consumerBinding = binder.bindConsumer(
+				"retryTest." + uniqueBindingId + ".0", "testGroup", moduleInputChannel,
+				consumerProperties);
 		ExtendedConsumerProperties dlqConsumerProperties = createConsumerProperties();
 		dlqConsumerProperties.setMaxAttempts(1);
 		QueueChannel dlqChannel = new QueueChannel();
 		Binding dlqConsumerBinding = binder.bindConsumer(
-				"error.retryTest." + uniqueBindingId + ".0.testGroup", null, dlqChannel, dlqConsumerProperties);
+				"error.retryTest." + uniqueBindingId + ".0.testGroup", null, dlqChannel,
+				dlqConsumerProperties);
 
 		String testMessagePayload = "test." + UUID.randomUUID().toString();
-		Message testMessage = MessageBuilder.withPayload(testMessagePayload.getBytes()).build();
+		Message testMessage = MessageBuilder
+				.withPayload(testMessagePayload.getBytes()).build();
 		moduleOutputChannel.send(testMessage);
 
 		Message dlqMessage = receive(dlqChannel, 3);
@@ -837,24 +923,30 @@ public class KafkaBinderTests extends
 
 		// first attempt fails
 		assertThat(handler.getReceivedMessages().entrySet()).hasSize(1);
-		Message handledMessage = handler.getReceivedMessages().entrySet().iterator().next().getValue();
+		Message handledMessage = handler.getReceivedMessages().entrySet().iterator()
+				.next().getValue();
 		assertThat(handledMessage).isNotNull();
-		assertThat(new String((byte[])handledMessage.getPayload(), StandardCharsets.UTF_8)).isEqualTo(testMessagePayload);
-		assertThat(handler.getInvocationCount()).isEqualTo(consumerProperties.getMaxAttempts());
+		assertThat(
+				new String((byte[]) handledMessage.getPayload(), StandardCharsets.UTF_8))
+						.isEqualTo(testMessagePayload);
+		assertThat(handler.getInvocationCount())
+				.isEqualTo(consumerProperties.getMaxAttempts());
 		binderBindUnbindLatency();
 		dlqConsumerBinding.unbind();
 		consumerBinding.unbind();
 
 		// on the second attempt the message is not redelivered because the DLQ is set
 		QueueChannel successfulInputChannel = new QueueChannel();
-		consumerBinding = binder.bindConsumer("retryTest." + uniqueBindingId + ".0", "testGroup",
-				successfulInputChannel, consumerProperties);
+		consumerBinding = binder.bindConsumer("retryTest." + uniqueBindingId + ".0",
+				"testGroup", successfulInputChannel, consumerProperties);
 		String testMessage2Payload = "test." + UUID.randomUUID().toString();
-		Message testMessage2 = MessageBuilder.withPayload(testMessage2Payload.getBytes()).build();
+		Message testMessage2 = MessageBuilder
+				.withPayload(testMessage2Payload.getBytes()).build();
 		moduleOutputChannel.send(testMessage2);
 
 		Message receivedMessage = receive(successfulInputChannel);
-		assertThat(receivedMessage.getPayload()).isEqualTo(testMessage2Payload.getBytes());
+		assertThat(receivedMessage.getPayload())
+				.isEqualTo(testMessage2Payload.getBytes());
 
 		binderBindUnbindLatency();
 		consumerBinding.unbind();
@@ -881,24 +973,28 @@ public class KafkaBinderTests extends
 		DirectChannel moduleOutputChannel = createBindableChannel("output",
 				producerBindingProperties);
 
-		DirectChannel moduleInputChannel = createBindableChannel("input", createConsumerBindingProperties(consumerProperties));
+		DirectChannel moduleInputChannel = createBindableChannel("input",
+				createConsumerBindingProperties(consumerProperties));
 
 		FailingInvocationCountingMessageHandler handler = new FailingInvocationCountingMessageHandler();
 		moduleInputChannel.subscribe(handler);
 
 		long uniqueBindingId = System.currentTimeMillis();
-		Binding producerBinding = binder.bindProducer("retryTest." + uniqueBindingId + ".0",
-				moduleOutputChannel, producerProperties);
-		Binding consumerBinding = binder.bindConsumer("retryTest." + uniqueBindingId + ".0",
-				"testGroup", moduleInputChannel, consumerProperties);
+		Binding producerBinding = binder.bindProducer(
+				"retryTest." + uniqueBindingId + ".0", moduleOutputChannel,
+				producerProperties);
+		Binding consumerBinding = binder.bindConsumer(
+				"retryTest." + uniqueBindingId + ".0", "testGroup", moduleInputChannel,
+				consumerProperties);
 		ExtendedConsumerProperties dlqConsumerProperties = createConsumerProperties();
 		dlqConsumerProperties.setMaxAttempts(1);
 		QueueChannel dlqChannel = new QueueChannel();
-		Binding dlqConsumerBinding = binder.bindConsumer(dlqName, null, dlqChannel,
-				dlqConsumerProperties);
+		Binding dlqConsumerBinding = binder.bindConsumer(dlqName, null,
+				dlqChannel, dlqConsumerProperties);
 
 		String testMessagePayload = "test." + UUID.randomUUID().toString();
-		Message testMessage = MessageBuilder.withPayload(testMessagePayload.getBytes()).build();
+		Message testMessage = MessageBuilder
+				.withPayload(testMessagePayload.getBytes()).build();
 		moduleOutputChannel.send(testMessage);
 
 		Message dlqMessage = receive(dlqChannel, 3);
@@ -907,24 +1003,30 @@ public class KafkaBinderTests extends
 
 		// first attempt fails
 		assertThat(handler.getReceivedMessages().entrySet()).hasSize(1);
-		Message handledMessage = handler.getReceivedMessages().entrySet().iterator().next().getValue();
+		Message handledMessage = handler.getReceivedMessages().entrySet().iterator()
+				.next().getValue();
 		assertThat(handledMessage).isNotNull();
-		assertThat(new String((byte[])handledMessage.getPayload(), StandardCharsets.UTF_8)).isEqualTo(testMessagePayload);
-		assertThat(handler.getInvocationCount()).isEqualTo(consumerProperties.getMaxAttempts());
+		assertThat(
+				new String((byte[]) handledMessage.getPayload(), StandardCharsets.UTF_8))
+						.isEqualTo(testMessagePayload);
+		assertThat(handler.getInvocationCount())
+				.isEqualTo(consumerProperties.getMaxAttempts());
 		binderBindUnbindLatency();
 		dlqConsumerBinding.unbind();
 		consumerBinding.unbind();
 
 		// on the second attempt the message is not redelivered because the DLQ is set
 		QueueChannel successfulInputChannel = new QueueChannel();
-		consumerBinding = binder.bindConsumer("retryTest." + uniqueBindingId + ".0", "testGroup",
-				successfulInputChannel, consumerProperties);
+		consumerBinding = binder.bindConsumer("retryTest." + uniqueBindingId + ".0",
+				"testGroup", successfulInputChannel, consumerProperties);
 		String testMessage2Payload = "test." + UUID.randomUUID().toString();
-		Message testMessage2 = MessageBuilder.withPayload(testMessage2Payload.getBytes()).build();
+		Message testMessage2 = MessageBuilder
+				.withPayload(testMessage2Payload.getBytes()).build();
 		moduleOutputChannel.send(testMessage2);
 
 		Message receivedMessage = receive(successfulInputChannel);
-		assertThat(receivedMessage.getPayload()).isEqualTo(testMessage2Payload.getBytes());
+		assertThat(receivedMessage.getPayload())
+				.isEqualTo(testMessage2Payload.getBytes());
 
 		binderBindUnbindLatency();
 		consumerBinding.unbind();
@@ -938,11 +1040,14 @@ public class KafkaBinderTests extends
 
 	@Test
 	@SuppressWarnings("unchecked")
-	//TODO: This test needs to be rethought - sending byte[] without explicit content type - yet being converted by the json converter
+	// TODO: This test needs to be rethought - sending byte[] without explicit content
+	// type
+	// - yet being converted by the json converter
 	public void testCompression() throws Exception {
-		final KafkaProducerProperties.CompressionType[] codecs = new KafkaProducerProperties.CompressionType[]{
-				KafkaProducerProperties.CompressionType.none, KafkaProducerProperties.CompressionType.gzip,
-				KafkaProducerProperties.CompressionType.snappy};
+		final KafkaProducerProperties.CompressionType[] codecs = new KafkaProducerProperties.CompressionType[] {
+				KafkaProducerProperties.CompressionType.none,
+				KafkaProducerProperties.CompressionType.gzip,
+				KafkaProducerProperties.CompressionType.snappy };
 		byte[] testPayload = new byte[2048];
 		Arrays.fill(testPayload, (byte) 65);
 		Binder binder = getBinder();
@@ -956,14 +1061,15 @@ public class KafkaBinderTests extends
 
 			ExtendedConsumerProperties consumerProperties = createConsumerProperties();
 
-			DirectChannel moduleInputChannel = createBindableChannel("input", createConsumerBindingProperties(consumerProperties));
+			DirectChannel moduleInputChannel = createBindableChannel("input",
+					createConsumerBindingProperties(consumerProperties));
 
-			Binding producerBinding = binder.bindProducer("testCompression", moduleOutputChannel,
-					producerProperties);
-			Binding consumerBinding = binder.bindConsumer("testCompression", "test", moduleInputChannel,
-					consumerProperties);
-			Message message = org.springframework.integration.support.MessageBuilder.withPayload(testPayload)
-					.build();
+			Binding producerBinding = binder.bindProducer(
+					"testCompression", moduleOutputChannel, producerProperties);
+			Binding consumerBinding = binder.bindConsumer(
+					"testCompression", "test", moduleInputChannel, consumerProperties);
+			Message message = org.springframework.integration.support.MessageBuilder
+					.withPayload(testPayload).build();
 			// Let the consumer actually bind to the producer before sending a msg
 			binderBindUnbindLatency();
 			moduleOutputChannel.send(message);
@@ -995,22 +1101,28 @@ public class KafkaBinderTests extends
 
 		try {
 			Binder binder = getBinder();
-			BindingProperties producerBindingProperties = createProducerBindingProperties(createProducerProperties());
-			DirectChannel output = createBindableChannel("output", producerBindingProperties);
+			BindingProperties producerBindingProperties = createProducerBindingProperties(
+					createProducerProperties());
+			DirectChannel output = createBindableChannel("output",
+					producerBindingProperties);
 
 			ExtendedConsumerProperties consumerProperties = createConsumerProperties();
 			consumerProperties.getExtension().setAutoRebalanceEnabled(false);
-			consumerProperties.getExtension().setStartOffset(KafkaConsumerProperties.StartOffset.earliest);
+			consumerProperties.getExtension()
+					.setStartOffset(KafkaConsumerProperties.StartOffset.earliest);
 			consumerProperties.getExtension().setAutoRebalanceEnabled(false);
 
-			DirectChannel input1 = createBindableChannel("input", createConsumerBindingProperties(consumerProperties));
+			DirectChannel input1 = createBindableChannel("input",
+					createConsumerBindingProperties(consumerProperties));
 
 			String testTopicName = UUID.randomUUID().toString();
-			producerBinding = binder.bindProducer(testTopicName, output, producerBindingProperties.getProducer());
+			producerBinding = binder.bindProducer(testTopicName, output,
+					producerBindingProperties.getProducer());
 			String testPayload1 = "foo-" + UUID.randomUUID().toString();
 			output.send(new GenericMessage<>(testPayload1.getBytes()));
 
-			consumerBinding = binder.bindConsumer(testTopicName, "startOffsets", input1, consumerProperties);
+			consumerBinding = binder.bindConsumer(testTopicName, "startOffsets", input1,
+					consumerProperties);
 			CountDownLatch latch = new CountDownLatch(1);
 			AtomicReference> inboundMessageRef1 = new AtomicReference<>();
 			MessageHandler messageHandler = message1 -> {
@@ -1041,7 +1153,8 @@ public class KafkaBinderTests extends
 			Assert.isTrue(latch1.await(5, TimeUnit.SECONDS), "Failed to receive message");
 
 			assertThat(inboundMessageRef2.get()).isNotNull();
-			assertThat(new String(inboundMessageRef2.get().getPayload(), StandardCharsets.UTF_8)).isEqualTo(testPayload2);
+			assertThat(new String(inboundMessageRef2.get().getPayload(),
+					StandardCharsets.UTF_8)).isEqualTo(testPayload2);
 			Thread.sleep(2000);
 			producerBinding.unbind();
 			consumerBinding.unbind();
@@ -1069,24 +1182,24 @@ public class KafkaBinderTests extends
 
 		QueueChannel moduleInputChannel = new QueueChannel();
 
-		Binding producerBinding1 = binder.bindProducer("foo.x", moduleOutputChannel1,
-				createProducerProperties());
-		Binding producerBinding2 = binder.bindProducer("foo.y", moduleOutputChannel2,
-				createProducerProperties());
+		Binding producerBinding1 = binder.bindProducer("foo.x",
+				moduleOutputChannel1, createProducerProperties());
+		Binding producerBinding2 = binder.bindProducer("foo.y",
+				moduleOutputChannel2, createProducerProperties());
 
 		ExtendedConsumerProperties consumerProperties = createConsumerProperties();
 		consumerProperties.getExtension().setAutoRebalanceEnabled(false);
-		Binding consumerBinding1 = binder.bindConsumer("foo.x", "test", moduleInputChannel,
-				consumerProperties);
-		Binding consumerBinding2 = binder.bindConsumer("foo.y", "test", moduleInputChannel,
-				consumerProperties);
+		Binding consumerBinding1 = binder.bindConsumer("foo.x", "test",
+				moduleInputChannel, consumerProperties);
+		Binding consumerBinding2 = binder.bindConsumer("foo.y", "test",
+				moduleInputChannel, consumerProperties);
 
 		String testPayload1 = "foo" + UUID.randomUUID().toString();
-		Message message1 = org.springframework.integration.support.MessageBuilder.withPayload(
-				testPayload1.getBytes()).build();
+		Message message1 = org.springframework.integration.support.MessageBuilder
+				.withPayload(testPayload1.getBytes()).build();
 		String testPayload2 = "foo" + UUID.randomUUID().toString();
-		Message message2 = org.springframework.integration.support.MessageBuilder.withPayload(
-				testPayload2.getBytes()).build();
+		Message message2 = org.springframework.integration.support.MessageBuilder
+				.withPayload(testPayload2.getBytes()).build();
 
 		// Let the consumer actually bind to the producer before sending a msg
 		binderBindUnbindLatency();
@@ -1099,8 +1212,8 @@ public class KafkaBinderTests extends
 
 		assertThat(messages[0]).isNotNull();
 		assertThat(messages[1]).isNotNull();
-		assertThat(messages).extracting("payload").containsExactlyInAnyOrder(testPayload1.getBytes(),
-				testPayload2.getBytes());
+		assertThat(messages).extracting("payload").containsExactlyInAnyOrder(
+				testPayload1.getBytes(), testPayload2.getBytes());
 
 		producerBinding1.unbind();
 		producerBinding2.unbind();
@@ -1119,19 +1232,19 @@ public class KafkaBinderTests extends
 		QueueChannel moduleInputChannel = new QueueChannel();
 
 		Binding producerBinding = binder.bindProducer(
-				"testManualAckSucceedsWhenAutoCommitOffsetIsTurnedOff", moduleOutputChannel,
-				createProducerProperties());
+				"testManualAckSucceedsWhenAutoCommitOffsetIsTurnedOff",
+				moduleOutputChannel, createProducerProperties());
 
 		ExtendedConsumerProperties consumerProperties = createConsumerProperties();
 		consumerProperties.getExtension().setAutoCommitOffset(false);
 
 		Binding consumerBinding = binder.bindConsumer(
-				"testManualAckSucceedsWhenAutoCommitOffsetIsTurnedOff", "test", moduleInputChannel,
-				consumerProperties);
+				"testManualAckSucceedsWhenAutoCommitOffsetIsTurnedOff", "test",
+				moduleInputChannel, consumerProperties);
 
 		String testPayload1 = "foo" + UUID.randomUUID().toString();
-		Message message1 = org.springframework.integration.support.MessageBuilder.withPayload(
-				testPayload1.getBytes()).build();
+		Message message1 = org.springframework.integration.support.MessageBuilder
+				.withPayload(testPayload1.getBytes()).build();
 
 		// Let the consumer actually bind to the producer before sending a msg
 		binderBindUnbindLatency();
@@ -1139,9 +1252,10 @@ public class KafkaBinderTests extends
 
 		Message receivedMessage = receive(moduleInputChannel);
 		assertThat(receivedMessage).isNotNull();
-		assertThat(receivedMessage.getHeaders().get(KafkaHeaders.ACKNOWLEDGMENT)).isNotNull();
-		Acknowledgment acknowledgment = receivedMessage.getHeaders().get(KafkaHeaders.ACKNOWLEDGMENT,
-				Acknowledgment.class);
+		assertThat(receivedMessage.getHeaders().get(KafkaHeaders.ACKNOWLEDGMENT))
+				.isNotNull();
+		Acknowledgment acknowledgment = receivedMessage.getHeaders()
+				.get(KafkaHeaders.ACKNOWLEDGMENT, Acknowledgment.class);
 		try {
 			acknowledgment.acknowledge();
 		}
@@ -1156,7 +1270,8 @@ public class KafkaBinderTests extends
 
 	@Test
 	@SuppressWarnings("unchecked")
-	public void testManualAckIsNotPossibleWhenAutoCommitOffsetIsEnabledOnTheBinder() throws Exception {
+	public void testManualAckIsNotPossibleWhenAutoCommitOffsetIsEnabledOnTheBinder()
+			throws Exception {
 		Binder binder = getBinder();
 
 		DirectChannel moduleOutputChannel = createBindableChannel("output",
@@ -1164,23 +1279,24 @@ public class KafkaBinderTests extends
 		QueueChannel moduleInputChannel = new QueueChannel();
 
 		Binding producerBinding = binder.bindProducer(
-				"testManualAckIsNotPossibleWhenAutoCommitOffsetIsEnabledOnTheBinder", moduleOutputChannel,
-				createProducerProperties());
+				"testManualAckIsNotPossibleWhenAutoCommitOffsetIsEnabledOnTheBinder",
+				moduleOutputChannel, createProducerProperties());
 
 		ExtendedConsumerProperties consumerProperties = createConsumerProperties();
 
 		Binding consumerBinding = binder.bindConsumer(
-				"testManualAckIsNotPossibleWhenAutoCommitOffsetIsEnabledOnTheBinder", "test", moduleInputChannel,
-				consumerProperties);
+				"testManualAckIsNotPossibleWhenAutoCommitOffsetIsEnabledOnTheBinder",
+				"test", moduleInputChannel, consumerProperties);
 
-
-		AbstractMessageListenerContainer container = TestUtils.getPropertyValue(consumerBinding,
-				"lifecycle.messageListenerContainer", AbstractMessageListenerContainer.class);
-		assertThat(container.getContainerProperties().getAckMode()).isEqualTo(ContainerProperties.AckMode.BATCH);
+		AbstractMessageListenerContainer container = TestUtils.getPropertyValue(
+				consumerBinding, "lifecycle.messageListenerContainer",
+				AbstractMessageListenerContainer.class);
+		assertThat(container.getContainerProperties().getAckMode())
+				.isEqualTo(ContainerProperties.AckMode.BATCH);
 
 		String testPayload1 = "foo" + UUID.randomUUID().toString();
-		Message message1 = org.springframework.integration.support.MessageBuilder.withPayload(
-				testPayload1.getBytes()).build();
+		Message message1 = org.springframework.integration.support.MessageBuilder
+				.withPayload(testPayload1.getBytes()).build();
 
 		// Let the consumer actually bind to the producer before sending a msg
 		binderBindUnbindLatency();
@@ -1188,7 +1304,8 @@ public class KafkaBinderTests extends
 
 		Message receivedMessage = receive(moduleInputChannel);
 		assertThat(receivedMessage).isNotNull();
-		assertThat(receivedMessage.getHeaders().get(KafkaHeaders.ACKNOWLEDGMENT)).isNull();
+		assertThat(receivedMessage.getHeaders().get(KafkaHeaders.ACKNOWLEDGMENT))
+				.isNull();
 
 		producerBinding.unbind();
 		consumerBinding.unbind();
@@ -1201,12 +1318,15 @@ public class KafkaBinderTests extends
 		Binder binder = getBinder();
 		ExtendedProducerProperties producerProperties = createProducerProperties();
 
-		DirectChannel output = createBindableChannel("output", createProducerBindingProperties(producerProperties));
+		DirectChannel output = createBindableChannel("output",
+				createProducerBindingProperties(producerProperties));
 
-		String testDestination = "testDestination" + UUID.randomUUID().toString().replace("-", "");
+		String testDestination = "testDestination"
+				+ UUID.randomUUID().toString().replace("-", "");
 
 		producerProperties.setRequiredGroups("test1", "test2");
-		Binding producerBinding = binder.bindProducer(testDestination, output, producerProperties);
+		Binding producerBinding = binder.bindProducer(testDestination,
+				output, producerProperties);
 
 		String testPayload = "foo-" + UUID.randomUUID().toString();
 		output.send(new GenericMessage<>(testPayload.getBytes()));
@@ -1215,22 +1335,26 @@ public class KafkaBinderTests extends
 		ExtendedConsumerProperties consumerProperties = createConsumerProperties();
 		consumerProperties.getExtension().setAutoRebalanceEnabled(false);
 		consumerProperties.getExtension().setAckEachRecord(true);
-		Binding consumerBinding1 = binder.bindConsumer(testDestination, "test1", inbound1,
-				consumerProperties);
+		Binding consumerBinding1 = binder.bindConsumer(testDestination,
+				"test1", inbound1, consumerProperties);
 		QueueChannel inbound2 = new QueueChannel();
-		Binding consumerBinding2 = binder.bindConsumer(testDestination, "test2", inbound2,
-				consumerProperties);
+		Binding consumerBinding2 = binder.bindConsumer(testDestination,
+				"test2", inbound2, consumerProperties);
 
-		AbstractMessageListenerContainer container = TestUtils.getPropertyValue(consumerBinding2,
-				"lifecycle.messageListenerContainer", AbstractMessageListenerContainer.class);
-		assertThat(container.getContainerProperties().getAckMode()).isEqualTo(ContainerProperties.AckMode.RECORD);
+		AbstractMessageListenerContainer container = TestUtils.getPropertyValue(
+				consumerBinding2, "lifecycle.messageListenerContainer",
+				AbstractMessageListenerContainer.class);
+		assertThat(container.getContainerProperties().getAckMode())
+				.isEqualTo(ContainerProperties.AckMode.RECORD);
 
 		Message receivedMessage1 = receive(inbound1);
 		assertThat(receivedMessage1).isNotNull();
-		assertThat(new String((byte[]) receivedMessage1.getPayload(), StandardCharsets.UTF_8)).isEqualTo(testPayload);
+		assertThat(new String((byte[]) receivedMessage1.getPayload(),
+				StandardCharsets.UTF_8)).isEqualTo(testPayload);
 		Message receivedMessage2 = receive(inbound2);
 		assertThat(receivedMessage2).isNotNull();
-		assertThat(new String((byte[]) receivedMessage2.getPayload(), StandardCharsets.UTF_8)).isEqualTo(testPayload);
+		assertThat(new String((byte[]) receivedMessage2.getPayload(),
+				StandardCharsets.UTF_8)).isEqualTo(testPayload);
 
 		consumerBinding1.unbind();
 		consumerBinding2.unbind();
@@ -1251,29 +1375,37 @@ public class KafkaBinderTests extends
 		consumerProperties.getExtension().setAutoRebalanceEnabled(false);
 		QueueChannel input0 = new QueueChannel();
 		input0.setBeanName("test.input0S");
-		Binding input0Binding = binder.bindConsumer("part.0", "test", input0, consumerProperties);
+		Binding input0Binding = binder.bindConsumer("part.0", "test",
+				input0, consumerProperties);
 		consumerProperties.setInstanceIndex(1);
 		QueueChannel input1 = new QueueChannel();
 		input1.setBeanName("test.input1S");
-		Binding input1Binding = binder.bindConsumer("part.0", "test", input1, consumerProperties);
+		Binding input1Binding = binder.bindConsumer("part.0", "test",
+				input1, consumerProperties);
 		consumerProperties.setInstanceIndex(2);
 		QueueChannel input2 = new QueueChannel();
 		input2.setBeanName("test.input2S");
-		Binding input2Binding = binder.bindConsumer("part.0", "test", input2, consumerProperties);
+		Binding input2Binding = binder.bindConsumer("part.0", "test",
+				input2, consumerProperties);
 
 		ExtendedProducerProperties producerProperties = createProducerProperties();
-		producerProperties.setPartitionKeyExpression(spelExpressionParser.parseExpression("payload"));
-		producerProperties.setPartitionSelectorExpression(spelExpressionParser.parseExpression("hashCode()"));
+		producerProperties.setPartitionKeyExpression(
+				spelExpressionParser.parseExpression("payload"));
+		producerProperties.setPartitionSelectorExpression(
+				spelExpressionParser.parseExpression("hashCode()"));
 		producerProperties.setPartitionCount(3);
 		invokeCreateTopic("output", 6, 1);
 
-		DirectChannel output = createBindableChannel("output", createProducerBindingProperties(producerProperties));
+		DirectChannel output = createBindableChannel("output",
+				createProducerBindingProperties(producerProperties));
 		output.setBeanName("test.output");
-		Binding outputBinding = binder.bindProducer("part.0", output, producerProperties);
+		Binding outputBinding = binder.bindProducer("part.0", output,
+				producerProperties);
 		try {
 			Object endpoint = extractEndpoint(outputBinding);
 			assertThat(getEndpointRouting(endpoint))
-					.contains(getExpectedRoutingBaseDestination("part.0", "test") + "-' + headers['partition']");
+					.contains(getExpectedRoutingBaseDestination("part.0", "test")
+							+ "-' + headers['partition']");
 		}
 		catch (UnsupportedOperationException ignored) {
 		}
@@ -1281,11 +1413,13 @@ public class KafkaBinderTests extends
 		AtomicInteger count = new AtomicInteger();
 		interceptors.forEach(interceptor -> {
 			if (interceptor instanceof PartitioningInterceptor) {
-				count.set(TestUtils.getPropertyValue(interceptor, "partitionHandler.partitionCount", Integer.class));
+				count.set(TestUtils.getPropertyValue(interceptor,
+						"partitionHandler.partitionCount", Integer.class));
 			}
 		});
 		assertThat(count.get()).isEqualTo(6);
-		Message message2 = org.springframework.integration.support.MessageBuilder.withPayload(2)
+		Message message2 = org.springframework.integration.support.MessageBuilder
+				.withPayload(2)
 				.setHeader(IntegrationMessageHeaderAccessor.CORRELATION_ID, "foo")
 				.setHeader(IntegrationMessageHeaderAccessor.SEQUENCE_NUMBER, 42)
 				.setHeader(IntegrationMessageHeaderAccessor.SEQUENCE_SIZE, 43).build();
@@ -1304,8 +1438,10 @@ public class KafkaBinderTests extends
 
 			@Override
 			public boolean matches(Message value) {
-				IntegrationMessageHeaderAccessor accessor = new IntegrationMessageHeaderAccessor(value);
-				return "foo".equals(accessor.getCorrelationId()) && 42 == accessor.getSequenceNumber()
+				IntegrationMessageHeaderAccessor accessor = new IntegrationMessageHeaderAccessor(
+						value);
+				return "foo".equals(accessor.getCorrelationId())
+						&& 42 == accessor.getSequenceNumber()
 						&& 43 == accessor.getSequenceSize();
 			}
 		};
@@ -1313,20 +1449,26 @@ public class KafkaBinderTests extends
 		ObjectMapper om = new ObjectMapper();
 
 		if (usesExplicitRouting()) {
-			assertThat(om.readValue((byte[]) receive0.getPayload(), Integer.class)).isEqualTo(0);
-			assertThat(om.readValue((byte[]) receive1.getPayload(), Integer.class)).isEqualTo(1);
-			assertThat(om.readValue((byte[]) receive2.getPayload(), Integer.class)).isEqualTo(2);
+			assertThat(om.readValue((byte[]) receive0.getPayload(), Integer.class))
+					.isEqualTo(0);
+			assertThat(om.readValue((byte[]) receive1.getPayload(), Integer.class))
+					.isEqualTo(1);
+			assertThat(om.readValue((byte[]) receive2.getPayload(), Integer.class))
+					.isEqualTo(2);
 			assertThat(receive2).has(correlationHeadersForPayload2);
 		}
 		else {
-			List> receivedMessages = Arrays.asList(receive0, receive1, receive2);
-			assertThat(receivedMessages).extracting("payload").containsExactlyInAnyOrder(new byte[]{48}, new byte[]{49}, new byte[]{50});
+			List> receivedMessages = Arrays.asList(receive0, receive1,
+					receive2);
+			assertThat(receivedMessages).extracting("payload").containsExactlyInAnyOrder(
+					new byte[] { 48 }, new byte[] { 49 }, new byte[] { 50 });
 			Condition> payloadIs2 = new Condition>() {
 
 				@Override
 				public boolean matches(Message value) {
 					try {
-						return om.readValue((byte[]) value.getPayload(), Integer.class).equals(2);
+						return om.readValue((byte[]) value.getPayload(), Integer.class)
+								.equals(2);
 					}
 					catch (IOException e) {
 						//
@@ -1334,7 +1476,8 @@ public class KafkaBinderTests extends
 					return false;
 				}
 			};
-			assertThat(receivedMessages).filteredOn(payloadIs2).areExactly(1, correlationHeadersForPayload2);
+			assertThat(receivedMessages).filteredOn(payloadIs2).areExactly(1,
+					correlationHeadersForPayload2);
 
 		}
 		input0Binding.unbind();
@@ -1345,7 +1488,7 @@ public class KafkaBinderTests extends
 
 	@Test
 	@Override
-	@SuppressWarnings({"unchecked", "rawtypes"})
+	@SuppressWarnings({ "unchecked", "rawtypes" })
 	public void testPartitionedModuleJava() throws Exception {
 		Binder binder = getBinder();
 
@@ -1359,31 +1502,38 @@ public class KafkaBinderTests extends
 		consumerProperties.getExtension().setAutoRebalanceEnabled(false);
 		QueueChannel input0 = new QueueChannel();
 		input0.setBeanName("test.input0J");
-		Binding input0Binding = binder.bindConsumer("partJ.0", "test", input0, consumerProperties);
+		Binding input0Binding = binder.bindConsumer("partJ.0", "test",
+				input0, consumerProperties);
 		consumerProperties.setInstanceIndex(1);
 		QueueChannel input1 = new QueueChannel();
 		input1.setBeanName("test.input1J");
-		Binding input1Binding = binder.bindConsumer("partJ.0", "test", input1, consumerProperties);
+		Binding input1Binding = binder.bindConsumer("partJ.0", "test",
+				input1, consumerProperties);
 		consumerProperties.setInstanceIndex(2);
 		QueueChannel input2 = new QueueChannel();
 		input2.setBeanName("test.input2J");
-		Binding input2Binding = binder.bindConsumer("partJ.0", "test", input2, consumerProperties);
+		Binding input2Binding = binder.bindConsumer("partJ.0", "test",
+				input2, consumerProperties);
 		consumerProperties.setInstanceIndex(3);
 		QueueChannel input3 = new QueueChannel();
 		input3.setBeanName("test.input3J");
-		Binding input3Binding = binder.bindConsumer("partJ.0", "test", input3, consumerProperties);
+		Binding input3Binding = binder.bindConsumer("partJ.0", "test",
+				input3, consumerProperties);
 
 		ExtendedProducerProperties producerProperties = createProducerProperties();
 		producerProperties.setPartitionKeyExtractorClass(PartitionTestSupport.class);
 		producerProperties.setPartitionSelectorClass(PartitionTestSupport.class);
 		producerProperties.setPartitionCount(3); // overridden to 8 on the actual topic
-		DirectChannel output = createBindableChannel("output", createProducerBindingProperties(producerProperties));
+		DirectChannel output = createBindableChannel("output",
+				createProducerBindingProperties(producerProperties));
 		output.setBeanName("test.output");
-		Binding outputBinding = binder.bindProducer("partJ.0", output, producerProperties);
+		Binding outputBinding = binder.bindProducer("partJ.0", output,
+				producerProperties);
 		if (usesExplicitRouting()) {
 			Object endpoint = extractEndpoint(outputBinding);
 			assertThat(getEndpointRouting(endpoint))
-					.contains(getExpectedRoutingBaseDestination("partJ.0", "test") + "-' + headers['partition']");
+					.contains(getExpectedRoutingBaseDestination("partJ.0", "test")
+							+ "-' + headers['partition']");
 		}
 
 		output.send(new GenericMessage<>(2));
@@ -1401,10 +1551,14 @@ public class KafkaBinderTests extends
 		assertThat(receive3).isNotNull();
 		ObjectMapper om = new ObjectMapper();
 
-		assertThat(om.readValue((byte[]) receive0.getPayload(), Integer.class)).isEqualTo(0);
-		assertThat(om.readValue((byte[]) receive1.getPayload(), Integer.class)).isEqualTo(1);
-		assertThat(om.readValue((byte[]) receive2.getPayload(), Integer.class)).isEqualTo(2);
-		assertThat(om.readValue((byte[]) receive3.getPayload(), Integer.class)).isEqualTo(3);
+		assertThat(om.readValue((byte[]) receive0.getPayload(), Integer.class))
+				.isEqualTo(0);
+		assertThat(om.readValue((byte[]) receive1.getPayload(), Integer.class))
+				.isEqualTo(1);
+		assertThat(om.readValue((byte[]) receive2.getPayload(), Integer.class))
+				.isEqualTo(2);
+		assertThat(om.readValue((byte[]) receive3.getPayload(), Integer.class))
+				.isEqualTo(3);
 
 		input0Binding.unbind();
 		input1Binding.unbind();
@@ -1418,19 +1572,20 @@ public class KafkaBinderTests extends
 	@SuppressWarnings("unchecked")
 	public void testAnonymousGroup() throws Exception {
 		Binder binder = getBinder();
-		BindingProperties producerBindingProperties = createProducerBindingProperties(createProducerProperties());
+		BindingProperties producerBindingProperties = createProducerBindingProperties(
+				createProducerProperties());
 		DirectChannel output = createBindableChannel("output", producerBindingProperties);
-		Binding producerBinding = binder.bindProducer("defaultGroup.0", output,
-				producerBindingProperties.getProducer());
+		Binding producerBinding = binder.bindProducer("defaultGroup.0",
+				output, producerBindingProperties.getProducer());
 
 		QueueChannel input1 = new QueueChannel();
 		ExtendedConsumerProperties consumerProperties = createConsumerProperties();
-		Binding binding1 = binder.bindConsumer("defaultGroup.0", null, input1,
-				consumerProperties);
+		Binding binding1 = binder.bindConsumer("defaultGroup.0", null,
+				input1, consumerProperties);
 
 		QueueChannel input2 = new QueueChannel();
-		Binding binding2 = binder.bindConsumer("defaultGroup.0", null, input2,
-				consumerProperties);
+		Binding binding2 = binder.bindConsumer("defaultGroup.0", null,
+				input2, consumerProperties);
 		// Since we don't provide any topic info, let Kafka bind the consumer successfully
 		Thread.sleep(1000);
 		String testPayload1 = "foo-" + UUID.randomUUID().toString();
@@ -1438,18 +1593,21 @@ public class KafkaBinderTests extends
 
 		Message receivedMessage1 = (Message) receive(input1);
 		assertThat(receivedMessage1).isNotNull();
-		assertThat(new String(receivedMessage1.getPayload(), StandardCharsets.UTF_8)).isEqualTo(testPayload1);
+		assertThat(new String(receivedMessage1.getPayload(), StandardCharsets.UTF_8))
+				.isEqualTo(testPayload1);
 
 		Message receivedMessage2 = (Message) receive(input2);
 		assertThat(receivedMessage2).isNotNull();
-		assertThat(new String(receivedMessage2.getPayload(), StandardCharsets.UTF_8)).isEqualTo(testPayload1);
+		assertThat(new String(receivedMessage2.getPayload(), StandardCharsets.UTF_8))
+				.isEqualTo(testPayload1);
 
 		binding2.unbind();
 
 		String testPayload2 = "foo-" + UUID.randomUUID().toString();
 		output.send(new GenericMessage<>(testPayload2.getBytes()));
 
-		binding2 = binder.bindConsumer("defaultGroup.0", null, input2, consumerProperties);
+		binding2 = binder.bindConsumer("defaultGroup.0", null, input2,
+				consumerProperties);
 		// Since we don't provide any topic info, let Kafka bind the consumer successfully
 		Thread.sleep(1000);
 		String testPayload3 = "foo-" + UUID.randomUUID().toString();
@@ -1457,16 +1615,20 @@ public class KafkaBinderTests extends
 
 		receivedMessage1 = (Message) receive(input1);
 		assertThat(receivedMessage1).isNotNull();
-		assertThat(new String(receivedMessage1.getPayload(), StandardCharsets.UTF_8)).isEqualTo(testPayload2);
+		assertThat(new String(receivedMessage1.getPayload(), StandardCharsets.UTF_8))
+				.isEqualTo(testPayload2);
 		receivedMessage1 = (Message) receive(input1);
 		assertThat(receivedMessage1).isNotNull();
-		assertThat(new String(receivedMessage1.getPayload(), StandardCharsets.UTF_8)).isNotNull();
+		assertThat(new String(receivedMessage1.getPayload(), StandardCharsets.UTF_8))
+				.isNotNull();
 
 		receivedMessage2 = (Message) receive(input2);
 		assertThat(receivedMessage2).isNotNull();
-		assertThat(new String(receivedMessage2.getPayload(), StandardCharsets.UTF_8)).isEqualTo(testPayload3);
+		assertThat(new String(receivedMessage2.getPayload(), StandardCharsets.UTF_8))
+				.isEqualTo(testPayload3);
 
-		Map topicsInUse = ((KafkaTestBinder)binder).getCoreBinder().getTopicsInUse();
+		Map topicsInUse = ((KafkaTestBinder) binder)
+				.getCoreBinder().getTopicsInUse();
 		assertThat(topicsInUse.keySet()).contains("defaultGroup.0");
 		TopicInformation topic = topicsInUse.get("defaultGroup.0");
 		assertThat(topic.isConsumerTopic()).isTrue();
@@ -1487,9 +1649,11 @@ public class KafkaBinderTests extends
 		properties.setPartitionSelectorClass(RawKafkaPartitionTestSupport.class);
 		properties.setPartitionCount(6);
 
-		DirectChannel output = createBindableChannel("output", createProducerBindingProperties(properties));
+		DirectChannel output = createBindableChannel("output",
+				createProducerBindingProperties(properties));
 		output.setBeanName("test.output");
-		Binding outputBinding = binder.bindProducer("partJ.raw.0", output, properties);
+		Binding outputBinding = binder.bindProducer("partJ.raw.0", output,
+				properties);
 
 		ExtendedConsumerProperties consumerProperties = createConsumerProperties();
 		consumerProperties.setConcurrency(2);
@@ -1500,19 +1664,22 @@ public class KafkaBinderTests extends
 		consumerProperties.getExtension().setAutoRebalanceEnabled(false);
 		QueueChannel input0 = new QueueChannel();
 		input0.setBeanName("test.input0J");
-		Binding input0Binding = binder.bindConsumer("partJ.raw.0", "test", input0, consumerProperties);
+		Binding input0Binding = binder.bindConsumer("partJ.raw.0", "test",
+				input0, consumerProperties);
 		consumerProperties.setInstanceIndex(1);
 		QueueChannel input1 = new QueueChannel();
 		input1.setBeanName("test.input1J");
-		Binding input1Binding = binder.bindConsumer("partJ.raw.0", "test", input1, consumerProperties);
+		Binding input1Binding = binder.bindConsumer("partJ.raw.0", "test",
+				input1, consumerProperties);
 		consumerProperties.setInstanceIndex(2);
 		QueueChannel input2 = new QueueChannel();
 		input2.setBeanName("test.input2J");
-		Binding input2Binding = binder.bindConsumer("partJ.raw.0", "test", input2, consumerProperties);
+		Binding input2Binding = binder.bindConsumer("partJ.raw.0", "test",
+				input2, consumerProperties);
 
-		output.send(new GenericMessage<>(new byte[]{(byte) 0}));
-		output.send(new GenericMessage<>(new byte[]{(byte) 1}));
-		output.send(new GenericMessage<>(new byte[]{(byte) 2}));
+		output.send(new GenericMessage<>(new byte[] { (byte) 0 }));
+		output.send(new GenericMessage<>(new byte[] { (byte) 1 }));
+		output.send(new GenericMessage<>(new byte[] { (byte) 2 }));
 
 		Message receive0 = receive(input0);
 		assertThat(receive0).isNotNull();
@@ -1521,8 +1688,9 @@ public class KafkaBinderTests extends
 		Message receive2 = receive(input2);
 		assertThat(receive2).isNotNull();
 
-		assertThat(Arrays.asList(((byte[]) receive0.getPayload())[0], ((byte[]) receive1.getPayload())[0],
-				((byte[]) receive2.getPayload())[0])).containsExactlyInAnyOrder((byte) 0, (byte) 1, (byte) 2);
+		assertThat(Arrays.asList(((byte[]) receive0.getPayload())[0],
+				((byte[]) receive1.getPayload())[0], ((byte[]) receive2.getPayload())[0]))
+						.containsExactlyInAnyOrder((byte) 0, (byte) 1, (byte) 2);
 
 		input0Binding.unbind();
 		input1Binding.unbind();
@@ -1535,18 +1703,23 @@ public class KafkaBinderTests extends
 	public void testPartitionedModuleSpELWithRawMode() throws Exception {
 		Binder binder = getBinder();
 		ExtendedProducerProperties properties = createProducerProperties();
-		properties.setPartitionKeyExpression(spelExpressionParser.parseExpression("payload[0]"));
-		properties.setPartitionSelectorExpression(spelExpressionParser.parseExpression("hashCode()"));
+		properties.setPartitionKeyExpression(
+				spelExpressionParser.parseExpression("payload[0]"));
+		properties.setPartitionSelectorExpression(
+				spelExpressionParser.parseExpression("hashCode()"));
 		properties.setPartitionCount(6);
 		properties.setHeaderMode(HeaderMode.none);
 
-		DirectChannel output = createBindableChannel("output", createProducerBindingProperties(properties));
+		DirectChannel output = createBindableChannel("output",
+				createProducerBindingProperties(properties));
 		output.setBeanName("test.output");
-		Binding outputBinding = binder.bindProducer("part.raw.0", output, properties);
+		Binding outputBinding = binder.bindProducer("part.raw.0", output,
+				properties);
 		try {
 			Object endpoint = extractEndpoint(outputBinding);
 			assertThat(getEndpointRouting(endpoint))
-					.contains(getExpectedRoutingBaseDestination("part.raw.0", "test") + "-' + headers['partition']");
+					.contains(getExpectedRoutingBaseDestination("part.raw.0", "test")
+							+ "-' + headers['partition']");
 		}
 		catch (UnsupportedOperationException ignored) {
 		}
@@ -1560,31 +1733,37 @@ public class KafkaBinderTests extends
 		consumerProperties.getExtension().setAutoRebalanceEnabled(false);
 		QueueChannel input0 = new QueueChannel();
 		input0.setBeanName("test.input0S");
-		Binding input0Binding = binder.bindConsumer("part.raw.0", "test", input0, consumerProperties);
+		Binding input0Binding = binder.bindConsumer("part.raw.0", "test",
+				input0, consumerProperties);
 		consumerProperties.setInstanceIndex(1);
 		QueueChannel input1 = new QueueChannel();
 		input1.setBeanName("test.input1S");
-		Binding input1Binding = binder.bindConsumer("part.raw.0", "test", input1, consumerProperties);
+		Binding input1Binding = binder.bindConsumer("part.raw.0", "test",
+				input1, consumerProperties);
 		consumerProperties.setInstanceIndex(2);
 		QueueChannel input2 = new QueueChannel();
 		input2.setBeanName("test.input2S");
-		Binding input2Binding = binder.bindConsumer("part.raw.0", "test", input2, consumerProperties);
+		Binding input2Binding = binder.bindConsumer("part.raw.0", "test",
+				input2, consumerProperties);
 
-		Message message2 = org.springframework.integration.support.MessageBuilder.withPayload(new byte[]{2})
-				.setHeader(IntegrationMessageHeaderAccessor.CORRELATION_ID, "kafkaBinderTestCommonsDelegate")
+		Message message2 = org.springframework.integration.support.MessageBuilder
+				.withPayload(new byte[] { 2 })
+				.setHeader(IntegrationMessageHeaderAccessor.CORRELATION_ID,
+						"kafkaBinderTestCommonsDelegate")
 				.setHeader(IntegrationMessageHeaderAccessor.SEQUENCE_NUMBER, 42)
 				.setHeader(IntegrationMessageHeaderAccessor.SEQUENCE_SIZE, 43).build();
 		output.send(message2);
-		output.send(new GenericMessage<>(new byte[]{1}));
-		output.send(new GenericMessage<>(new byte[]{0}));
+		output.send(new GenericMessage<>(new byte[] { 1 }));
+		output.send(new GenericMessage<>(new byte[] { 0 }));
 		Message receive0 = receive(input0);
 		assertThat(receive0).isNotNull();
 		Message receive1 = receive(input1);
 		assertThat(receive1).isNotNull();
 		Message receive2 = receive(input2);
 		assertThat(receive2).isNotNull();
-		assertThat(Arrays.asList(((byte[]) receive0.getPayload())[0], ((byte[]) receive1.getPayload())[0],
-				((byte[]) receive2.getPayload())[0])).containsExactlyInAnyOrder((byte) 0, (byte) 1, (byte) 2);
+		assertThat(Arrays.asList(((byte[]) receive0.getPayload())[0],
+				((byte[]) receive1.getPayload())[0], ((byte[]) receive2.getPayload())[0]))
+						.containsExactlyInAnyOrder((byte) 0, (byte) 1, (byte) 2);
 		input0Binding.unbind();
 		input1Binding.unbind();
 		input2Binding.unbind();
@@ -1598,30 +1777,34 @@ public class KafkaBinderTests extends
 		ExtendedProducerProperties properties = createProducerProperties();
 		properties.setPartitionCount(6);
 
-		DirectChannel output = createBindableChannel("output", createProducerBindingProperties(properties));
+		DirectChannel output = createBindableChannel("output",
+				createProducerBindingProperties(properties));
 		output.setBeanName("test.output");
-		Binding outputBinding = binder.bindProducer("partNative.raw.0", output, properties);
+		Binding outputBinding = binder.bindProducer("partNative.raw.0",
+				output, properties);
 
 		ExtendedConsumerProperties consumerProperties = createConsumerProperties();
 		QueueChannel input0 = new QueueChannel();
 		input0.setBeanName("test.inputNative");
-		Binding inputBinding = binder.bindConsumer("partNative.raw.0", "test", input0, consumerProperties);
+		Binding inputBinding = binder.bindConsumer("partNative.raw.0",
+				"test", input0, consumerProperties);
 
-		output.send(
-				new GenericMessage<>("foo".getBytes(), Collections.singletonMap(KafkaHeaders.PARTITION_ID, 5)));
+		output.send(new GenericMessage<>("foo".getBytes(),
+				Collections.singletonMap(KafkaHeaders.PARTITION_ID, 5)));
 
 		Message received = receive(input0);
 		assertThat(received).isNotNull();
 
 		assertThat(received.getPayload()).isEqualTo("foo".getBytes());
-		assertThat(received.getHeaders().get(KafkaHeaders.RECEIVED_PARTITION_ID)).isEqualTo(5);
+		assertThat(received.getHeaders().get(KafkaHeaders.RECEIVED_PARTITION_ID))
+				.isEqualTo(5);
 
 		inputBinding.unbind();
 		outputBinding.unbind();
 	}
 
 	@Test
-	@SuppressWarnings({"unchecked", "rawtypes"})
+	@SuppressWarnings({ "unchecked", "rawtypes" })
 	public void testSendAndReceiveWithRawMode() throws Exception {
 		Binder binder = getBinder();
 
@@ -1632,12 +1815,13 @@ public class KafkaBinderTests extends
 
 		ExtendedConsumerProperties consumerProperties = createConsumerProperties();
 		consumerProperties.setHeaderMode(HeaderMode.none);
-		DirectChannel moduleInputChannel = createBindableChannel("input", createConsumerBindingProperties(consumerProperties));
-		Binding producerBinding = binder.bindProducer("raw.0", moduleOutputChannel,
-				producerProperties);
+		DirectChannel moduleInputChannel = createBindableChannel("input",
+				createConsumerBindingProperties(consumerProperties));
+		Binding producerBinding = binder.bindProducer("raw.0",
+				moduleOutputChannel, producerProperties);
 
-		Binding consumerBinding = binder.bindConsumer("raw.0", "test", moduleInputChannel,
-				consumerProperties);
+		Binding consumerBinding = binder.bindConsumer("raw.0", "test",
+				moduleInputChannel, consumerProperties);
 		Message message = org.springframework.integration.support.MessageBuilder
 				.withPayload("testSendAndReceiveWithRawMode".getBytes()).build();
 		// Let the consumer actually bind to the producer before sending a msg
@@ -1657,42 +1841,49 @@ public class KafkaBinderTests extends
 		Assert.isTrue(latch.await(5, TimeUnit.SECONDS), "Failed to receive message");
 
 		assertThat(inboundMessageRef.get()).isNotNull();
-		assertThat(new String(inboundMessageRef.get().getPayload(), StandardCharsets.UTF_8)).isEqualTo("testSendAndReceiveWithRawMode");
+		assertThat(
+				new String(inboundMessageRef.get().getPayload(), StandardCharsets.UTF_8))
+						.isEqualTo("testSendAndReceiveWithRawMode");
 		producerBinding.unbind();
 		consumerBinding.unbind();
 	}
 
-	@SuppressWarnings({"rawtypes", "unchecked"})
+	@SuppressWarnings({ "rawtypes", "unchecked" })
 	@Test
 	public void testProducerErrorChannel() throws Exception {
 		AbstractKafkaTestBinder binder = getBinder();
-		DirectChannel moduleOutputChannel = createBindableChannel("output", new BindingProperties());
+		DirectChannel moduleOutputChannel = createBindableChannel("output",
+				new BindingProperties());
 		ExtendedProducerProperties producerProps = new ExtendedProducerProperties<>(
 				new KafkaProducerProperties());
 		producerProps.setHeaderMode(HeaderMode.none);
 		producerProps.setErrorChannelEnabled(true);
-		Binding producerBinding = binder.bindProducer("ec.0", moduleOutputChannel, producerProps);
-		final Message message = MessageBuilder.withPayload("bad").setHeader(MessageHeaders.CONTENT_TYPE, "application/json")
-				.build();
-		SubscribableChannel ec = binder.getApplicationContext().getBean("ec.0.errors", SubscribableChannel.class);
+		Binding producerBinding = binder.bindProducer("ec.0",
+				moduleOutputChannel, producerProps);
+		final Message message = MessageBuilder.withPayload("bad")
+				.setHeader(MessageHeaders.CONTENT_TYPE, "application/json").build();
+		SubscribableChannel ec = binder.getApplicationContext().getBean("ec.0.errors",
+				SubscribableChannel.class);
 		final AtomicReference> errorMessage = new AtomicReference<>();
 		final CountDownLatch latch = new CountDownLatch(2);
 		ec.subscribe(message1 -> {
 			errorMessage.set(message1);
 			latch.countDown();
 		});
-		SubscribableChannel globalEc = binder.getApplicationContext()
-				.getBean(IntegrationContextUtils.ERROR_CHANNEL_BEAN_NAME, SubscribableChannel.class);
+		SubscribableChannel globalEc = binder.getApplicationContext().getBean(
+				IntegrationContextUtils.ERROR_CHANNEL_BEAN_NAME,
+				SubscribableChannel.class);
 		globalEc.subscribe(message12 -> latch.countDown());
-		KafkaProducerMessageHandler endpoint = TestUtils.getPropertyValue(producerBinding, "lifecycle",
-				KafkaProducerMessageHandler.class);
+		KafkaProducerMessageHandler endpoint = TestUtils.getPropertyValue(producerBinding,
+				"lifecycle", KafkaProducerMessageHandler.class);
 		final RuntimeException fooException = new RuntimeException("foo");
 		final AtomicReference sent = new AtomicReference<>();
 		new DirectFieldAccessor(endpoint).setPropertyValue("kafkaTemplate",
 				new KafkaTemplate(mock(ProducerFactory.class)) {
 
 					@Override // SIK < 2.3
-					public ListenableFuture send(String topic, Object payload) {
+					public ListenableFuture send(String topic,
+							Object payload) {
 						sent.set(payload);
 						SettableListenableFuture future = new SettableListenableFuture<>();
 						future.setException(fooException);
@@ -1712,10 +1903,13 @@ public class KafkaBinderTests extends
 		moduleOutputChannel.send(message);
 		assertThat(latch.await(10, TimeUnit.SECONDS)).isTrue();
 		assertThat(errorMessage.get()).isInstanceOf(ErrorMessage.class);
-		assertThat(errorMessage.get().getPayload()).isInstanceOf(KafkaSendFailureException.class);
-		KafkaSendFailureException exception = (KafkaSendFailureException) errorMessage.get().getPayload();
+		assertThat(errorMessage.get().getPayload())
+				.isInstanceOf(KafkaSendFailureException.class);
+		KafkaSendFailureException exception = (KafkaSendFailureException) errorMessage
+				.get().getPayload();
 		assertThat(exception.getCause()).isSameAs(fooException);
-		assertThat(new String((byte[]) exception.getFailedMessage().getPayload(), StandardCharsets.UTF_8)).isEqualTo(message.getPayload());
+		assertThat(new String((byte[]) exception.getFailedMessage().getPayload(),
+				StandardCharsets.UTF_8)).isEqualTo(message.getPayload());
 		assertThat(exception.getRecord().value()).isSameAs(sent.get());
 		producerBinding.unbind();
 	}
@@ -1728,9 +1922,11 @@ public class KafkaBinderTests extends
 		Binder binder = getBinder(configurationProperties);
 		ExtendedConsumerProperties consumerProperties = createConsumerProperties();
 		String testTopicName = "nonexisting" + System.currentTimeMillis();
-		DirectChannel moduleInputChannel = createBindableChannel("input", createConsumerBindingProperties(consumerProperties));
+		DirectChannel moduleInputChannel = createBindableChannel("input",
+				createConsumerBindingProperties(consumerProperties));
 
-		Binding binding = binder.bindConsumer(testTopicName, "test", moduleInputChannel, consumerProperties);
+		Binding binding = binder.bindConsumer(testTopicName, "test",
+				moduleInputChannel, consumerProperties);
 		binding.unbind();
 	}
 
@@ -1752,12 +1948,13 @@ public class KafkaBinderTests extends
 
 		ExtendedConsumerProperties consumerProperties = createConsumerProperties();
 		long uniqueBindingId = System.currentTimeMillis();
-		Binding producerBinding = binder.bindProducer("foo" + uniqueBindingId + ".0",
-				moduleOutputChannel, producerProperties);
-		Binding consumerBinding = binder.bindConsumer("foo" + uniqueBindingId + ".0", null,
-				moduleInputChannel, consumerProperties);
-		Message message = org.springframework.integration.support.MessageBuilder.withPayload(testPayload)
-				.build();
+		Binding producerBinding = binder.bindProducer(
+				"foo" + uniqueBindingId + ".0", moduleOutputChannel, producerProperties);
+		Binding consumerBinding = binder.bindConsumer(
+				"foo" + uniqueBindingId + ".0", null, moduleInputChannel,
+				consumerProperties);
+		Message message = org.springframework.integration.support.MessageBuilder
+				.withPayload(testPayload).build();
 		// Let the consumer actually bind to the producer before sending a msg
 		binderBindUnbindLatency();
 		moduleOutputChannel.send(message);
@@ -1772,7 +1969,8 @@ public class KafkaBinderTests extends
 
 	@Test
 	@SuppressWarnings("unchecked")
-	public void testCustomPartitionCountDoesNotOverridePartitioningIfSmaller() throws Exception {
+	public void testCustomPartitionCountDoesNotOverridePartitioningIfSmaller()
+			throws Exception {
 		byte[] testPayload = new byte[2048];
 		Arrays.fill(testPayload, (byte) 65);
 		KafkaBinderConfigurationProperties binderConfiguration = createConfigurationProperties();
@@ -1781,18 +1979,20 @@ public class KafkaBinderTests extends
 		QueueChannel moduleInputChannel = new QueueChannel();
 		ExtendedProducerProperties producerProperties = createProducerProperties();
 		producerProperties.setPartitionCount(5);
-		producerProperties.setPartitionKeyExpression(spelExpressionParser.parseExpression("payload"));
+		producerProperties.setPartitionKeyExpression(
+				spelExpressionParser.parseExpression("payload"));
 		ExtendedConsumerProperties consumerProperties = createConsumerProperties();
 		long uniqueBindingId = System.currentTimeMillis();
 		DirectChannel moduleOutputChannel = createBindableChannel("output",
 				createProducerBindingProperties(producerProperties));
-		Binding producerBinding = binder.bindProducer("foo" + uniqueBindingId + ".0",
-				moduleOutputChannel, producerProperties);
-		Binding consumerBinding = binder.bindConsumer("foo" + uniqueBindingId + ".0", null,
-				moduleInputChannel, consumerProperties);
+		Binding producerBinding = binder.bindProducer(
+				"foo" + uniqueBindingId + ".0", moduleOutputChannel, producerProperties);
+		Binding consumerBinding = binder.bindConsumer(
+				"foo" + uniqueBindingId + ".0", null, moduleInputChannel,
+				consumerProperties);
 		Thread.sleep(1000);
-		Message message = org.springframework.integration.support.MessageBuilder.withPayload(testPayload)
-				.build();
+		Message message = org.springframework.integration.support.MessageBuilder
+				.withPayload(testPayload).build();
 		// Let the consumer actually bind to the producer before sending a msg
 		binderBindUnbindLatency();
 		moduleOutputChannel.send(message);
@@ -1811,24 +2011,29 @@ public class KafkaBinderTests extends
 		Binder binder = getBinder(createConfigurationProperties());
 		QueueChannel moduleInputChannel = new QueueChannel();
 		ExtendedProducerProperties producerProperties = createProducerProperties();
-		producerProperties.getExtension().getConfiguration().put("key.serializer", StringSerializer.class.getName());
-		producerProperties.getExtension().setMessageKeyExpression(spelExpressionParser.parseExpression("headers.key"));
+		producerProperties.getExtension().getConfiguration().put("key.serializer",
+				StringSerializer.class.getName());
+		producerProperties.getExtension().setMessageKeyExpression(
+				spelExpressionParser.parseExpression("headers.key"));
 		ExtendedConsumerProperties consumerProperties = createConsumerProperties();
 		String uniqueBindingId = UUID.randomUUID().toString();
 		DirectChannel moduleOutputChannel = createBindableChannel("output",
 				createProducerBindingProperties(producerProperties));
-		Binding producerBinding = binder.bindProducer("foo" + uniqueBindingId + ".0",
-				moduleOutputChannel, producerProperties);
-		Binding consumerBinding = binder.bindConsumer("foo" + uniqueBindingId + ".0", null,
-				moduleInputChannel, consumerProperties);
+		Binding producerBinding = binder.bindProducer(
+				"foo" + uniqueBindingId + ".0", moduleOutputChannel, producerProperties);
+		Binding consumerBinding = binder.bindConsumer(
+				"foo" + uniqueBindingId + ".0", null, moduleInputChannel,
+				consumerProperties);
 		Thread.sleep(1000);
-		Message message = MessageBuilder.withPayload("somePayload").setHeader("key", "myDynamicKey").build();
+		Message message = MessageBuilder.withPayload("somePayload")
+				.setHeader("key", "myDynamicKey").build();
 		// Let the consumer actually bind to the producer before sending a msg
 		binderBindUnbindLatency();
 		moduleOutputChannel.send(message);
 		Message inbound = receive(moduleInputChannel);
 		assertThat(inbound).isNotNull();
-		String receivedKey = new String(inbound.getHeaders().get(KafkaHeaders.RECEIVED_MESSAGE_KEY, byte[].class));
+		String receivedKey = new String(inbound.getHeaders()
+				.get(KafkaHeaders.RECEIVED_MESSAGE_KEY, byte[].class));
 		assertThat(receivedKey).isEqualTo("myDynamicKey");
 		producerBinding.unbind();
 		consumerBinding.unbind();
@@ -1846,17 +2051,19 @@ public class KafkaBinderTests extends
 		QueueChannel moduleInputChannel = new QueueChannel();
 		ExtendedProducerProperties producerProperties = createProducerProperties();
 		producerProperties.setPartitionCount(5);
-		producerProperties.setPartitionKeyExpression(spelExpressionParser.parseExpression("payload"));
+		producerProperties.setPartitionKeyExpression(
+				spelExpressionParser.parseExpression("payload"));
 		DirectChannel moduleOutputChannel = createBindableChannel("output",
 				createProducerBindingProperties(producerProperties));
 		ExtendedConsumerProperties consumerProperties = createConsumerProperties();
 		long uniqueBindingId = System.currentTimeMillis();
-		Binding producerBinding = binder.bindProducer("foo" + uniqueBindingId + ".0",
-				moduleOutputChannel, producerProperties);
-		Binding consumerBinding = binder.bindConsumer("foo" + uniqueBindingId + ".0", null,
-				moduleInputChannel, consumerProperties);
-		Message message = org.springframework.integration.support.MessageBuilder.withPayload(testPayload)
-				.build();
+		Binding producerBinding = binder.bindProducer(
+				"foo" + uniqueBindingId + ".0", moduleOutputChannel, producerProperties);
+		Binding consumerBinding = binder.bindConsumer(
+				"foo" + uniqueBindingId + ".0", null, moduleInputChannel,
+				consumerProperties);
+		Message message = org.springframework.integration.support.MessageBuilder
+				.withPayload(testPayload).build();
 		// Let the consumer actually bind to the producer before sending a msg
 		binderBindUnbindLatency();
 		moduleOutputChannel.send(message);
@@ -1873,22 +2080,24 @@ public class KafkaBinderTests extends
 	public void testDefaultConsumerStartsAtEarliest() throws Exception {
 		Binder binder = getBinder(createConfigurationProperties());
 
-		BindingProperties producerBindingProperties = createProducerBindingProperties(createProducerProperties());
+		BindingProperties producerBindingProperties = createProducerBindingProperties(
+				createProducerProperties());
 		DirectChannel output = createBindableChannel("output", producerBindingProperties);
 
 		ExtendedConsumerProperties consumerProperties = createConsumerProperties();
 		consumerProperties.getExtension().setAutoRebalanceEnabled(false);
 
-		DirectChannel input1 = createBindableChannel("input", createConsumerBindingProperties(consumerProperties));
+		DirectChannel input1 = createBindableChannel("input",
+				createConsumerBindingProperties(consumerProperties));
 
 		String testTopicName = UUID.randomUUID().toString();
-		Binding producerBinding = binder.bindProducer(testTopicName, output,
-				createProducerProperties());
+		Binding producerBinding = binder.bindProducer(testTopicName,
+				output, createProducerProperties());
 		String testPayload1 = "foo-" + UUID.randomUUID().toString();
 		output.send(new GenericMessage<>(testPayload1.getBytes()));
 
-		Binding consumerBinding = binder.bindConsumer(testTopicName, "startOffsets", input1,
-				consumerProperties);
+		Binding consumerBinding = binder.bindConsumer(testTopicName,
+				"startOffsets", input1, consumerProperties);
 
 		CountDownLatch latch = new CountDownLatch(1);
 		AtomicReference> inboundMessageRef1 = new AtomicReference<>();
@@ -1903,7 +2112,9 @@ public class KafkaBinderTests extends
 		input1.subscribe(messageHandler);
 		Assert.isTrue(latch.await(5, TimeUnit.SECONDS), "Failed to receive message");
 		assertThat(inboundMessageRef1.get()).isNotNull();
-		assertThat(new String(inboundMessageRef1.get().getPayload(), StandardCharsets.UTF_8)).isEqualTo(testPayload1);
+		assertThat(
+				new String(inboundMessageRef1.get().getPayload(), StandardCharsets.UTF_8))
+						.isEqualTo(testPayload1);
 
 		String testPayload2 = "foo-" + UUID.randomUUID().toString();
 		input1.unsubscribe(messageHandler);
@@ -1922,7 +2133,9 @@ public class KafkaBinderTests extends
 		Assert.isTrue(latch1.await(5, TimeUnit.SECONDS), "Failed to receive message");
 
 		assertThat(inboundMessageRef2.get()).isNotNull();
-		assertThat(new String(inboundMessageRef2.get().getPayload(), StandardCharsets.UTF_8)).isEqualTo(testPayload2);
+		assertThat(
+				new String(inboundMessageRef2.get().getPayload(), StandardCharsets.UTF_8))
+						.isEqualTo(testPayload2);
 
 		producerBinding.unbind();
 		consumerBinding.unbind();
@@ -1938,10 +2151,13 @@ public class KafkaBinderTests extends
 			KafkaBinderConfigurationProperties configurationProperties = createConfigurationProperties();
 			Binder binder = getBinder(configurationProperties);
 
-			BindingProperties producerBindingProperties = createProducerBindingProperties(createProducerProperties());
-			DirectChannel output = createBindableChannel("output", producerBindingProperties);
+			BindingProperties producerBindingProperties = createProducerBindingProperties(
+					createProducerProperties());
+			DirectChannel output = createBindableChannel("output",
+					producerBindingProperties);
 
-			DirectChannel input1 = createBindableChannel("input", createConsumerBindingProperties(createConsumerProperties()));
+			DirectChannel input1 = createBindableChannel("input",
+					createConsumerBindingProperties(createConsumerProperties()));
 
 			String testTopicName = UUID.randomUUID().toString();
 			producerBinding = binder.bindProducer(testTopicName, output,
@@ -1980,20 +2196,22 @@ public class KafkaBinderTests extends
 			input1.subscribe(messageHandler1);
 			String testPayload2 = "foo2-" + UUID.randomUUID().toString();
 			output.send(new GenericMessage<>(testPayload2.getBytes()));
-			Assert.isTrue(latch1.await(15, TimeUnit.SECONDS), "Failed to receive message");
+			Assert.isTrue(latch1.await(15, TimeUnit.SECONDS),
+					"Failed to receive message");
 			assertThat(inboundMessageRef2.get()).isNotNull();
 			assertThat(inboundMessageRef2.get().getPayload()).isNotNull();
 			consumerBinding.unbind();
 
 			Thread.sleep(2000);
 			ExtendedConsumerProperties consumerProperties = createConsumerProperties();
-			consumerBinding = binder.bindConsumer(testTopicName, "startOffsets", input1, consumerProperties);
+			consumerBinding = binder.bindConsumer(testTopicName, "startOffsets", input1,
+					consumerProperties);
 			input1.unsubscribe(messageHandler1);
 			CountDownLatch latch2 = new CountDownLatch(1);
 			AtomicReference> inboundMessageRef3 = new AtomicReference<>();
 			MessageHandler messageHandler2 = message1 -> {
 				try {
-					inboundMessageRef3.set((Message< byte[]>) message1);
+					inboundMessageRef3.set((Message) message1);
 				}
 				finally {
 					latch2.countDown();
@@ -2002,9 +2220,11 @@ public class KafkaBinderTests extends
 			input1.subscribe(messageHandler2);
 			String testPayload3 = "foo3-" + UUID.randomUUID().toString();
 			output.send(new GenericMessage<>(testPayload3.getBytes()));
-			Assert.isTrue(latch2.await(15, TimeUnit.SECONDS), "Failed to receive message");
+			Assert.isTrue(latch2.await(15, TimeUnit.SECONDS),
+					"Failed to receive message");
 			assertThat(inboundMessageRef3.get()).isNotNull();
-			assertThat(new String(inboundMessageRef3.get().getPayload(), StandardCharsets.UTF_8)).isEqualTo(testPayload3);
+			assertThat(new String(inboundMessageRef3.get().getPayload(),
+					StandardCharsets.UTF_8)).isEqualTo(testPayload3);
 		}
 		finally {
 			if (consumerBinding != null) {
@@ -2024,36 +2244,44 @@ public class KafkaBinderTests extends
 		String testTopicName = UUID.randomUUID().toString();
 		ExtendedProducerProperties properties = createProducerProperties();
 		properties.getExtension().setSync(true);
-		Binding producerBinding = binder.bindProducer(testTopicName, output, properties);
-		DirectFieldAccessor accessor = new DirectFieldAccessor(extractEndpoint(producerBinding));
-		KafkaProducerMessageHandler wrappedInstance = (KafkaProducerMessageHandler) accessor.getWrappedInstance();
-		assertThat(new DirectFieldAccessor(wrappedInstance).getPropertyValue("sync").equals(Boolean.TRUE))
-				.withFailMessage("Kafka Sync Producer should have been enabled.");
+		Binding producerBinding = binder.bindProducer(testTopicName,
+				output, properties);
+		DirectFieldAccessor accessor = new DirectFieldAccessor(
+				extractEndpoint(producerBinding));
+		KafkaProducerMessageHandler wrappedInstance = (KafkaProducerMessageHandler) accessor
+				.getWrappedInstance();
+		assertThat(new DirectFieldAccessor(wrappedInstance).getPropertyValue("sync")
+				.equals(Boolean.TRUE))
+						.withFailMessage("Kafka Sync Producer should have been enabled.");
 		producerBinding.unbind();
 	}
 
 	@Test
 	@SuppressWarnings("unchecked")
-	public void testAutoCreateTopicsDisabledOnBinderStillWorksAsLongAsBrokerCreatesTopic() throws Exception {
+	public void testAutoCreateTopicsDisabledOnBinderStillWorksAsLongAsBrokerCreatesTopic()
+			throws Exception {
 		KafkaBinderConfigurationProperties configurationProperties = createConfigurationProperties();
 		configurationProperties.setAutoCreateTopics(false);
 		Binder binder = getBinder(configurationProperties);
-		BindingProperties producerBindingProperties = createProducerBindingProperties(createProducerProperties());
+		BindingProperties producerBindingProperties = createProducerBindingProperties(
+				createProducerProperties());
 		DirectChannel output = createBindableChannel("output", producerBindingProperties);
 
 		ExtendedConsumerProperties consumerProperties = createConsumerProperties();
 
-		DirectChannel input = createBindableChannel("input", createConsumerBindingProperties(consumerProperties));
+		DirectChannel input = createBindableChannel("input",
+				createConsumerBindingProperties(consumerProperties));
 
 		String testTopicName = "createdByBroker-" + System.currentTimeMillis();
 
-		Binding producerBinding = binder.bindProducer(testTopicName, output,
-				producerBindingProperties.getProducer());
+		Binding producerBinding = binder.bindProducer(testTopicName,
+				output, producerBindingProperties.getProducer());
 
 		String testPayload = "foo1-" + UUID.randomUUID().toString();
 		output.send(new GenericMessage<>(testPayload));
 
-		Binding consumerBinding = binder.bindConsumer(testTopicName, "test", input, consumerProperties);
+		Binding consumerBinding = binder.bindConsumer(testTopicName,
+				"test", input, consumerProperties);
 		CountDownLatch latch = new CountDownLatch(1);
 		AtomicReference> inboundMessageRef = new AtomicReference<>();
 		input.subscribe(message1 -> {
@@ -2067,7 +2295,9 @@ public class KafkaBinderTests extends
 		Assert.isTrue(latch.await(5, TimeUnit.SECONDS), "Failed to receive message");
 
 		assertThat(inboundMessageRef.get()).isNotNull();
-		assertThat(new String(inboundMessageRef.get().getPayload(), StandardCharsets.UTF_8)).isEqualTo(testPayload);
+		assertThat(
+				new String(inboundMessageRef.get().getPayload(), StandardCharsets.UTF_8))
+						.isEqualTo(testPayload);
 
 		producerBinding.unbind();
 		consumerBinding.unbind();
@@ -2075,7 +2305,8 @@ public class KafkaBinderTests extends
 
 	@Test
 	@SuppressWarnings("unchecked")
-	public void testAutoConfigureTopicsDisabledSucceedsIfTopicExisting() throws Throwable {
+	public void testAutoConfigureTopicsDisabledSucceedsIfTopicExisting()
+			throws Throwable {
 		KafkaBinderConfigurationProperties configurationProperties = createConfigurationProperties();
 
 		String testTopicName = "existing" + System.currentTimeMillis();
@@ -2085,8 +2316,10 @@ public class KafkaBinderTests extends
 
 		ExtendedConsumerProperties consumerProperties = createConsumerProperties();
 
-		DirectChannel input = createBindableChannel("input", createConsumerBindingProperties(consumerProperties));
-		Binding binding = binder.bindConsumer(testTopicName, "test", input, consumerProperties);
+		DirectChannel input = createBindableChannel("input",
+				createConsumerBindingProperties(consumerProperties));
+		Binding binding = binder.bindConsumer(testTopicName, "test",
+				input, consumerProperties);
 		binding.unbind();
 	}
 
@@ -2100,16 +2333,19 @@ public class KafkaBinderTests extends
 		configurationProperties.setAutoAddPartitions(true);
 		Binder binder = getBinder(configurationProperties);
 		ExtendedConsumerProperties consumerProperties = createConsumerProperties();
-		DirectChannel input = createBindableChannel("input", createConsumerBindingProperties(consumerProperties));
+		DirectChannel input = createBindableChannel("input",
+				createConsumerBindingProperties(consumerProperties));
 
-		Binding binding = binder.bindConsumer(testTopicName, "test", input, consumerProperties);
+		Binding binding = binder.bindConsumer(testTopicName, "test", input,
+				consumerProperties);
 		binding.unbind();
 		assertThat(invokePartitionSize(testTopicName)).isEqualTo(6);
 	}
 
 	@Test
 	@SuppressWarnings("unchecked")
-	public void testAutoAddPartitionsDisabledSucceedsIfTopicUnderPartitionedAndAutoRebalanceEnabled() throws Throwable {
+	public void testAutoAddPartitionsDisabledSucceedsIfTopicUnderPartitionedAndAutoRebalanceEnabled()
+			throws Throwable {
 		KafkaBinderConfigurationProperties configurationProperties = createConfigurationProperties();
 
 		String testTopicName = "existing" + System.currentTimeMillis();
@@ -2121,19 +2357,22 @@ public class KafkaBinderTests extends
 
 		ExtendedConsumerProperties consumerProperties = createConsumerProperties();
 
-		DirectChannel input = createBindableChannel("input", createConsumerBindingProperties(consumerProperties));
+		DirectChannel input = createBindableChannel("input",
+				createConsumerBindingProperties(consumerProperties));
 
 		// this consumer must consume from partition 2
 		consumerProperties.setInstanceCount(3);
 		consumerProperties.setInstanceIndex(2);
-		Binding binding = binder.bindConsumer(testTopicName, "test", input, consumerProperties);
+		Binding binding = binder.bindConsumer(testTopicName, "test", input,
+				consumerProperties);
 		binding.unbind();
 		assertThat(invokePartitionSize(testTopicName)).isEqualTo(1);
 	}
 
 	@Test
 	@SuppressWarnings("unchecked")
-	public void testAutoAddPartitionsDisabledFailsIfTopicUnderPartitionedAndAutoRebalanceDisabled() throws Throwable {
+	public void testAutoAddPartitionsDisabledFailsIfTopicUnderPartitionedAndAutoRebalanceDisabled()
+			throws Throwable {
 		KafkaBinderConfigurationProperties configurationProperties = createConfigurationProperties();
 
 		String testTopicName = "existing" + System.currentTimeMillis();
@@ -2144,15 +2383,17 @@ public class KafkaBinderTests extends
 		context.refresh();
 
 		ExtendedConsumerProperties consumerProperties = createConsumerProperties();
-		DirectChannel output = createBindableChannel("output", createConsumerBindingProperties(consumerProperties));
+		DirectChannel output = createBindableChannel("output",
+				createConsumerBindingProperties(consumerProperties));
 		// this consumer must consume from partition 2
 		consumerProperties.setInstanceCount(3);
 		consumerProperties.setInstanceIndex(2);
 		consumerProperties.getExtension().setAutoRebalanceEnabled(false);
 		expectedProvisioningException.expect(ProvisioningException.class);
-		expectedProvisioningException
-				.expectMessage("The number of expected partitions was: 3, but 1 has been found instead");
-		Binding binding = binder.bindConsumer(testTopicName, "test", output, consumerProperties);
+		expectedProvisioningException.expectMessage(
+				"The number of expected partitions was: 3, but 1 has been found instead");
+		Binding binding = binder.bindConsumer(testTopicName, "test", output,
+				consumerProperties);
 		if (binding != null) {
 			binding.unbind();
 		}
@@ -2160,7 +2401,8 @@ public class KafkaBinderTests extends
 
 	@Test
 	@SuppressWarnings("unchecked")
-	public void testAutoAddPartitionsDisabledSucceedsIfTopicPartitionedCorrectly() throws Throwable {
+	public void testAutoAddPartitionsDisabledSucceedsIfTopicPartitionedCorrectly()
+			throws Throwable {
 		Binding binding = null;
 		try {
 			KafkaBinderConfigurationProperties configurationProperties = createConfigurationProperties();
@@ -2171,20 +2413,24 @@ public class KafkaBinderTests extends
 			Binder binder = getBinder(configurationProperties);
 			ExtendedConsumerProperties consumerProperties = createConsumerProperties();
 
-			DirectChannel input = createBindableChannel("input", createConsumerBindingProperties(consumerProperties));
+			DirectChannel input = createBindableChannel("input",
+					createConsumerBindingProperties(consumerProperties));
 
 			// this consumer must consume from partition 2
 			consumerProperties.setInstanceCount(3);
 			consumerProperties.setInstanceIndex(2);
 			consumerProperties.getExtension().setAutoRebalanceEnabled(false);
 
-			binding = binder.bindConsumer(testTopicName, "test-x", input, consumerProperties);
+			binding = binder.bindConsumer(testTopicName, "test-x", input,
+					consumerProperties);
 
-			TopicPartitionInitialOffset[] listenedPartitions = TestUtils.getPropertyValue(binding,
+			TopicPartitionInitialOffset[] listenedPartitions = TestUtils.getPropertyValue(
+					binding,
 					"lifecycle.messageListenerContainer.containerProperties.topicPartitions",
 					TopicPartitionInitialOffset[].class);
 			assertThat(listenedPartitions).hasSize(2);
-			assertThat(listenedPartitions).contains(new TopicPartitionInitialOffset(testTopicName, 2),
+			assertThat(listenedPartitions).contains(
+					new TopicPartitionInitialOffset(testTopicName, 2),
 					new TopicPartitionInitialOffset(testTopicName, 5));
 			int partitions = invokePartitionSize(testTopicName);
 			assertThat(partitions).isEqualTo(6);
@@ -2210,9 +2456,11 @@ public class KafkaBinderTests extends
 		context.refresh();
 
 		ExtendedConsumerProperties consumerProperties = createConsumerProperties();
-		DirectChannel input = createBindableChannel("input", createConsumerBindingProperties(consumerProperties));
+		DirectChannel input = createBindableChannel("input",
+				createConsumerBindingProperties(consumerProperties));
 
-		Binding binding = binder.bindConsumer(testTopicName, "test", input, consumerProperties);
+		Binding binding = binder.bindConsumer(testTopicName, "test", input,
+				consumerProperties);
 		binding.unbind();
 
 		assertThat(partitionSize(testTopicName)).isEqualTo(6);
@@ -2230,12 +2478,18 @@ public class KafkaBinderTests extends
 			Binder binder = getBinder(configurationProperties);
 
 			ExtendedConsumerProperties consumerProperties = createConsumerProperties();
-			DirectChannel input = createBindableChannel("input", createConsumerBindingProperties(consumerProperties));
+			DirectChannel input = createBindableChannel("input",
+					createConsumerBindingProperties(consumerProperties));
 
-			binding = binder.bindConsumer(testTopicName, "test", input, consumerProperties);
-			DirectFieldAccessor consumerAccessor = new DirectFieldAccessor(getKafkaConsumer(binding));
-			assertTrue(consumerAccessor.getPropertyValue("keyDeserializer") instanceof ByteArrayDeserializer);
-			assertTrue(consumerAccessor.getPropertyValue("valueDeserializer") instanceof ByteArrayDeserializer);
+			binding = binder.bindConsumer(testTopicName, "test", input,
+					consumerProperties);
+			DirectFieldAccessor consumerAccessor = new DirectFieldAccessor(
+					getKafkaConsumer(binding));
+			assertThat(consumerAccessor
+					.getPropertyValue("keyDeserializer") instanceof ByteArrayDeserializer)
+							.isTrue();
+			assertThat(consumerAccessor.getPropertyValue(
+					"valueDeserializer") instanceof ByteArrayDeserializer).isTrue();
 		}
 		finally {
 			if (binding != null) {
@@ -2250,23 +2504,31 @@ public class KafkaBinderTests extends
 		Binding binding = null;
 		try {
 			KafkaBinderConfigurationProperties configurationProperties = createConfigurationProperties();
-			Map propertiesToOverride = configurationProperties.getConfiguration();
-			propertiesToOverride.put("key.deserializer", "org.apache.kafka.common.serialization.StringDeserializer");
-			propertiesToOverride.put("value.deserializer", "org.apache.kafka.common.serialization.LongDeserializer");
+			Map propertiesToOverride = configurationProperties
+					.getConfiguration();
+			propertiesToOverride.put("key.deserializer",
+					"org.apache.kafka.common.serialization.StringDeserializer");
+			propertiesToOverride.put("value.deserializer",
+					"org.apache.kafka.common.serialization.LongDeserializer");
 			configurationProperties.setConfiguration(propertiesToOverride);
 			String testTopicName = "existing" + System.currentTimeMillis();
 			configurationProperties.setAutoCreateTopics(false);
 			Binder binder = getBinder(configurationProperties);
 
 			ExtendedConsumerProperties consumerProperties = createConsumerProperties();
-			DirectChannel input = createBindableChannel("input", createConsumerBindingProperties(consumerProperties));
+			DirectChannel input = createBindableChannel("input",
+					createConsumerBindingProperties(consumerProperties));
 
-			binding = binder.bindConsumer(testTopicName, "test", input, consumerProperties);
-			DirectFieldAccessor consumerAccessor = new DirectFieldAccessor(getKafkaConsumer(binding));
-			assertTrue("Expected StringDeserializer as a custom key deserializer",
-					consumerAccessor.getPropertyValue("keyDeserializer") instanceof StringDeserializer);
-			assertTrue("Expected LongDeserializer as a custom value deserializer",
-					consumerAccessor.getPropertyValue("valueDeserializer") instanceof LongDeserializer);
+			binding = binder.bindConsumer(testTopicName, "test", input,
+					consumerProperties);
+			DirectFieldAccessor consumerAccessor = new DirectFieldAccessor(
+					getKafkaConsumer(binding));
+			assertThat(consumerAccessor
+					.getPropertyValue("keyDeserializer") instanceof StringDeserializer)
+							.isTrue();
+			assertThat(consumerAccessor
+					.getPropertyValue("valueDeserializer") instanceof LongDeserializer)
+							.isTrue();
 		}
 		finally {
 			if (binding != null) {
@@ -2276,8 +2538,9 @@ public class KafkaBinderTests extends
 	}
 
 	@Test
-	@SuppressWarnings({"unchecked", "rawtypes"})
-	public void testNativeSerializationWithCustomSerializerDeserializer() throws Exception {
+	@SuppressWarnings({ "unchecked", "rawtypes" })
+	public void testNativeSerializationWithCustomSerializerDeserializer()
+			throws Exception {
 		Binding producerBinding = null;
 		Binding consumerBinding = null;
 		try {
@@ -2293,13 +2556,16 @@ public class KafkaBinderTests extends
 			producerProperties.setUseNativeEncoding(true);
 			producerProperties.getExtension().getConfiguration().put("value.serializer",
 					"org.apache.kafka.common.serialization.IntegerSerializer");
-			producerBinding = binder.bindProducer(testTopicName, moduleOutputChannel, producerProperties);
+			producerBinding = binder.bindProducer(testTopicName, moduleOutputChannel,
+					producerProperties);
 			ExtendedConsumerProperties consumerProperties = createConsumerProperties();
 			consumerProperties.getExtension().setAutoRebalanceEnabled(false);
 			consumerProperties.getExtension().getConfiguration().put("value.deserializer",
 					"org.apache.kafka.common.serialization.IntegerDeserializer");
-			consumerProperties.getExtension().setStandardHeaders(KafkaConsumerProperties.StandardHeaders.both);
-			consumerBinding = binder.bindConsumer(testTopicName, "test", moduleInputChannel, consumerProperties);
+			consumerProperties.getExtension()
+					.setStandardHeaders(KafkaConsumerProperties.StandardHeaders.both);
+			consumerBinding = binder.bindConsumer(testTopicName, "test",
+					moduleInputChannel, consumerProperties);
 			// Let the consumer actually bind to the producer before sending a msg
 			binderBindUnbindLatency();
 			moduleOutputChannel.send(message);
@@ -2325,31 +2591,32 @@ public class KafkaBinderTests extends
 		KafkaMessageDrivenChannelAdapter adapter = (KafkaMessageDrivenChannelAdapter) bindingAccessor
 				.getPropertyValue("lifecycle");
 		DirectFieldAccessor adapterAccessor = new DirectFieldAccessor(adapter);
-		ConcurrentMessageListenerContainer messageListenerContainer =
-				(ConcurrentMessageListenerContainer) adapterAccessor.getPropertyValue("messageListenerContainer");
-		DirectFieldAccessor containerAccessor = new DirectFieldAccessor(messageListenerContainer);
+		ConcurrentMessageListenerContainer messageListenerContainer = (ConcurrentMessageListenerContainer) adapterAccessor
+				.getPropertyValue("messageListenerContainer");
+		DirectFieldAccessor containerAccessor = new DirectFieldAccessor(
+				messageListenerContainer);
 		DefaultKafkaConsumerFactory consumerFactory = (DefaultKafkaConsumerFactory) containerAccessor
 				.getPropertyValue("consumerFactory");
 		return (KafkaConsumer) consumerFactory.createConsumer();
 	}
 
 	@Test
-	@SuppressWarnings({"unchecked", "rawtypes"})
-	public void testNativeSerializationWithCustomSerializerDeserializerBytesPayload() throws Exception {
+	@SuppressWarnings({ "unchecked", "rawtypes" })
+	public void testNativeSerializationWithCustomSerializerDeserializerBytesPayload()
+			throws Exception {
 		Binding producerBinding = null;
 		Binding consumerBinding = null;
 		try {
 			byte[] testPayload = new byte[1];
 			Message message = MessageBuilder.withPayload(testPayload)
-					.setHeader(MessageHeaders.CONTENT_TYPE, "something/funky")
-					.build();
+					.setHeader(MessageHeaders.CONTENT_TYPE, "something/funky").build();
 			SubscribableChannel moduleOutputChannel = new DirectChannel();
 			String testTopicName = "existing" + System.currentTimeMillis();
 			KafkaBinderConfigurationProperties configurationProperties = createConfigurationProperties();
 			configurationProperties.setAutoAddPartitions(true);
 			Binder binder = getBinder(configurationProperties);
-			ConfigurableApplicationContext context = TestUtils.getPropertyValue(binder, "binder.applicationContext",
-					ConfigurableApplicationContext.class);
+			ConfigurableApplicationContext context = TestUtils.getPropertyValue(binder,
+					"binder.applicationContext", ConfigurableApplicationContext.class);
 			MessagingMessageConverter converter = new MessagingMessageConverter();
 			converter.setGenerateMessageId(true);
 			converter.setGenerateTimestamp(true);
@@ -2357,17 +2624,19 @@ public class KafkaBinderTests extends
 			QueueChannel moduleInputChannel = new QueueChannel();
 			ExtendedProducerProperties producerProperties = createProducerProperties();
 			producerProperties.setUseNativeEncoding(true);
-			producerProperties.getExtension()
-					.getConfiguration()
-					.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, ByteArraySerializer.class.getName());
-			producerBinding = binder.bindProducer(testTopicName, moduleOutputChannel, producerProperties);
+			producerProperties.getExtension().getConfiguration().put(
+					ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG,
+					ByteArraySerializer.class.getName());
+			producerBinding = binder.bindProducer(testTopicName, moduleOutputChannel,
+					producerProperties);
 			ExtendedConsumerProperties consumerProperties = createConsumerProperties();
 			consumerProperties.getExtension().setAutoRebalanceEnabled(false);
-			consumerProperties.getExtension()
-					.getConfiguration()
-					.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, ByteArrayDeserializer.class.getName());
+			consumerProperties.getExtension().getConfiguration().put(
+					ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG,
+					ByteArrayDeserializer.class.getName());
 			consumerProperties.getExtension().setConverterBeanName("testConverter");
-			consumerBinding = binder.bindConsumer(testTopicName, "test", moduleInputChannel, consumerProperties);
+			consumerBinding = binder.bindConsumer(testTopicName, "test",
+					moduleInputChannel, consumerProperties);
 			// Let the consumer actually bind to the producer before sending a msg
 			binderBindUnbindLatency();
 			moduleOutputChannel.send(message);
@@ -2375,7 +2644,8 @@ public class KafkaBinderTests extends
 			assertThat(inbound).isNotNull();
 			assertThat(inbound.getPayload()).isEqualTo(new byte[1]);
 			assertThat(inbound.getHeaders()).containsKey("contentType");
-			assertThat(inbound.getHeaders().get(MessageHeaders.CONTENT_TYPE).toString()).isEqualTo("something/funky");
+			assertThat(inbound.getHeaders().get(MessageHeaders.CONTENT_TYPE).toString())
+					.isEqualTo("something/funky");
 			assertThat(inbound.getHeaders().getId()).isNotNull();
 			assertThat(inbound.getHeaders().getTimestamp()).isNotNull();
 		}
@@ -2408,15 +2678,18 @@ public class KafkaBinderTests extends
 			ExtendedConsumerProperties consumerProperties = createConsumerProperties();
 			consumerProperties.getExtension().setAutoRebalanceEnabled(false);
 
-			DirectChannel moduleInputChannel = createBindableChannel("input", createConsumerBindingProperties(consumerProperties));
+			DirectChannel moduleInputChannel = createBindableChannel("input",
+					createConsumerBindingProperties(consumerProperties));
 
 			String testTopicName = "existing" + System.currentTimeMillis();
 			KafkaBinderConfigurationProperties configurationProperties = createConfigurationProperties();
 			configurationProperties.setAutoAddPartitions(true);
 			Binder binder = getBinder(configurationProperties);
-			producerBinding = binder.bindProducer(testTopicName, moduleOutputChannel, producerProperties);
+			producerBinding = binder.bindProducer(testTopicName, moduleOutputChannel,
+					producerProperties);
 
-			consumerBinding = binder.bindConsumer(testTopicName, "test", moduleInputChannel, consumerProperties);
+			consumerBinding = binder.bindConsumer(testTopicName, "test",
+					moduleInputChannel, consumerProperties);
 			// Let the consumer actually bind to the producer before sending a msg
 			binderBindUnbindLatency();
 			moduleOutputChannel.send(message);
@@ -2434,7 +2707,8 @@ public class KafkaBinderTests extends
 
 			assertThat(inboundMessageRef.get()).isNotNull();
 			assertThat(inboundMessageRef.get().getPayload()).isEqualTo("test".getBytes());
-			assertThat(inboundMessageRef.get().getHeaders()).containsEntry("contentType", MimeTypeUtils.TEXT_PLAIN);
+			assertThat(inboundMessageRef.get().getHeaders()).containsEntry("contentType",
+					MimeTypeUtils.TEXT_PLAIN);
 		}
 		finally {
 			if (producerBinding != null) {
@@ -2447,11 +2721,11 @@ public class KafkaBinderTests extends
 	}
 
 	/*
-	 * Verify that a consumer configured to handle embedded headers can handle
-	 * all three variants.
+	 * Verify that a consumer configured to handle embedded headers can handle all three
+	 * variants.
 	 */
 	@Test
-	@SuppressWarnings({"unchecked", "rawtypes"})
+	@SuppressWarnings({ "unchecked", "rawtypes" })
 	public void testSendAndReceiveWithMixedMode() throws Exception {
 		KafkaBinderConfigurationProperties binderConfiguration = createConfigurationProperties();
 		binderConfiguration.setHeaders("foo");
@@ -2459,20 +2733,20 @@ public class KafkaBinderTests extends
 		DirectChannel moduleOutputChannel1 = new DirectChannel();
 		ExtendedProducerProperties producerProperties1 = createProducerProperties();
 		producerProperties1.setHeaderMode(HeaderMode.embeddedHeaders);
-		Binding producerBinding1 = binder.bindProducer("mixed.0", moduleOutputChannel1,
-				producerProperties1);
+		Binding producerBinding1 = binder.bindProducer("mixed.0",
+				moduleOutputChannel1, producerProperties1);
 
 		DirectChannel moduleOutputChannel2 = new DirectChannel();
 		ExtendedProducerProperties producerProperties2 = createProducerProperties();
 		producerProperties2.setHeaderMode(HeaderMode.headers);
-		Binding producerBinding2 = binder.bindProducer("mixed.0", moduleOutputChannel2,
-				producerProperties2);
+		Binding producerBinding2 = binder.bindProducer("mixed.0",
+				moduleOutputChannel2, producerProperties2);
 
 		DirectChannel moduleOutputChannel3 = new DirectChannel();
 		ExtendedProducerProperties producerProperties3 = createProducerProperties();
 		producerProperties3.setHeaderMode(HeaderMode.none);
-		Binding producerBinding3 = binder.bindProducer("mixed.0", moduleOutputChannel3,
-				producerProperties3);
+		Binding producerBinding3 = binder.bindProducer("mixed.0",
+				moduleOutputChannel3, producerProperties3);
 
 		ExtendedConsumerProperties consumerProperties = createConsumerProperties();
 		consumerProperties.setHeaderMode(HeaderMode.embeddedHeaders);
@@ -2482,12 +2756,11 @@ public class KafkaBinderTests extends
 		BridgeHandler bridge = new BridgeHandler();
 		bridge.setOutputChannel(bridged);
 		moduleInputChannel.subscribe(bridge);
-		Binding consumerBinding = binder.bindConsumer("mixed.0", "test", moduleInputChannel,
-				consumerProperties);
+		Binding consumerBinding = binder.bindConsumer("mixed.0", "test",
+				moduleInputChannel, consumerProperties);
 		Message message = org.springframework.integration.support.MessageBuilder
 				.withPayload("testSendAndReceiveWithMixedMode".getBytes())
-				.setHeader("foo", "bar")
-				.build();
+				.setHeader("foo", "bar").build();
 		// Let the consumer actually bind to the producer before sending a msg
 		binderBindUnbindLatency();
 		moduleOutputChannel1.send(message);
@@ -2495,25 +2768,34 @@ public class KafkaBinderTests extends
 		moduleOutputChannel3.send(message);
 		Message inbound = receive(bridged, 10_000);
 		assertThat(inbound).isNotNull();
-		assertThat(new String((byte[])inbound.getPayload(), StandardCharsets.UTF_8)).isEqualTo("testSendAndReceiveWithMixedMode");
+		assertThat(new String((byte[]) inbound.getPayload(), StandardCharsets.UTF_8))
+				.isEqualTo("testSendAndReceiveWithMixedMode");
 		assertThat(inbound.getHeaders().get("foo")).isEqualTo("bar");
-		assertThat(inbound.getHeaders().get(BinderHeaders.NATIVE_HEADERS_PRESENT)).isNull();
+		assertThat(inbound.getHeaders().get(BinderHeaders.NATIVE_HEADERS_PRESENT))
+				.isNull();
 		inbound = receive(bridged);
 		assertThat(inbound).isNotNull();
-		assertThat(new String((byte[])inbound.getPayload(), StandardCharsets.UTF_8)).isEqualTo("testSendAndReceiveWithMixedMode");
+		assertThat(new String((byte[]) inbound.getPayload(), StandardCharsets.UTF_8))
+				.isEqualTo("testSendAndReceiveWithMixedMode");
 		assertThat(inbound.getHeaders().get("foo")).isEqualTo("bar");
-		assertThat(inbound.getHeaders().get(BinderHeaders.NATIVE_HEADERS_PRESENT)).isEqualTo(Boolean.TRUE);
+		assertThat(inbound.getHeaders().get(BinderHeaders.NATIVE_HEADERS_PRESENT))
+				.isEqualTo(Boolean.TRUE);
 		inbound = receive(bridged);
 		assertThat(inbound).isNotNull();
-		assertThat(new String((byte[])inbound.getPayload(), StandardCharsets.UTF_8)).isEqualTo("testSendAndReceiveWithMixedMode");
+		assertThat(new String((byte[]) inbound.getPayload(), StandardCharsets.UTF_8))
+				.isEqualTo("testSendAndReceiveWithMixedMode");
 		assertThat(inbound.getHeaders().get("foo")).isNull();
-		assertThat(inbound.getHeaders().get(BinderHeaders.NATIVE_HEADERS_PRESENT)).isNull();
+		assertThat(inbound.getHeaders().get(BinderHeaders.NATIVE_HEADERS_PRESENT))
+				.isNull();
 
-		Map consumerProps = KafkaTestUtils.consumerProps("testSendAndReceiveWithMixedMode", "false",
+		Map consumerProps = KafkaTestUtils.consumerProps(
+				"testSendAndReceiveWithMixedMode", "false",
 				embeddedKafka.getEmbeddedKafka());
 		consumerProps.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
-		consumerProps.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, ByteArrayDeserializer.class);
-		consumerProps.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, ByteArrayDeserializer.class);
+		consumerProps.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG,
+				ByteArrayDeserializer.class);
+		consumerProps.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG,
+				ByteArrayDeserializer.class);
 		DefaultKafkaConsumerFactory cf = new DefaultKafkaConsumerFactory<>(consumerProps);
 		Consumer consumer = cf.createConsumer();
 		consumer.subscribe(Collections.singletonList("mixed.0"));
@@ -2544,13 +2826,17 @@ public class KafkaBinderTests extends
 	@Test
 	public void testPolledConsumer() throws Exception {
 		KafkaTestBinder binder = getBinder();
-		PollableSource inboundBindTarget = new DefaultPollableMessageSource(this.messageConverter);
+		PollableSource inboundBindTarget = new DefaultPollableMessageSource(
+				this.messageConverter);
 		ExtendedConsumerProperties consumerProps = createConsumerProperties();
 		consumerProps.setMultiplex(true);
-		Binding> binding = binder.bindPollableConsumer("pollable,anotherOne", "group-polledConsumer",
-				inboundBindTarget, consumerProps);
-		Map producerProps = KafkaTestUtils.producerProps(embeddedKafka.getEmbeddedKafka());
-		KafkaTemplate template = new KafkaTemplate(new DefaultKafkaProducerFactory<>(producerProps));
+		Binding> binding = binder.bindPollableConsumer(
+				"pollable,anotherOne", "group-polledConsumer", inboundBindTarget,
+				consumerProps);
+		Map producerProps = KafkaTestUtils
+				.producerProps(embeddedKafka.getEmbeddedKafka());
+		KafkaTemplate template = new KafkaTemplate(
+				new DefaultKafkaProducerFactory<>(producerProps));
 		template.send("pollable", "testPollable");
 		boolean polled = inboundBindTarget.poll(m -> {
 			assertThat(m.getPayload()).isEqualTo("testPollable");
@@ -2577,11 +2863,14 @@ public class KafkaBinderTests extends
 		}
 		assertThat(polled).isTrue();
 		// Bind a second pollable consumer GH-521
-		consumerProps.getExtension().getConfiguration().put(ConsumerConfig.CLIENT_ID_CONFIG, "pollable2");
-		PollableSource second = new DefaultPollableMessageSource(this.messageConverter);
-		Binding> binding2 = binder.bindPollableConsumer("pollable2",
-				"group-polledConsumer2", second, consumerProps);
-		second.poll(m -> { });
+		consumerProps.getExtension().getConfiguration()
+				.put(ConsumerConfig.CLIENT_ID_CONFIG, "pollable2");
+		PollableSource second = new DefaultPollableMessageSource(
+				this.messageConverter);
+		Binding> binding2 = binder.bindPollableConsumer(
+				"pollable2", "group-polledConsumer2", second, consumerProps);
+		second.poll(m -> {
+		});
 		binding.unbind();
 		binding2.unbind();
 	}
@@ -2590,12 +2879,15 @@ public class KafkaBinderTests extends
 	@Test
 	public void testPolledConsumerRequeue() throws Exception {
 		KafkaTestBinder binder = getBinder();
-		PollableSource inboundBindTarget = new DefaultPollableMessageSource(this.messageConverter);
+		PollableSource inboundBindTarget = new DefaultPollableMessageSource(
+				this.messageConverter);
 		ExtendedConsumerProperties properties = createConsumerProperties();
-		Binding> binding = binder.bindPollableConsumer("pollableRequeue", "group",
-				inboundBindTarget, properties);
-		Map producerProps = KafkaTestUtils.producerProps(embeddedKafka.getEmbeddedKafka());
-		KafkaTemplate template = new KafkaTemplate(new DefaultKafkaProducerFactory<>(producerProps));
+		Binding> binding = binder.bindPollableConsumer(
+				"pollableRequeue", "group", inboundBindTarget, properties);
+		Map producerProps = KafkaTestUtils
+				.producerProps(embeddedKafka.getEmbeddedKafka());
+		KafkaTemplate template = new KafkaTemplate(
+				new DefaultKafkaProducerFactory<>(producerProps));
 		template.send("pollableRequeue", "testPollable");
 		try {
 			boolean polled = false;
@@ -2621,15 +2913,18 @@ public class KafkaBinderTests extends
 	@Test
 	public void testPolledConsumerWithDlq() throws Exception {
 		KafkaTestBinder binder = getBinder();
-		PollableSource inboundBindTarget = new DefaultPollableMessageSource(this.messageConverter);
+		PollableSource inboundBindTarget = new DefaultPollableMessageSource(
+				this.messageConverter);
 		ExtendedConsumerProperties properties = createConsumerProperties();
 		properties.setMaxAttempts(2);
 		properties.setBackOffInitialInterval(0);
 		properties.getExtension().setEnableDlq(true);
-		Map producerProps = KafkaTestUtils.producerProps(embeddedKafka.getEmbeddedKafka());
-		Binding> binding = binder.bindPollableConsumer("pollableDlq", "group-pcWithDlq",
-				inboundBindTarget, properties);
-		KafkaTemplate template = new KafkaTemplate(new DefaultKafkaProducerFactory<>(producerProps));
+		Map producerProps = KafkaTestUtils
+				.producerProps(embeddedKafka.getEmbeddedKafka());
+		Binding> binding = binder.bindPollableConsumer(
+				"pollableDlq", "group-pcWithDlq", inboundBindTarget, properties);
+		KafkaTemplate template = new KafkaTemplate(
+				new DefaultKafkaProducerFactory<>(producerProps));
 		template.send("pollableDlq", "testPollableDLQ");
 		try {
 			int n = 0;
@@ -2643,12 +2938,15 @@ public class KafkaBinderTests extends
 		catch (MessageHandlingException e) {
 			assertThat(e.getCause().getMessage()).isEqualTo("test DLQ");
 		}
-		Map consumerProps = KafkaTestUtils.consumerProps("dlq", "false", embeddedKafka.getEmbeddedKafka());
+		Map consumerProps = KafkaTestUtils.consumerProps("dlq", "false",
+				embeddedKafka.getEmbeddedKafka());
 		consumerProps.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
 		ConsumerFactory cf = new DefaultKafkaConsumerFactory<>(consumerProps);
 		Consumer consumer = cf.createConsumer();
-		embeddedKafka.getEmbeddedKafka().consumeFromAnEmbeddedTopic(consumer, "error.pollableDlq.group-pcWithDlq");
-		ConsumerRecord deadLetter = KafkaTestUtils.getSingleRecord(consumer, "error.pollableDlq.group-pcWithDlq");
+		embeddedKafka.getEmbeddedKafka().consumeFromAnEmbeddedTopic(consumer,
+				"error.pollableDlq.group-pcWithDlq");
+		ConsumerRecord deadLetter = KafkaTestUtils.getSingleRecord(consumer,
+				"error.pollableDlq.group-pcWithDlq");
 		assertThat(deadLetter).isNotNull();
 		assertThat(deadLetter.value()).isEqualTo("testPollableDLQ");
 		binding.unbind();
@@ -2658,21 +2956,26 @@ public class KafkaBinderTests extends
 	@SuppressWarnings({ "rawtypes", "unchecked" })
 	@Test
 	public void testTopicPatterns() throws Exception {
-		try (AdminClient admin = AdminClient.create(Collections.singletonMap(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG,
-				embeddedKafka.getEmbeddedKafka().getBrokersAsString()))) {
-			admin.createTopics(Collections.singletonList(new NewTopic("topicPatterns.1", 1, (short) 1))).all().get();
+		try (AdminClient admin = AdminClient.create(
+				Collections.singletonMap(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG,
+						embeddedKafka.getEmbeddedKafka().getBrokersAsString()))) {
+			admin.createTopics(Collections
+					.singletonList(new NewTopic("topicPatterns.1", 1, (short) 1))).all()
+					.get();
 			Binder binder = getBinder();
 			ExtendedConsumerProperties consumerProperties = createConsumerProperties();
 			consumerProperties.getExtension().setDestinationIsPattern(true);
-			DirectChannel moduleInputChannel = createBindableChannel("input", createConsumerBindingProperties(consumerProperties));
+			DirectChannel moduleInputChannel = createBindableChannel("input",
+					createConsumerBindingProperties(consumerProperties));
 			final CountDownLatch latch = new CountDownLatch(1);
 			final AtomicReference topic = new AtomicReference<>();
 			moduleInputChannel.subscribe(m -> {
 				topic.set(m.getHeaders().get(KafkaHeaders.RECEIVED_TOPIC, String.class));
 				latch.countDown();
 			});
-			Binding consumerBinding = binder.bindConsumer("topicPatterns\\..*",
-					"testTopicPatterns", moduleInputChannel, consumerProperties);
+			Binding consumerBinding = binder.bindConsumer(
+					"topicPatterns\\..*", "testTopicPatterns", moduleInputChannel,
+					consumerProperties);
 			DefaultKafkaProducerFactory pf = new DefaultKafkaProducerFactory(
 					KafkaTestUtils.producerProps(embeddedKafka.getEmbeddedKafka()));
 			KafkaTemplate template = new KafkaTemplate(pf);
@@ -2684,13 +2987,18 @@ public class KafkaBinderTests extends
 		}
 	}
 
-	@Test (expected = TopicExistsException.class)
+	@Test(expected = TopicExistsException.class)
 	public void testSameTopicCannotBeProvisionedAgain() throws Throwable {
-		try (AdminClient admin = AdminClient.create(Collections.singletonMap(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG,
-				embeddedKafka.getEmbeddedKafka().getBrokersAsString()))) {
-			admin.createTopics(Collections.singletonList(new NewTopic("fooUniqueTopic", 1, (short) 1))).all().get();
+		try (AdminClient admin = AdminClient.create(
+				Collections.singletonMap(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG,
+						embeddedKafka.getEmbeddedKafka().getBrokersAsString()))) {
+			admin.createTopics(Collections
+					.singletonList(new NewTopic("fooUniqueTopic", 1, (short) 1))).all()
+					.get();
 			try {
-				admin.createTopics(Collections.singletonList(new NewTopic("fooUniqueTopic", 1, (short) 1))).all().get();
+				admin.createTopics(Collections
+						.singletonList(new NewTopic("fooUniqueTopic", 1, (short) 1)))
+						.all().get();
 			}
 			catch (Exception ex) {
 				assertThat(ex.getCause() instanceof TopicExistsException).isTrue();
@@ -2699,7 +3007,8 @@ public class KafkaBinderTests extends
 		}
 	}
 
-	private final class FailingInvocationCountingMessageHandler implements MessageHandler {
+	private final class FailingInvocationCountingMessageHandler
+			implements MessageHandler {
 
 		private int invocationCount;
 
@@ -2718,7 +3027,8 @@ public class KafkaBinderTests extends
 		@Override
 		public void handleMessage(Message message) throws MessagingException {
 			invocationCount++;
-			Long offset = message.getHeaders().get(KafkaBinderTests.this.getKafkaOffsetHeaderKey(), Long.class);
+			Long offset = message.getHeaders()
+					.get(KafkaBinderTests.this.getKafkaOffsetHeaderKey(), Long.class);
 			// using the offset as key allows to ensure that we don't store duplicate
 			// messages on retry
 			if (!receivedMessages.containsKey(offset)) {
@@ -2739,5 +3049,7 @@ public class KafkaBinderTests extends
 		public CountDownLatch getLatch() {
 			return latch;
 		}
+
 	}
+
 }
diff --git a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderUnitTests.java b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderUnitTests.java
index 6dcf4862e..b5f95231e 100644
--- a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderUnitTests.java
+++ b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderUnitTests.java
@@ -72,87 +72,108 @@ public class KafkaBinderUnitTests {
 	@Test
 	public void testPropertyOverrides() throws Exception {
 		KafkaProperties kafkaProperties = new TestKafkaProperties();
-		KafkaBinderConfigurationProperties binderConfigurationProperties =
-				new KafkaBinderConfigurationProperties(kafkaProperties);
-		KafkaTopicProvisioner provisioningProvider = new KafkaTopicProvisioner(binderConfigurationProperties, kafkaProperties);
-		KafkaMessageChannelBinder binder = new KafkaMessageChannelBinder(binderConfigurationProperties,
-				provisioningProvider);
+		KafkaBinderConfigurationProperties binderConfigurationProperties = new KafkaBinderConfigurationProperties(
+				kafkaProperties);
+		KafkaTopicProvisioner provisioningProvider = new KafkaTopicProvisioner(
+				binderConfigurationProperties, kafkaProperties);
+		KafkaMessageChannelBinder binder = new KafkaMessageChannelBinder(
+				binderConfigurationProperties, provisioningProvider);
 		KafkaConsumerProperties consumerProps = new KafkaConsumerProperties();
-		ExtendedConsumerProperties ecp =
-				new ExtendedConsumerProperties(consumerProps);
-		Method method = KafkaMessageChannelBinder.class.getDeclaredMethod("createKafkaConsumerFactory", boolean.class,
-				String.class, ExtendedConsumerProperties.class);
+		ExtendedConsumerProperties ecp = new ExtendedConsumerProperties(
+				consumerProps);
+		Method method = KafkaMessageChannelBinder.class.getDeclaredMethod(
+				"createKafkaConsumerFactory", boolean.class, String.class,
+				ExtendedConsumerProperties.class);
 		method.setAccessible(true);
 
 		// test default for anon
 		Object factory = method.invoke(binder, true, "foo-1", ecp);
 		Map configs = TestUtils.getPropertyValue(factory, "configs", Map.class);
-		assertThat(configs.get(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG)).isEqualTo("latest");
+		assertThat(configs.get(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG))
+				.isEqualTo("latest");
 
 		// test default for named
 		factory = method.invoke(binder, false, "foo-2", ecp);
 		configs = TestUtils.getPropertyValue(factory, "configs", Map.class);
-		assertThat(configs.get(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG)).isEqualTo("earliest");
+		assertThat(configs.get(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG))
+				.isEqualTo("earliest");
 
 		// binder level setting
-		binderConfigurationProperties.setConfiguration(
-				Collections.singletonMap(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "latest"));
+		binderConfigurationProperties.setConfiguration(Collections
+				.singletonMap(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "latest"));
 		factory = method.invoke(binder, false, "foo-3", ecp);
 		configs = TestUtils.getPropertyValue(factory, "configs", Map.class);
-		assertThat(configs.get(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG)).isEqualTo("latest");
+		assertThat(configs.get(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG))
+				.isEqualTo("latest");
 
 		// consumer level setting
-		consumerProps.setConfiguration(Collections.singletonMap(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest"));
+		consumerProps.setConfiguration(Collections
+				.singletonMap(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest"));
 		factory = method.invoke(binder, false, "foo-4", ecp);
 		configs = TestUtils.getPropertyValue(factory, "configs", Map.class);
-		assertThat(configs.get(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG)).isEqualTo("earliest");
+		assertThat(configs.get(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG))
+				.isEqualTo("earliest");
 	}
 
 	@Test
 	public void testMergedConsumerProperties() {
 		KafkaProperties bootProps = new TestKafkaProperties();
-		bootProps.getConsumer().getProperties().put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "bar");
-		KafkaBinderConfigurationProperties props = new KafkaBinderConfigurationProperties(bootProps);
-		assertThat(props.mergedConsumerConfiguration().get(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG)).isEqualTo("bar");
+		bootProps.getConsumer().getProperties()
+				.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "bar");
+		KafkaBinderConfigurationProperties props = new KafkaBinderConfigurationProperties(
+				bootProps);
+		assertThat(props.mergedConsumerConfiguration()
+				.get(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG)).isEqualTo("bar");
 		props.getConfiguration().put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "baz");
-		assertThat(props.mergedConsumerConfiguration().get(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG)).isEqualTo("baz");
+		assertThat(props.mergedConsumerConfiguration()
+				.get(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG)).isEqualTo("baz");
 		props.getConsumerProperties().put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "qux");
-		assertThat(props.mergedConsumerConfiguration().get(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG)).isEqualTo("qux");
+		assertThat(props.mergedConsumerConfiguration()
+				.get(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG)).isEqualTo("qux");
 	}
 
 	@Test
 	public void testMergedProducerProperties() {
 		KafkaProperties bootProps = new TestKafkaProperties();
 		bootProps.getProducer().getProperties().put(ProducerConfig.RETRIES_CONFIG, "bar");
-		KafkaBinderConfigurationProperties props = new KafkaBinderConfigurationProperties(bootProps);
-		assertThat(props.mergedProducerConfiguration().get(ProducerConfig.RETRIES_CONFIG)).isEqualTo("bar");
+		KafkaBinderConfigurationProperties props = new KafkaBinderConfigurationProperties(
+				bootProps);
+		assertThat(props.mergedProducerConfiguration().get(ProducerConfig.RETRIES_CONFIG))
+				.isEqualTo("bar");
 		props.getConfiguration().put(ProducerConfig.RETRIES_CONFIG, "baz");
-		assertThat(props.mergedProducerConfiguration().get(ProducerConfig.RETRIES_CONFIG)).isEqualTo("baz");
+		assertThat(props.mergedProducerConfiguration().get(ProducerConfig.RETRIES_CONFIG))
+				.isEqualTo("baz");
 		props.getProducerProperties().put(ProducerConfig.RETRIES_CONFIG, "qux");
-		assertThat(props.mergedProducerConfiguration().get(ProducerConfig.RETRIES_CONFIG)).isEqualTo("qux");
+		assertThat(props.mergedProducerConfiguration().get(ProducerConfig.RETRIES_CONFIG))
+				.isEqualTo("qux");
 	}
 
 	@Test
 	public void testOffsetResetWithGroupManagementEarliest() throws Exception {
-		testOffsetResetWithGroupManagement(true, true, "foo-100", "testOffsetResetWithGroupManagementEarliest");
+		testOffsetResetWithGroupManagement(true, true, "foo-100",
+				"testOffsetResetWithGroupManagementEarliest");
 	}
 
 	@Test
 	public void testOffsetResetWithGroupManagementLatest() throws Throwable {
-		testOffsetResetWithGroupManagement(false, true, "foo-101", "testOffsetResetWithGroupManagementLatest");
+		testOffsetResetWithGroupManagement(false, true, "foo-101",
+				"testOffsetResetWithGroupManagementLatest");
 	}
 
 	@Test
 	public void testOffsetResetWithManualAssignmentEarliest() throws Exception {
-		testOffsetResetWithGroupManagement(true, false, "foo-102", "testOffsetResetWithManualAssignmentEarliest");
+		testOffsetResetWithGroupManagement(true, false, "foo-102",
+				"testOffsetResetWithManualAssignmentEarliest");
 	}
 
 	@Test
 	public void testOffsetResetWithGroupManualAssignmentLatest() throws Throwable {
-		testOffsetResetWithGroupManagement(false, false, "foo-103", "testOffsetResetWithGroupManualAssignmentLatest");
+		testOffsetResetWithGroupManagement(false, false, "foo-103",
+				"testOffsetResetWithGroupManualAssignmentLatest");
 	}
 
-	private void testOffsetResetWithGroupManagement(final boolean earliest, boolean groupManage, String topic, String group) throws Exception {
+	private void testOffsetResetWithGroupManagement(final boolean earliest,
+			boolean groupManage, String topic, String group) throws Exception {
 		final List partitions = new ArrayList<>();
 		partitions.add(new TopicPartition(topic, 0));
 		partitions.add(new TopicPartition(topic, 1));
@@ -161,13 +182,15 @@ public class KafkaBinderUnitTests {
 		KafkaTopicProvisioner provisioningProvider = mock(KafkaTopicProvisioner.class);
 		ConsumerDestination dest = mock(ConsumerDestination.class);
 		given(dest.getName()).willReturn(topic);
-		given(provisioningProvider.provisionConsumerDestination(anyString(), anyString(), any())).willReturn(dest);
+		given(provisioningProvider.provisionConsumerDestination(anyString(), anyString(),
+				any())).willReturn(dest);
 		final AtomicInteger part = new AtomicInteger();
 		willAnswer(i -> {
-			return partitions.stream()
-					.map(p -> new PartitionInfo(topic, part.getAndIncrement(), null, null, null))
+			return partitions.stream().map(p -> new PartitionInfo(topic,
+					part.getAndIncrement(), null, null, null))
 					.collect(Collectors.toList());
-		}).given(provisioningProvider).getPartitionsForTopic(anyInt(), anyBoolean(), any(), any());
+		}).given(provisioningProvider).getPartitionsForTopic(anyInt(), anyBoolean(),
+				any(), any());
 		@SuppressWarnings("unchecked")
 		final Consumer consumer = mock(Consumer.class);
 		final CountDownLatch latch = new CountDownLatch(1);
@@ -181,8 +204,8 @@ public class KafkaBinderUnitTests {
 			return new ConsumerRecords<>(Collections.emptyMap());
 		}).given(consumer).poll(any(Duration.class));
 		willAnswer(i -> {
-			((org.apache.kafka.clients.consumer.ConsumerRebalanceListener) i.getArgument(1))
-					.onPartitionsAssigned(partitions);
+			((org.apache.kafka.clients.consumer.ConsumerRebalanceListener) i
+					.getArgument(1)).onPartitionsAssigned(partitions);
 			latch.countDown();
 			return null;
 		}).given(consumer).subscribe(eq(Collections.singletonList(topic)), any());
@@ -194,11 +217,13 @@ public class KafkaBinderUnitTests {
 			latch.countDown();
 			return null;
 		}).given(consumer).seekToEnd(any());
-		KafkaMessageChannelBinder binder = new KafkaMessageChannelBinder(configurationProperties, provisioningProvider) {
+		KafkaMessageChannelBinder binder = new KafkaMessageChannelBinder(
+				configurationProperties, provisioningProvider) {
 
 			@Override
-			protected ConsumerFactory createKafkaConsumerFactory(boolean anonymous, String consumerGroup,
-																	ExtendedConsumerProperties consumerProperties) {
+			protected ConsumerFactory createKafkaConsumerFactory(boolean anonymous,
+					String consumerGroup,
+					ExtendedConsumerProperties consumerProperties) {
 
 				return new ConsumerFactory() {
 
@@ -213,12 +238,14 @@ public class KafkaBinderUnitTests {
 					}
 
 					@Override
-					public Consumer createConsumer(String arg0, String arg1) {
+					public Consumer createConsumer(String arg0,
+							String arg1) {
 						return consumer;
 					}
 
 					@Override
-					public Consumer createConsumer(String groupId, String clientIdPrefix, String clientIdSuffix) {
+					public Consumer createConsumer(String groupId,
+							String clientIdPrefix, String clientIdSuffix) {
 						return consumer;
 					}
 
@@ -247,10 +274,11 @@ public class KafkaBinderUnitTests {
 		KafkaConsumerProperties extension = new KafkaConsumerProperties();
 		extension.setResetOffsets(true);
 		extension.setAutoRebalanceEnabled(groupManage);
-		ExtendedConsumerProperties consumerProperties = new ExtendedConsumerProperties(
+		ExtendedConsumerProperties consumerProperties = new ExtendedConsumerProperties<>(
 				extension);
 		consumerProperties.setInstanceCount(1);
-		Binding messageChannelBinding = binder.bindConsumer(topic, group, channel, consumerProperties);
+		Binding messageChannelBinding = binder.bindConsumer(topic, group,
+				channel, consumerProperties);
 		assertThat(latch.await(10, TimeUnit.SECONDS)).isTrue();
 		@SuppressWarnings("unchecked")
 		ArgumentCaptor> captor = ArgumentCaptor.forClass(Set.class);
diff --git a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaTestBinder.java b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaTestBinder.java
index 20b6fd572..bf77d1fe3 100644
--- a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaTestBinder.java
+++ b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaTestBinder.java
@@ -38,28 +38,31 @@ import org.springframework.kafka.support.ProducerListener;
  */
 public class KafkaTestBinder extends AbstractKafkaTestBinder {
 
-	@SuppressWarnings({"rawtypes", "unchecked"})
-	KafkaTestBinder(KafkaBinderConfigurationProperties binderConfiguration, KafkaTopicProvisioner kafkaTopicProvisioner) {
+	@SuppressWarnings({ "rawtypes", "unchecked" })
+	KafkaTestBinder(KafkaBinderConfigurationProperties binderConfiguration,
+			KafkaTopicProvisioner kafkaTopicProvisioner) {
 		try {
-			KafkaMessageChannelBinder binder = new KafkaMessageChannelBinder(binderConfiguration,
-					kafkaTopicProvisioner) {
+			KafkaMessageChannelBinder binder = new KafkaMessageChannelBinder(
+					binderConfiguration, kafkaTopicProvisioner) {
 
 				/*
-				 * Some tests use multiple instance indexes for the same topic; we need to make
-				 * the error infrastructure beans unique.
+				 * Some tests use multiple instance indexes for the same topic; we need to
+				 * make the error infrastructure beans unique.
 				 */
 				@Override
-				protected String errorsBaseName(ConsumerDestination destination, String group,
-												ExtendedConsumerProperties consumerProperties) {
-					return super.errorsBaseName(destination, group, consumerProperties) + "-"
-							+ consumerProperties.getInstanceIndex();
+				protected String errorsBaseName(ConsumerDestination destination,
+						String group,
+						ExtendedConsumerProperties consumerProperties) {
+					return super.errorsBaseName(destination, group, consumerProperties)
+							+ "-" + consumerProperties.getInstanceIndex();
 				}
 
 			};
 
 			ProducerListener producerListener = new LoggingProducerListener();
 			binder.setProducerListener(producerListener);
-			AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(Config.class);
+			AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(
+					Config.class);
 			setApplicationContext(context);
 			binder.setApplicationContext(context);
 			binder.afterPropertiesSet();
diff --git a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaTransactionTests.java b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaTransactionTests.java
index 4aaa9e035..88ce1c39d 100644
--- a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaTransactionTests.java
+++ b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/KafkaTransactionTests.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2018 the original author or authors.
+ * Copyright 2018-2019 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -61,22 +61,28 @@ public class KafkaTransactionTests {
 	@Test
 	public void testProducerRunsInTx() {
 		KafkaProperties kafkaProperties = new TestKafkaProperties();
-		kafkaProperties.setBootstrapServers(Collections.singletonList(embeddedKafka.getEmbeddedKafka().getBrokersAsString()));
-		KafkaBinderConfigurationProperties configurationProperties =
-				new KafkaBinderConfigurationProperties(kafkaProperties);
+		kafkaProperties.setBootstrapServers(Collections
+				.singletonList(embeddedKafka.getEmbeddedKafka().getBrokersAsString()));
+		KafkaBinderConfigurationProperties configurationProperties = new KafkaBinderConfigurationProperties(
+				kafkaProperties);
 		configurationProperties.getTransaction().setTransactionIdPrefix("foo-");
 		configurationProperties.getTransaction().getProducer().setUseNativeEncoding(true);
-		KafkaTopicProvisioner provisioningProvider = new KafkaTopicProvisioner(configurationProperties, kafkaProperties);
+		KafkaTopicProvisioner provisioningProvider = new KafkaTopicProvisioner(
+				configurationProperties, kafkaProperties);
 		provisioningProvider.setMetadataRetryOperations(new RetryTemplate());
 		final Producer mockProducer = mock(Producer.class);
-		willReturn(Collections.singletonList(new TopicPartition("foo", 0))).given(mockProducer).partitionsFor(anyString());
-		KafkaMessageChannelBinder binder = new KafkaMessageChannelBinder(configurationProperties, provisioningProvider) {
+		willReturn(Collections.singletonList(new TopicPartition("foo", 0)))
+				.given(mockProducer).partitionsFor(anyString());
+		KafkaMessageChannelBinder binder = new KafkaMessageChannelBinder(
+				configurationProperties, provisioningProvider) {
 
 			@Override
-			protected DefaultKafkaProducerFactory getProducerFactory(String transactionIdPrefix,
+			protected DefaultKafkaProducerFactory getProducerFactory(
+					String transactionIdPrefix,
 					ExtendedProducerProperties producerProperties) {
-				DefaultKafkaProducerFactory producerFactory =
-						spy(super.getProducerFactory(transactionIdPrefix, producerProperties));
+				DefaultKafkaProducerFactory producerFactory = spy(
+						super.getProducerFactory(transactionIdPrefix,
+								producerProperties));
 				willReturn(mockProducer).given(producerFactory).createProducer();
 				return producerFactory;
 			}
@@ -87,7 +93,8 @@ public class KafkaTransactionTests {
 		binder.setApplicationContext(applicationContext);
 		DirectChannel channel = new DirectChannel();
 		KafkaProducerProperties extension = new KafkaProducerProperties();
-		ExtendedProducerProperties properties = new ExtendedProducerProperties<>(extension);
+		ExtendedProducerProperties properties = new ExtendedProducerProperties<>(
+				extension);
 		binder.bindProducer("foo", channel, properties);
 		channel.send(new GenericMessage<>("foo".getBytes()));
 		InOrder inOrder = inOrder(mockProducer);
@@ -96,8 +103,8 @@ public class KafkaTransactionTests {
 		inOrder.verify(mockProducer).commitTransaction();
 		inOrder.verify(mockProducer).close();
 		inOrder.verifyNoMoreInteractions();
-		assertThat(TestUtils.getPropertyValue(channel, "dispatcher.theOneHandler.useNativeEncoding", Boolean.class))
-				.isTrue();
+		assertThat(TestUtils.getPropertyValue(channel,
+				"dispatcher.theOneHandler.useNativeEncoding", Boolean.class)).isTrue();
 	}
 
 }
diff --git a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/RawKafkaPartitionTestSupport.java b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/RawKafkaPartitionTestSupport.java
index b0f8da029..9e474ba0b 100644
--- a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/RawKafkaPartitionTestSupport.java
+++ b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/RawKafkaPartitionTestSupport.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2014 the original author or authors.
+ * Copyright 2014-2019 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -23,7 +23,8 @@ import org.springframework.messaging.Message;
 /**
  * @author Marius Bogoevici
  */
-public class RawKafkaPartitionTestSupport implements PartitionKeyExtractorStrategy, PartitionSelectorStrategy {
+public class RawKafkaPartitionTestSupport
+		implements PartitionKeyExtractorStrategy, PartitionSelectorStrategy {
 
 	@Override
 	public int selectPartition(Object key, int divisor) {
diff --git a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/TestKafkaProperties.java b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/TestKafkaProperties.java
index cf52d42e8..e03a9e9e3 100644
--- a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/TestKafkaProperties.java
+++ b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/TestKafkaProperties.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2018 the original author or authors.
+ * Copyright 2018-2019 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/bootstrap/KafkaBinderBootstrapTest.java b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/bootstrap/KafkaBinderBootstrapTest.java
index a4de2c2ac..01dd42c10 100644
--- a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/bootstrap/KafkaBinderBootstrapTest.java
+++ b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/bootstrap/KafkaBinderBootstrapTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017 the original author or authors.
+ * Copyright 2017-2019 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -35,15 +35,18 @@ public class KafkaBinderBootstrapTest {
 
 	@Test
 	public void testKafkaBinderConfiguration() throws Exception {
-		ConfigurableApplicationContext applicationContext = new SpringApplicationBuilder(SimpleApplication.class)
-				.web(WebApplicationType.NONE)
-				.run("--spring.cloud.stream.kafka.binder.brokers=" + embeddedKafka.getEmbeddedKafka().getBrokersAsString(),
-					"--spring.cloud.stream.kafka.binder.zkNodes=" + embeddedKafka.getEmbeddedKafka().getZookeeperConnectionString());
+		ConfigurableApplicationContext applicationContext = new SpringApplicationBuilder(
+				SimpleApplication.class).web(WebApplicationType.NONE).run(
+						"--spring.cloud.stream.kafka.binder.brokers="
+								+ embeddedKafka.getEmbeddedKafka().getBrokersAsString(),
+						"--spring.cloud.stream.kafka.binder.zkNodes=" + embeddedKafka
+								.getEmbeddedKafka().getZookeeperConnectionString());
 		applicationContext.close();
 	}
 
 	@SpringBootApplication
 	static class SimpleApplication {
+
 	}
 
 }
diff --git a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/KafkaBinderActuatorTests.java b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/KafkaBinderActuatorTests.java
index 926b0ed3b..f36785045 100644
--- a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/KafkaBinderActuatorTests.java
+++ b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/KafkaBinderActuatorTests.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2018 the original author or authors.
+ * Copyright 2018-2019 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -52,12 +52,13 @@ import static org.assertj.core.api.Assertions.assertThat;
  * @author Artem Bilan
  * @author Oleg Zhurakousky
  * @author Jon Schneider
- *
  * @since 2.0
  */
 @RunWith(SpringRunner.class)
-@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE,
-		properties = "spring.cloud.stream.bindings.input.group=" + KafkaBinderActuatorTests.TEST_CONSUMER_GROUP)
+// @checkstyle:off
+@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, properties = "spring.cloud.stream.bindings.input.group="
+		+ KafkaBinderActuatorTests.TEST_CONSUMER_GROUP)
+// @checkstyle:on
 public class KafkaBinderActuatorTests {
 
 	static final String TEST_CONSUMER_GROUP = "testGroup-actuatorTests";
@@ -69,7 +70,8 @@ public class KafkaBinderActuatorTests {
 
 	@BeforeClass
 	public static void setup() {
-		System.setProperty(KAFKA_BROKERS_PROPERTY, kafkaEmbedded.getEmbeddedKafka().getBrokersAsString());
+		System.setProperty(KAFKA_BROKERS_PROPERTY,
+				kafkaEmbedded.getEmbeddedKafka().getBrokersAsString());
 	}
 
 	@AfterClass
@@ -89,26 +91,30 @@ public class KafkaBinderActuatorTests {
 		this.kafkaTemplate.flush();
 
 		assertThat(this.meterRegistry.get("spring.cloud.stream.binder.kafka.offset")
-				.tag("group", TEST_CONSUMER_GROUP)
-				.tag("topic", Sink.INPUT)
-				.gauge().value()).isGreaterThan(0);
+				.tag("group", TEST_CONSUMER_GROUP).tag("topic", Sink.INPUT).gauge()
+				.value()).isGreaterThan(0);
 	}
 
 	@Test
 	public void testKafkaBinderMetricsWhenNoMicrometer() {
-		new ApplicationContextRunner()
-				.withUserConfiguration(KafkaMetricsTestConfig.class)
+		new ApplicationContextRunner().withUserConfiguration(KafkaMetricsTestConfig.class)
 				.withClassLoader(new FilteredClassLoader("io.micrometer.core"))
 				.run(context -> {
-					assertThat(context.getBeanNamesForType(MeterRegistry.class)).isEmpty();
+					assertThat(context.getBeanNamesForType(MeterRegistry.class))
+							.isEmpty();
 					assertThat(context.getBeanNamesForType(MeterBinder.class)).isEmpty();
 
-					DirectFieldAccessor channelBindingServiceAccessor = new DirectFieldAccessor(context.getBean(BindingService.class));
+					DirectFieldAccessor channelBindingServiceAccessor = new DirectFieldAccessor(
+							context.getBean(BindingService.class));
+					// @checkstyle:off
 					@SuppressWarnings("unchecked")
 					Map>> consumerBindings = (Map>>) channelBindingServiceAccessor
 							.getPropertyValue("consumerBindings");
-					assertThat(new DirectFieldAccessor(consumerBindings.get("input").get(0)).getPropertyValue("lifecycle.messageListenerContainer.beanName"))
-						.isEqualTo("setByCustomizer:input");
+					// @checkstyle:on
+					assertThat(new DirectFieldAccessor(
+							consumerBindings.get("input").get(0)).getPropertyValue(
+									"lifecycle.messageListenerContainer.beanName"))
+											.isEqualTo("setByCustomizer:input");
 				});
 	}
 
diff --git a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/KafkaBinderExtendedPropertiesTest.java b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/KafkaBinderExtendedPropertiesTest.java
index 9a1009ae1..f6effa631 100644
--- a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/KafkaBinderExtendedPropertiesTest.java
+++ b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/integration/KafkaBinderExtendedPropertiesTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2018 the original author or authors.
+ * Copyright 2018-2019 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -60,17 +60,18 @@ import static org.assertj.core.api.Assertions.assertThat;
  * @author Gary Russell
  */
 @RunWith(SpringRunner.class)
-@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE,
-properties = {"spring.cloud.stream.kafka.bindings.standard-out.producer.configuration.key.serializer=FooSerializer.class",
+@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, properties = {
+		"spring.cloud.stream.kafka.bindings.standard-out.producer.configuration.key.serializer=FooSerializer.class",
 		"spring.cloud.stream.kafka.default.producer.configuration.key.serializer=BarSerializer.class",
 		"spring.cloud.stream.kafka.default.producer.configuration.value.serializer=BarSerializer.class",
 		"spring.cloud.stream.kafka.bindings.standard-in.consumer.configuration.key.serializer=FooSerializer.class",
 		"spring.cloud.stream.kafka.default.consumer.configuration.key.serializer=BarSerializer.class",
 		"spring.cloud.stream.kafka.default.consumer.configuration.value.serializer=BarSerializer.class",
 		"spring.cloud.stream.kafka.default.producer.configuration.foo=bar",
-		"spring.cloud.stream.kafka.bindings.standard-out.producer.configuration.foo=bindingSpecificPropertyShouldWinOverDefault",
+		"spring.cloud.stream.kafka.bindings.standard-out.producer.configuration.foo="
+				+ "bindingSpecificPropertyShouldWinOverDefault",
 		"spring.cloud.stream.kafka.default.consumer.ackEachRecord=true",
-		"spring.cloud.stream.kafka.bindings.custom-in.consumer.ackEachRecord=false"})
+		"spring.cloud.stream.kafka.bindings.custom-in.consumer.ackEachRecord=false" })
 public class KafkaBinderExtendedPropertiesTest {
 
 	private static final String KAFKA_BROKERS_PROPERTY = "spring.cloud.stream.kafka.binder.brokers";
@@ -80,7 +81,8 @@ public class KafkaBinderExtendedPropertiesTest {
 
 	@BeforeClass
 	public static void setup() {
-		System.setProperty(KAFKA_BROKERS_PROPERTY, kafkaEmbedded.getEmbeddedKafka().getBrokersAsString());
+		System.setProperty(KAFKA_BROKERS_PROPERTY,
+				kafkaEmbedded.getEmbeddedKafka().getBrokersAsString());
 	}
 
 	@AfterClass
@@ -94,50 +96,73 @@ public class KafkaBinderExtendedPropertiesTest {
 	@Test
 	public void testKafkaBinderExtendedProperties() throws Exception {
 
-		BinderFactory binderFactory = context.getBeanFactory().getBean(BinderFactory.class);
-		Binder kafkaBinder =
-				binderFactory.getBinder("kafka", MessageChannel.class);
+		BinderFactory binderFactory = context.getBeanFactory()
+				.getBean(BinderFactory.class);
+		Binder kafkaBinder = binderFactory
+				.getBinder("kafka", MessageChannel.class);
 
-		KafkaProducerProperties kafkaProducerProperties =
-				(KafkaProducerProperties)((ExtendedPropertiesBinder) kafkaBinder).getExtendedProducerProperties("standard-out");
+		KafkaProducerProperties kafkaProducerProperties = (KafkaProducerProperties) ((ExtendedPropertiesBinder) kafkaBinder)
+				.getExtendedProducerProperties("standard-out");
 
-		//binding "standard-out" gets FooSerializer defined on the binding itself and BarSerializer through default property.
-		assertThat(kafkaProducerProperties.getConfiguration().get("key.serializer")).isEqualTo("FooSerializer.class");
-		assertThat(kafkaProducerProperties.getConfiguration().get("value.serializer")).isEqualTo("BarSerializer.class");
+		// binding "standard-out" gets FooSerializer defined on the binding itself
+		// and BarSerializer through default property.
+		assertThat(kafkaProducerProperties.getConfiguration().get("key.serializer"))
+				.isEqualTo("FooSerializer.class");
+		assertThat(kafkaProducerProperties.getConfiguration().get("value.serializer"))
+				.isEqualTo("BarSerializer.class");
 
-		assertThat(kafkaProducerProperties.getConfiguration().get("foo")).isEqualTo("bindingSpecificPropertyShouldWinOverDefault");
+		assertThat(kafkaProducerProperties.getConfiguration().get("foo"))
+				.isEqualTo("bindingSpecificPropertyShouldWinOverDefault");
 
-		KafkaConsumerProperties kafkaConsumerProperties =
-				(KafkaConsumerProperties)((ExtendedPropertiesBinder) kafkaBinder).getExtendedConsumerProperties("standard-in");
+		// @checkstyle:off
+		KafkaConsumerProperties kafkaConsumerProperties = (KafkaConsumerProperties) ((ExtendedPropertiesBinder) kafkaBinder)
+				.getExtendedConsumerProperties("standard-in");
+		// @checkstyle:on
+		// binding "standard-in" gets FooSerializer defined on the binding itself
+		// and BarSerializer through default property.
+		assertThat(kafkaConsumerProperties.getConfiguration().get("key.serializer"))
+				.isEqualTo("FooSerializer.class");
+		assertThat(kafkaConsumerProperties.getConfiguration().get("value.serializer"))
+				.isEqualTo("BarSerializer.class");
 
-		//binding "standard-in" gets FooSerializer defined on the binding itself and BarSerializer through default property.
-		assertThat(kafkaConsumerProperties.getConfiguration().get("key.serializer")).isEqualTo("FooSerializer.class");
-		assertThat(kafkaConsumerProperties.getConfiguration().get("value.serializer")).isEqualTo("BarSerializer.class");
+		// @checkstyle:off
+		KafkaProducerProperties customKafkaProducerProperties = (KafkaProducerProperties) ((ExtendedPropertiesBinder) kafkaBinder)
+				.getExtendedProducerProperties("custom-out");
+		// @checkstyle:on
 
-		KafkaProducerProperties customKafkaProducerProperties =
-				(KafkaProducerProperties)((ExtendedPropertiesBinder) kafkaBinder).getExtendedProducerProperties("custom-out");
+		// binding "standard-out" gets BarSerializer and BarSerializer for
+		// key.serializer/value.serializer through default properties.
+		assertThat(customKafkaProducerProperties.getConfiguration().get("key.serializer"))
+				.isEqualTo("BarSerializer.class");
+		assertThat(
+				customKafkaProducerProperties.getConfiguration().get("value.serializer"))
+						.isEqualTo("BarSerializer.class");
 
-		//binding "standard-out" gets BarSerializer and BarSerializer for ker.serializer/value.serializer through default properties.
-		assertThat(customKafkaProducerProperties.getConfiguration().get("key.serializer")).isEqualTo("BarSerializer.class");
-		assertThat(customKafkaProducerProperties.getConfiguration().get("value.serializer")).isEqualTo("BarSerializer.class");
+		// through default properties.
+		assertThat(customKafkaProducerProperties.getConfiguration().get("foo"))
+				.isEqualTo("bar");
 
-		//through default properties.
-		assertThat(customKafkaProducerProperties.getConfiguration().get("foo")).isEqualTo("bar");
-
-		KafkaConsumerProperties customKafkaConsumerProperties =
-				(KafkaConsumerProperties)((ExtendedPropertiesBinder) kafkaBinder).getExtendedConsumerProperties("custom-in");
-
-		//binding "standard-in" gets BarSerializer and BarSerializer for ker.serializer/value.serializer through default properties.
-		assertThat(customKafkaConsumerProperties.getConfiguration().get("key.serializer")).isEqualTo("BarSerializer.class");
-		assertThat(customKafkaConsumerProperties.getConfiguration().get("value.serializer")).isEqualTo("BarSerializer.class");
+		// @checkstyle:off
+		KafkaConsumerProperties customKafkaConsumerProperties = (KafkaConsumerProperties) ((ExtendedPropertiesBinder) kafkaBinder)
+				.getExtendedConsumerProperties("custom-in");
+		// @checkstyle:on
+		// binding "standard-in" gets BarSerializer and BarSerializer for
+		// key.serializer/value.serializer through default properties.
+		assertThat(customKafkaConsumerProperties.getConfiguration().get("key.serializer"))
+				.isEqualTo("BarSerializer.class");
+		assertThat(
+				customKafkaConsumerProperties.getConfiguration().get("value.serializer"))
+						.isEqualTo("BarSerializer.class");
 
 		assertThat(kafkaConsumerProperties.isAckEachRecord()).isEqualTo(true);
 		assertThat(customKafkaConsumerProperties.isAckEachRecord()).isEqualTo(false);
 
 		RebalanceListener rebalanceListener = context.getBean(RebalanceListener.class);
 		assertThat(rebalanceListener.latch.await(10, TimeUnit.SECONDS)).isTrue();
-		assertThat(rebalanceListener.bindings.keySet()).contains("standard-in", "custom-in");
-		assertThat(rebalanceListener.bindings.values()).containsExactly(Boolean.TRUE, Boolean.TRUE);
+		assertThat(rebalanceListener.bindings.keySet()).contains("standard-in",
+				"custom-in");
+		assertThat(rebalanceListener.bindings.values()).containsExactly(Boolean.TRUE,
+				Boolean.TRUE);
 	}
 
 	@EnableBinding(CustomBindingForExtendedPropertyTesting.class)
@@ -176,6 +201,7 @@ public class KafkaBinderExtendedPropertiesTest {
 
 		@Output("custom-out")
 		MessageChannel customOut();
+
 	}
 
 	public static class RebalanceListener implements KafkaBindingRebalanceListener {
@@ -185,14 +211,14 @@ public class KafkaBinderExtendedPropertiesTest {
 		private final CountDownLatch latch = new CountDownLatch(2);
 
 		@Override
-		public void onPartitionsRevokedBeforeCommit(String bindingName, Consumer consumer,
-				Collection partitions) {
+		public void onPartitionsRevokedBeforeCommit(String bindingName,
+				Consumer consumer, Collection partitions) {
 
 		}
 
 		@Override
-		public void onPartitionsRevokedAfterCommit(String bindingName, Consumer consumer,
-				Collection partitions) {
+		public void onPartitionsRevokedAfterCommit(String bindingName,
+				Consumer consumer, Collection partitions) {
 
 		}