John Doe
John Doe

Reputation: 2491

How to set a max retry value in App Engine Task Queue?

I have the following retry parameters:

<retry-parameters>
    <task-retry-limit>7</task-retry-limit>
    <task-age-limit>1d</task-age-limit>
    <min-backoff-seconds>1</min-backoff-seconds>
    <max-backoff-seconds>30</max-backoff-seconds>
</retry-parameters>

But when I check the queue, I see retries like 45. I had set the task-retry-limit to 7. So why is it going beyond that? How to set a max retry value? I am using App Engine standard with push based task queue and Java 8 env. Thanks.


private Queue fsQueue = QueueFactory.getQueue(FS_QUEUE_NAME);
// ...

Product fp = new Product();
fp.setId("someid");
// ...
TaskOptions opts = TaskOptions.Builder.withUrl("/api/task/fs/product").method(TaskOptions.Method.POST)
                .payload(utils.toJSONBytes(fp), "application/json");
fsQueue.add(opts);

Upvotes: 0

Views: 903

Answers (1)

Miguel
Miguel

Reputation: 996

I think that your issue is related to the fact of using the queue.xml being deprecated. You should be using the queue.yaml instead.

You should also bear in mind that if you are using the Cloud Tasks API to manage your queue as well this might cause some collisions. In this documentation you'll find information on how to handle the most common problems.

Upvotes: 1

Related Questions