celery.node icon indicating copy to clipboard operation
celery.node copied to clipboard

Support partial manual routing

Open comfuture opened this issue 3 years ago • 1 comments

Description

Partially solved the problem that the queue name and routingKey determined at the time of client creation cannot be changed.

Due to the design of the current code, queue and routingKey are treated as same. Therefore, I only added an option to change the routingKey when creating a task or when sending a task message.

const task = client.createTask("tasks.multiply", { routingKey: "my_queue" });
const result = task. applyAsync([2, 3]);

or

const task = client. createTask("tasks. multiply");
const result = task.applyAsync([2, 3], undefined, { routingKey: "my_queue" });
  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

    Enhancement

  • What is the current behavior? (You can also link to an open issue here)

    The queue name and routingKey determined at the time of client creation cannot be changed after creation. Related: #94

  • What is the new behavior (if this is a feature change)?

    Each tasks can have their own routingKey

comfuture avatar Jan 12 '23 08:01 comfuture

@actumn Hi, just wanted to know if this PR will get merged soon? Our usecase requires manual routing so it would help if this gets merged in the original branch instead of us making a seperate Package from this branch. Thanks!

abhikb101 avatar Mar 21 '24 12:03 abhikb101