When demand is removed from a federation consumer and the AMQP link is
drained allow the consumer to idle for a configurable time period before
closing the link. If demand returns before the idled link is closed we
can recover the link by simply granting more credit.
All but one QueueImpl constructor was deprecated years ago in
2efa44daf52994790737e21ee29ae830f8f0a12c. Since QueueImpl is an
internal implementation object (as the name suggests) these
constructors can be completely removed and didn't technically need to
be deprecated in the first place.
Furthermore, the methods from QueueFactoryImpl which use these
constructors were also deprecated in that same commit. Despite the fact
that there is a QueueFactory interface these objects are still for
internal use/implementation. Therefore, these deprecated methods can and
should be removed.
There are several places across the code-base that repeat all the
configuration parameters of a queue. This commit simplifies the code
and increases readability by using o.a.a.a.a.c.QueueConfiguration as
often as possible.
There are number of warnings related to JavaDoc during the build. This
commit adjusts a handful of specifica JavaDoc comments to eliminate
warnings about empty <p> tags. It also modifies the configuration of the
Maven JavaDoc plugin to categorically prevent warnings about "missing"
JavaDoc comments on public methods, etc.
There is lots of duplicated code across the code-base creating random
String objects of various lengths. These can be eliminated by
implementing a simple utility method in RandomUtil. Also, other methods
in RandomUtil can be renamed to be more clear.
Back in 8e40b2d4f4f242271d3dfcda4f9b96d3f94cee1b thread safety was added
to TypedProperties by synchronizing all relevant methods. This was
simple and effective but suffers from performance issues in read-heavy
use-cases.
This commit improves the performance by using a read/write locking
mechanism so reads can execute concurrently.
No new tests were added since the original commit added tests to verify
thread safety.
Provide remote broker connections management beans that mirror the
management objects added on the local broker when AMQP federation is
configured and the connection is active.
When a pull mode federation consumer is stopped due to demand being
removed and the credit tup-up handler is also awaiting the Queue backlog
to clear in order to grant a new batch of credit it might exit that
cycle an leave the in-progress flag set to true. Currently this likely
won't trigger a stuck consumer but if the code was to be altered to hold
open a link for some period of time before fully closing in order to
avoid needless attach / detach cycles then it would be possible for the
credit replenishment to get stuck because the previous attempt left the
in-progress flag set to true.