Skip to content

feature-request: server generated ids #38

@NeilDarach

Description

@NeilDarach

Allow producers to create tasks with a well-known id that will be interpreted by the server as a request for a server-generated id (in this example '0').

Update responses would include a list of ids alongside the counts, corresponding to the tasks submitted. Supplied ids would just be reflected back.

Calling

$ curl -X POST -d '{"payload": "hello world"}' "http://127.0.0.1:8000/v1/topics/example/tasks/0"

adds a task and has a response like

{"created":1,"updated":0,"ids":["52acfef8-d77e-45ff-aff9-4780ca414be1"]}
{
   "_id": "52acfef8-d77e-45ff-aff9-4780ca414be1",
   "topic": "example",
   "state": 0,
   "nonce": "",
   "produced": "2022-09-21T10:12:23.065074065Z",
   "scheduled": "2022-09-21T10:12:23.065074065Z",
   "payload": "hello world"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions