Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
private void pollSweeperTable(Session session) {
List<Message> unsentMessages = messageRepository.fetchUnsentMessages();
for (Message message : unsentMessages)
sendMessage(session, message);
messageRepository.markSent(unsentMessages); // One DB transaction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment