Skip to content

Commit

Permalink
Feature: add NatsMessage ack_sync method #1906
Browse files Browse the repository at this point in the history
  • Loading branch information
wpn10 committed Nov 9, 2024
1 parent 0d4c237 commit 230d1ce
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions faststream/nats/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ async def ack(self) -> None:
await self.raw_message.ack()
await super().ack()

def ack_sync(self) -> None:
if not self.raw_message._ackd:
self.raw_message.ack()
super().ack()

async def nack(
self,
delay: Union[int, float, None] = None,
Expand Down

0 comments on commit 230d1ce

Please sign in to comment.