Skip to content

Commit

Permalink
ensure messages are delivered before marked as seen
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisholmes committed Jul 28, 2022
1 parent 37f0694 commit 66a0332
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,12 @@ def self.messages_seen
end

def process(message)
TestConsumer.messages_seen << message
produce(
producea
'message seen',
topic: "ack-#{message.topic}"
)
deliver!
TestConsumer.messages_seen << message
end
end
TestConsumer.subscribes_to(topic_name)
Expand Down Expand Up @@ -229,6 +230,7 @@ def process_batch(messages)
'message seen',
topic: "ack-#{message.topic}"
)
deliver!
TestBatchConsumer.messages_seen << message
end
end
Expand Down

0 comments on commit 66a0332

Please sign in to comment.