Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A NACK call incorrectly results in an ACK on the server side #135

Open
Tofuburger opened this issue May 6, 2024 · 0 comments
Open

A NACK call incorrectly results in an ACK on the server side #135

Tofuburger opened this issue May 6, 2024 · 0 comments

Comments

@Tofuburger
Copy link

I would use the pool channel and unfortunately, I cannot send a nack to the server. On the contrary, the sent NACK becomes an ACK on the server. The client-side ACK logic works.

const req = {
  headers: {
    ack: 12345
    'message-id': 12345,
    subscription: 1
  }
};

An ACK call results in an ACK on the server. > Success

async _ack(channel, req) {
  return new Promise((resolve) => {
    channel.ack(req, undefined, undefined, (err) => {
      err
        ? reject(err)
        : resolve(req);
    });
  });
}

A NACK call incorrectly results in an ACK on the server. > Wrong Success

async _nack(channel, req) {
  return new Promise((resolve) => {
    channel.nack(req, undefined, undefined, (err) => {
      err
        ? reject(err)
        : resolve(req);
    });
  });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant