File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -638,7 +638,8 @@ export class MarQS {
638638 }
639639
640640 /**
641- * Negative acknowledge a message, which will requeue the message
641+ * Negative acknowledge a message, which will requeue the message.
642+ * Returns whether it went back into the queue or not.
642643 */
643644 public async nackMessage (
644645 messageId : string ,
@@ -657,7 +658,7 @@ export class MarQS {
657658 updates,
658659 service : this . name ,
659660 } ) ;
660- return ;
661+ return false ;
661662 }
662663
663664 const nackCount = await this . #getNackCount( messageId ) ;
@@ -676,7 +677,7 @@ export class MarQS {
676677
677678 // If we have reached the maximum nack count, we will ack the message
678679 await this . acknowledgeMessage ( messageId , "maximum nack count reached" ) ;
679- return ;
680+ return false ;
680681 }
681682
682683 span . setAttributes ( {
@@ -705,6 +706,8 @@ export class MarQS {
705706 } ) ;
706707
707708 await this . options . subscriber ?. messageNacked ( message ) ;
709+
710+ return true ;
708711 } ,
709712 {
710713 kind : SpanKind . CONSUMER ,
You can’t perform that action at this time.
0 commit comments