From 7c3b457f624f95baaddfe75bb1f3f2515e420b5b Mon Sep 17 00:00:00 2001 From: Soby Chacko Date: Mon, 12 Mar 2018 14:00:42 -0400 Subject: [PATCH] jdbc source sample cleanup --- source-samples/jdbc-source/src/main/resources/application.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source-samples/jdbc-source/src/main/resources/application.yml b/source-samples/jdbc-source/src/main/resources/application.yml index 92d2233..6de86cf 100644 --- a/source-samples/jdbc-source/src/main/resources/application.yml +++ b/source-samples/jdbc-source/src/main/resources/application.yml @@ -10,4 +10,6 @@ jdbc: spring.cloud.stream.bindings.output.destination: test-data spring.cloud.stream.bindings.input.destination: test-data -spring.cloud.stream.default.producer.partitionKeyExpression: '#{0}' \ No newline at end of file +#always use partition 0, but using a complex SpeL below to test the fix for this issue: +#https://github.com/spring-cloud/spring-cloud-stream/issues/1297 +spring.cloud.stream.default.producer.partitionkeyexpression: "payload != null ? 0 : 1" \ No newline at end of file