Skip to content

Commit

Permalink
Merge pull request #37 from alkem-io/develop
Browse files Browse the repository at this point in the history
Ack strategy patch
  • Loading branch information
valentinyanakiev authored Nov 11, 2021
2 parents 2b73b47 + e32e872 commit f920cb1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "alkemio-notifications",
"version": "0.3.1",
"version": "0.3.2",
"description": "Alkemio notifications service",
"author": "Cherrytwist Foundation",
"private": false,
Expand Down
5 changes: 5 additions & 0 deletions src/app.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,16 @@ export class AppController {

if (nacked.length === 0) {
this.logger.verbose?.(`All ${x.length} messages successfully sent!`);
channel.ack(originalMsg);
} else {
this.logger.verbose?.(`${nacked.length} messages failed to be sent!`);
//channel.nack(originalMsg);
channel.ack(originalMsg);
}
})
.catch(err => {
//channel.reject(originalMsg);
channel.ack(originalMsg);
this.logger.error(err);
});
}
Expand Down

0 comments on commit f920cb1

Please sign in to comment.