findByFilter

@Query(value = " select * from outbox_item where (status = :pendingStatus and next_run < :nextRunLessThan) or (status = :runningStatus and rerun_after < :rerunAfterLessThan) ", nativeQuery = true)
abstract fun findByFilter(pendingStatus: String, nextRunLessThan: Instant, runningStatus: String, rerunAfterLessThan: Instant): List<OutboxItemEntity>