Skip to content

Bunnybus' subscribe depends on odd scoping #79

@dhinklexo

Description

@dhinklexo

Context

  • node version: 8
  • bunnybus version: latest
  • environment (node, browser): node

What are you trying to achieve or the steps to reproduce ?

return bunnyBus.subscribe('hapi-reviews-reminder', {
        'reviews.webhook': function(message, ack, reject, requeue) {
            return myOtherHandler(message, ack, reject, requeue);
        }
});

In this case myOtherHandler will lock up and not ack(), reject(), requeue() or throw any errors.

What result did you expect ?

Either the docs should specify I need to rebind my scope, or bunnybus shouldn't depend on an explicit scope in message handlers.

Metadata

Metadata

Assignees

No one assigned

    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