Skip to content
This repository was archived by the owner on Apr 7, 2022. It is now read-only.
This repository was archived by the owner on Apr 7, 2022. It is now read-only.

Make the API less dumb #2

Description

@hopkinsth

Opening an issue for (eventually) making some API changes, like, for listeners...

queue.listen({ack: true}, function (msg, ack) {
    doStuff(msg);

    this.headers; //message headers
    this.info; //other delivery information

    //want to acknowledge the message? just call `ack`
    ack();

    //rejecting the message? just pass false to `ack`
    ack(false);

    //want to reject and requeue? pass true as the second param to `ack`
    ack(false, true);
})

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions