Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
joram
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
joram
joram
Commits
13d9b7c3
Commit
13d9b7c3
authored
Jul 09, 2020
by
Andre Freyssinet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handles connection retries smartly.
parent
77626ac5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
joram/joram/mom/extensions/restbridge/src/main/java/com/scalagent/joram/mom/dest/rest/RestAcquisitionAsync.java
...m/scalagent/joram/mom/dest/rest/RestAcquisitionAsync.java
+12
-3
No files found.
joram/joram/mom/extensions/restbridge/src/main/java/com/scalagent/joram/mom/dest/rest/RestAcquisitionAsync.java
View file @
13d9b7c3
...
...
@@ -197,7 +197,7 @@ public class RestAcquisitionAsync implements AcquisitionDaemon {
private
URI
uriAcknowledgeMsg
=
null
;
Client
client
=
null
;
/**
* Gets destination and initializes the Rest/JMS consumer.
*/
...
...
@@ -851,6 +851,8 @@ public class RestAcquisitionAsync implements AcquisitionDaemon {
setDaemon
(
true
);
}
private
int
errors
=
0
;
@Override
public
void
run
()
{
if
(
logger
.
isLoggable
(
BasicLevel
.
INFO
))
...
...
@@ -861,11 +863,18 @@ public class RestAcquisitionAsync implements AcquisitionDaemon {
canStop
=
false
;
try
{
createConsumer
();
errors
=
0
;
}
catch
(
Exception
exc
)
{
try
{
canStop
=
true
;
// TODO (AF): Handles this pause smartly.
Thread
.
sleep
(
1000L
);
// Handles this pause smartly.
errors
+=
1
;
if
(
errors
<
5
)
Thread
.
sleep
(
1000L
);
else
if
(
errors
<
10
)
Thread
.
sleep
(
10000L
);
else
Thread
.
sleep
(
60000L
);
}
catch
(
InterruptedException
ie
)
{}
canStop
=
false
;
continue
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment