Created
June 1, 2017 07:19
-
-
Save woprzech/95949c7ee656f41fc962d354438ff7b7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void consumeMainTopicWithPostponedRetry() { | |
while (true) { | |
Message message = takeNextMessage("main_topic"); | |
try { | |
process(message); | |
} catch (Exception ex) { | |
publishTo("retry_topic"); | |
LOGGER.warn("Message processing failure. Will try once again in the future.", ex); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment