mwashburn2 opened a new pull request, #2728: URL: https://github.com/apache/activemq/pull/2728
**Stacked on #2276** (lock-free `MemoryUsage`). The first two commits belong to that PR; review only the last three. I'll rebase once #2276 merges. Adds an opt-in topic fan-out pool (`fanoutThreads`, default off) so one slow subscriber can't hold up a producer dispatching to many subscribers. - **Fan-out pool:** `Topic` hands dispatch to a bounded worker pool. Size statistics are now lock-free. - **Deadlock fix:** a fan-out worker never blocks in `TopicSubscription.add` waiting for space. If a subscriber is full, the message is parked for that subscriber and the worker moves on. - **Memory accounting:** `MemoryUsage.tryEnqueueUsage` checks the limit and charges it in one atomic step (CAS against the published limit), and `Message.tryIncrementReferenceCount` uses it. Before, many producers could each pass `isFull()` and then all charge memory, going about 1% over the limit. Now at most one message goes over. Tests: three new `MemoryUsageTest` cases. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information, visit: https://activemq.apache.org/contact
