You can read more about instanceCount
and instanceIndex
from the SCSt's reference guide.
Here's a demonstration of how these properties can be used.
If you don't care for partitioned streaming scenario and that you're interested only in parallelizing the "compute", you'd merely just scale the number of instances.
Unlike cloud-runtime specific implementations, in SCDF's Local-server, however, there's no "runtime" scaling support, but you can deploy the stream with app-specific instance counts.
For instance, in the example above, we are deploying a stream named foo
with deployer.appender.count=3
. SCDF will deploy 3-instances of appender
App, and by default, all the instances will compete for messages. Hence, they will be in an automatic load-balanced state to parallelize compute operation.
All that said, just by scaling the consumer instances, you may not still reach the desired throughput. You may have to tweak the prefetch, concurrency, and other Rabbit consumer configurations to maximize for your environment. Alternatively, you could use Rabbit's performance benchmark tooling to measure its raw throughput and compare it with business logic embedded as SCSt/SCDF workload.
UPDATE
Also, when you use SCDF with Skipper, you'd have the visibility into all the automation behind streaming property overrides priovided by SCDF.
Here's an example output for appender
app.
dataflow:>stream manifest --name foo
"apiVersion": "skipper.spring.io/v1"
"kind": "SpringCloudDeployerApplication"
"metadata":
"name": "appender"
"spec":
"resource": "https://github.com/sabbyanandan/partitions/raw/master/jars/appender"
"resourceMetadata": "https://github.com/sabbyanandan/partitions/raw/master/jars/appender:jar:metadata:0.0.1-SNAPSHOT"
"version": "0.0.1-SNAPSHOT"
"applicationProperties":
"spring.metrics.export.triggers.application.includes": "integration**"
"spring.cloud.dataflow.stream.app.label": "appender"
"spring.cloud.stream.instanceCount": "3"
"spring.cloud.stream.metrics.key": "foo.appender.${spring.cloud.application.guid}"
"spring.cloud.stream.bindings.input.group": "foo"
"spring.cloud.stream.metrics.properties": "spring.application.name,spring.application.index,spring.cloud.application.*,spring.cloud.dataflow.*"
"spring.cloud.stream.bindings.output.producer.requiredGroups": "foo"
"spring.cloud.dataflow.stream.name": "foo"
"spring.cloud.stream.bindings.output.destination": "foo.appender"
"spring.cloud.dataflow.stream.app.type": "processor"
"spring.cloud.stream.bindings.input.consumer.partitioned": "true"
"spring.cloud.stream.bindings.input.destination": "foo.fruits"
"deploymentProperties":
"spring.cloud.deployer.indexed": "true"
"spring.cloud.deployer.count": "3"
"spring.cloud.deployer.group": "foo"