diff --git a/sink-samples/jdbc-sink/README.adoc b/sink-samples/jdbc-sink/README.adoc index 69736cc..ca656e7 100644 --- a/sink-samples/jdbc-sink/README.adoc +++ b/sink-samples/jdbc-sink/README.adoc @@ -38,7 +38,7 @@ The following instructions assume that you are running Kafka and MySql as Docker When you start the app, it will create a table in the database. See the method annotated with`PostConstruct` in the application for more details. -* `java -jar target/sample-jdbc-sink-0.0.1-SNAPSHOT.jar` +* `java -jar target/jdbc-sink-0.0.1-SNAPSHOT.jar` The application has a convenient test source that sends to the same destination on the broker where the sink consumes data from. This test source will send some test records every second. diff --git a/source-samples/jdbc-source/src/main/java/demo/SampleJdbcSource.java b/source-samples/jdbc-source/src/main/java/demo/SampleJdbcSource.java index f35c7f2..027267a 100644 --- a/source-samples/jdbc-source/src/main/java/demo/SampleJdbcSource.java +++ b/source-samples/jdbc-source/src/main/java/demo/SampleJdbcSource.java @@ -52,6 +52,7 @@ import java.util.concurrent.TimeUnit; public class SampleJdbcSource { public static void main(String... args){ + SpringApplication.run(SampleJdbcSource.class, args); } diff --git a/source-samples/jdbc-source/src/main/resources/application.yml b/source-samples/jdbc-source/src/main/resources/application.yml index a82b8dd..92d2233 100644 --- a/source-samples/jdbc-source/src/main/resources/application.yml +++ b/source-samples/jdbc-source/src/main/resources/application.yml @@ -8,4 +8,6 @@ jdbc: query: select id, name, tag from test order by id triggerDelay: 5 spring.cloud.stream.bindings.output.destination: test-data -spring.cloud.stream.bindings.input.destination: test-data \ No newline at end of file +spring.cloud.stream.bindings.input.destination: test-data + +spring.cloud.stream.default.producer.partitionKeyExpression: '#{0}' \ No newline at end of file