Skip to content

Commit

Permalink
fix(ddd-toolkit-rabbit-bus): add missing on message log
Browse files Browse the repository at this point in the history
  • Loading branch information
gtoselli committed Jun 4, 2024
1 parent 348d829 commit f9068ad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/fair-scissors-fail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@fizzbuds/ddd-toolkit-rabbit-bus": patch
---

add log on message cb
2 changes: 2 additions & 0 deletions packages/ddd-toolkit-rabbit-bus/src/rabbit-event-bus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ export class RabbitEventBus implements IEventBus {
return;
}

this.logger.debug(`Received message ${rawMessage.content.toString()} on queue ${queueName}`);

if (!this.isAValidMessage(parsedMessage)) {
this.connection.getChannel().nack(rawMessage, false, false);
this.logger.warn(`Message discarded due to invalid format`);
Expand Down

0 comments on commit f9068ad

Please sign in to comment.