Skip to content

Instantly share code, notes, and snippets.

@serdarmumcu
Created March 28, 2024 09:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save serdarmumcu/038f5d0da2bba474a34b5b69088d7283 to your computer and use it in GitHub Desktop.
Save serdarmumcu/038f5d0da2bba474a34b5b69088d7283 to your computer and use it in GitHub Desktop.
@Service
public class EventProcessingService {
@Autowired
private OutboxRepository outboxRepository;
@Transactional
public void deleteProcessedEvents(List<Long> eventIds) {
if (!eventIds.isEmpty()) {
outboxRepository.deleteAllByIdIn(eventIds);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment