From 0153c27e8a87a2345e839e1064e2992d61583369 Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Wed, 3 Jun 2015 15:01:52 -0400 Subject: [PATCH] partitioning example added commented-out properties with an explanation in the bootstrap.yml files for the source and sink sample apps --- spring-xd-samples/sink/src/main/resources/bootstrap.yml | 4 ++++ spring-xd-samples/source/src/main/resources/bootstrap.yml | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/spring-xd-samples/sink/src/main/resources/bootstrap.yml b/spring-xd-samples/sink/src/main/resources/bootstrap.yml index 25fe1436c..3c1bf0f28 100644 --- a/spring-xd-samples/sink/src/main/resources/bootstrap.yml +++ b/spring-xd-samples/sink/src/main/resources/bootstrap.yml @@ -4,3 +4,7 @@ spring: group: testtock name: logger index: 1 + # uncomment below to have this module consume from a specific partition + # in the range of 0 to N-1, where N is the upstream module's partitionCount + #consumerProperties: + # partitionIndex: 1 diff --git a/spring-xd-samples/source/src/main/resources/bootstrap.yml b/spring-xd-samples/source/src/main/resources/bootstrap.yml index 0acc7746d..c67aff2a8 100644 --- a/spring-xd-samples/source/src/main/resources/bootstrap.yml +++ b/spring-xd-samples/source/src/main/resources/bootstrap.yml @@ -3,3 +3,9 @@ spring: bus: group: testtock name: ticker + # uncomment below to use the last digit of the seconds as a partition key + # hashcode(key) % N is then applied with N being the partitionCount value + # thus, even seconds should go to the 0 queue, odd seconds to the 1 queue + #producerProperties: + # partitionKeyExpression: payload.charAt(payload.length()-1) + # partitionCount: 2