diff --git a/src/main/java/com/uber/cadence/worker/Worker.java b/src/main/java/com/uber/cadence/worker/Worker.java index 2bbe25358..7f2d0e706 100644 --- a/src/main/java/com/uber/cadence/worker/Worker.java +++ b/src/main/java/com/uber/cadence/worker/Worker.java @@ -84,10 +84,11 @@ public final class Worker implements Suspendable { SingleWorkerOptions activityOptions = SingleWorkerOptions.newBuilder() - .setDataConverter(client.getOptions().getDataConverter()) .setIdentity(client.getOptions().getIdentity()) - .setPollerOptions(options.getActivityPollerOptions()) + .setDataConverter(client.getOptions().getDataConverter()) .setTaskExecutorThreadPoolSize(options.getMaxConcurrentActivityExecutionSize()) + .setTaskListActivitiesPerSecond(options.getTaskListActivitiesPerSecond()) + .setPollerOptions(options.getActivityPollerOptions()) .setMetricsScope(metricsScope) .setEnableLoggingInReplay(factoryOptions.isEnableLoggingInReplay()) .setContextPropagators(contextPropagators) diff --git a/src/main/java/com/uber/cadence/worker/WorkerOptions.java b/src/main/java/com/uber/cadence/worker/WorkerOptions.java index cb66b3ade..5b27b5e89 100644 --- a/src/main/java/com/uber/cadence/worker/WorkerOptions.java +++ b/src/main/java/com/uber/cadence/worker/WorkerOptions.java @@ -192,6 +192,10 @@ public int getMaxConcurrentLocalActivityExecutionSize() { return maxConcurrentLocalActivityExecutionSize; } + public double getTaskListActivitiesPerSecond() { + return taskListActivitiesPerSecond; + } + public PollerOptions getActivityPollerOptions() { return activityPollerOptions; }