# Is there a centralized way in Temporal to notify all workers running on different JVM to suspend polling?

**URL:** https://community.temporal.io/t/is-there-a-centralized-way-in-temporal-to-notify-all-workers-running-on-different-jvm-to-suspend-polling/4315
**Category:** Community Support
**Tags:** java-sdk, signals
**Created:** [March 30, 2022, 12:24pm UTC](https://community.temporal.io/t/is-there-a-centralized-way-in-temporal-to-notify-all-workers-running-on-different-jvm-to-suspend-polling/4315 "2022-03-30T12:24:11Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![William\_Lam](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/william_lam/32/1822_2.png) [@William\_Lam](https://community.temporal.io/u/William_Lam)
#### Post date: [March 30, 2022, 12:24pm UTC](https://community.temporal.io/t/is-there-a-centralized-way-in-temporal-to-notify-all-workers-running-on-different-jvm-to-suspend-polling/4315/1 "2022-03-30T12:24:11Z")

</div>

Previously I found out from @maxim (over slack) that it is not possible to suspend polling on workers from a remote process. We are planning to use Temporal with multiple pods running in kubenetes with auto scaling, and need a way to suspend all workers on demand, is having a delegated workflow running on each pod and listen to a pubsub message to act on the “local” workers a feasible option? Any better approach you can suggest?

[Maxim Fateev]  
It is not possible to suspend polling from a separate process.  
We plan to add admin features for this, but there is no ETA.

---

<div class="post-metadata">

### Author: ![tihomir](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/tihomir/32/6580_2.png) [@tihomir](https://community.temporal.io/u/tihomir)
#### Post date: [March 30, 2022, 1:42pm UTC](https://community.temporal.io/t/is-there-a-centralized-way-in-temporal-to-notify-all-workers-running-on-different-jvm-to-suspend-polling/4315/2 "2022-03-30T13:42:52Z")

</div>

I believe [here](https://github.com/temporalio/temporal/issues/1012) is the related open issue for this request, and [here](https://community.temporal.io/t/signal-workers-or-queues-to-susped-resume-polling-or-to-change-other-rate-limiting-attributes/4042) is the related forum post.  
The feature mentioned in the issue is still to be implemented. See if [Maxims answer](https://community.temporal.io/t/signal-workers-or-queues-to-susped-resume-polling-or-to-change-other-rate-limiting-attributes/4042/2) in the mentioned post would help for now.

---

<div class="post-metadata">

### Author: ![William\_Lam](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/william_lam/32/1822_2.png) [@William\_Lam](https://community.temporal.io/u/William_Lam)
#### Post date: [April 1, 2022, 3:27pm UTC](https://community.temporal.io/t/is-there-a-centralized-way-in-temporal-to-notify-all-workers-running-on-different-jvm-to-suspend-polling/4315/3 "2022-04-01T15:27:37Z")

</div>

Thanks @tihomir , some follow up questions,

> [@Signal workers or queues to susped / resume polling or to change other rate limiting attributes](https://community.temporal.io/t/signal-workers-or-queues-to-susped-resume-polling-or-to-change-other-rate-limiting-attributes/4042/2):
>
> Workflows should not ever be tied to specific workers.

Is it because a workflow can get picked up by a worker running in a different process/pod?

> [@Signal workers or queues to susped / resume polling or to change other rate limiting attributes](https://community.temporal.io/t/signal-workers-or-queues-to-susped-resume-polling-or-to-change-other-rate-limiting-attributes/4042/2):
>
> You can have an activity listening on a worker-specific task queue. Then use that activity to act on other workers in the same process

1. how would this activity find the workers?
2. If I have 2 processes running, how would I ensure this activity will be run on both processes?

> [@Signal workers or queues to susped / resume polling or to change other rate limiting attributes](https://community.temporal.io/t/signal-workers-or-queues-to-susped-resume-polling-or-to-change-other-rate-limiting-attributes/4042/2):
>
> So a host when coming up would require registration through a signal to this notification workflow or getting identities of the workers from DescribeTaskQueue request and constructing queue name from identity for each worker.

I couldn’t find reference in Java API doc for `DescribeTaskQueue` and am confused about the registration part.

Appreciate any help on this topic.

---

<div class="post-metadata">

### Author: ![tihomir](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/tihomir/32/6580_2.png) [@tihomir](https://community.temporal.io/u/tihomir)
#### Post date: [April 1, 2022, 8:31pm UTC](https://community.temporal.io/t/is-there-a-centralized-way-in-temporal-to-notify-all-workers-running-on-different-jvm-to-suspend-polling/4315/4 "2022-04-01T20:31:01Z")

</div>

> Is it because a workflow can get picked up by a worker running in a different process/pod?

In case of a worker failure (for example it goes down) your workflow execution could be continued on a different worker.

> I couldn’t find reference in Java API doc for `DescribeTaskQueue` and am confused about the registration part.

Here is an example:

```auto
TaskQueue tq = TaskQueue.newBuilder().setKind(TaskQueueKind.TASK_QUEUE_KIND_NORMAL)
   .setName(taskQueueName).build();

        DescribeTaskQueueRequest req = DescribeTaskQueueRequest.newBuilder()
                .setNamespace(client.getOptions().getNamespace())
                .setTaskQueue(tq)
                .setTaskQueueType(TaskQueueType.TASK_QUEUE_TYPE_WORKFLOW)
                .build();
        DescribeTaskQueueResponse res = service.blockingStub().describeTaskQueue(req);
        for (PollerInfo pollerInfo : res.getPollersList()) {
           // get poller identity from pollerInfo.getIdentity();
        }

```

You can set identity in your client via WorkflowClientOptions (identity is used to identify a worker and is also recorded in workflow history), for example:

```auto
    WorkflowClient client = WorkflowClient.newInstance(service,
            WorkflowClientOptions.newBuilder()
                    .setIdentity("myIdentity")
                    .build();

```

---

<div class="post-metadata">

### Author: ![tihomir](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/tihomir/32/6580_2.png) [@tihomir](https://community.temporal.io/u/tihomir)
#### Post date: [April 1, 2022, 8:49pm UTC](https://community.temporal.io/t/is-there-a-centralized-way-in-temporal-to-notify-all-workers-running-on-different-jvm-to-suspend-polling/4315/5 "2022-04-01T20:49:23Z")

</div>

> 1. how would this activity find the workers?

One way described is using DescribeTaskQueue api

> 1. If I have 2 processes running, how would I ensure this activity will be run on both processes?

I believe in this case each process would have a worker polling that worker-specific task queue that hosts this activity.
