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
eaf58e42
Commit
eaf58e42
authored
Jan 15, 2021
by
Andre Freyssinet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disables flow control if max value is less than 0.
parent
5a01406d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
8 deletions
+17
-8
joram/joram/mom/core/src/main/java/org/objectweb/joram/mom/dest/AcquisitionQueue.java
...n/java/org/objectweb/joram/mom/dest/AcquisitionQueue.java
+17
-8
No files found.
joram/joram/mom/core/src/main/java/org/objectweb/joram/mom/dest/AcquisitionQueue.java
View file @
eaf58e42
...
...
@@ -180,16 +180,25 @@ public class AcquisitionQueue extends Queue implements AcquisitionQueueMBean {
this
.
properties
=
properties
;
diff_max
=
Long
.
parseLong
(
properties
.
getProperty
(
DestinationConstants
.
ACQ_QUEUE_MAX_MSG
,
String
.
valueOf
(
diff_max
)));
diff_min
=
Long
.
parseLong
(
properties
.
getProperty
(
DestinationConstants
.
ACQ_QUEUE_MIN_MSG
,
String
.
valueOf
(
diff_min
)));
if
(
diff_max
<
2
)
diff_max
=
2
;
if
(
diff_min
>=
diff_max
)
diff_min
=
diff_max
-
2
;
if
(
diff_min
<
0
)
diff_min
=
0
;
if
(
diff_max
<=
0
)
{
// Flow-control is disabled
diff_max
=
diff_min
=
0
;
}
else
{
diff_min
=
Long
.
parseLong
(
properties
.
getProperty
(
DestinationConstants
.
ACQ_QUEUE_MIN_MSG
,
String
.
valueOf
(
diff_min
)));
if
(
diff_max
<
2
)
diff_max
=
2
;
if
(
diff_min
>=
diff_max
)
diff_min
=
diff_max
-
2
;
if
(
diff_min
<
0
)
diff_min
=
0
;
}
pending_max
=
Long
.
parseLong
(
properties
.
getProperty
(
DestinationConstants
.
ACQ_QUEUE_MAX_PND
,
String
.
valueOf
(
pending_max
)));
pending_min
=
Long
.
parseLong
(
properties
.
getProperty
(
DestinationConstants
.
ACQ_QUEUE_MIN_PND
,
String
.
valueOf
(
pending_min
)));
if
(
pending_max
<
2
)
pending_max
=
2
;
if
(
pending_min
>=
pending_max
)
pending_min
=
pending_max
-
2
;
if
(
pending_min
<
0
)
pending_min
=
0
;
if
(
pending_max
<=
0
)
{
pending_max
=
pending_min
=
0
;
}
else
{
pending_min
=
Long
.
parseLong
(
properties
.
getProperty
(
DestinationConstants
.
ACQ_QUEUE_MIN_PND
,
String
.
valueOf
(
pending_min
)));
if
(
pending_max
<
2
)
pending_max
=
2
;
if
(
pending_min
>=
pending_max
)
pending_min
=
pending_max
-
2
;
if
(
pending_min
<
0
)
pending_min
=
0
;
}
if
(
logger
.
isLoggable
(
BasicLevel
.
INFO
))
logger
.
log
(
BasicLevel
.
INFO
,
...
...
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