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

Make the API less dumb #2

Open
hopkinsth opened this issue Jun 13, 2014 · 1 comment
Open

Make the API less dumb #2

hopkinsth opened this issue Jun 13, 2014 · 1 comment
Assignees

Comments

@hopkinsth
Copy link
Contributor

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);
})
@hopkinsth hopkinsth self-assigned this Jun 13, 2014
@hopkinsth
Copy link
Contributor Author

set options with calls?

queue.listen().ack(function (msg, ack) {

});

Want to rethink some different stuff.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant