Apache camel retry logic while polling from remote server -
i trying pull files remote server , if not able connect remote server want implement below scenarios:
would retry 'n' times, if connection not successful after retrying want stop polling , throw exception consumer saying "server not responding"
in route need bean connects remote server. if can't connect, should through exception.
then add together onexception handler in route onexception(cannotconnectexception.class) .maximumredeliveries(3) .processref("dosomething")
the "dosomething" process has take care of stop polling , inform consumer part of route. example, stop polling phone call method of connection bean stop polling. best solution going depend on how rest of scheme fits together.
apache-camel
No comments:
Post a Comment