Tags: ReactiveX/RxNetty
Tags
Refactor spectator metrics __Problem__ Currently the listener does not expose metrics to specific events but instead does internal calculations and expose custom gauges. This is limiting as it gives less information. __Modification__ Modified the metrics to represent the actual events. __Result__ More flexible insights.
`RequestN` reduces with completed subscribers. #### Problem Re-calculation of max `requestN` per subscriber did not take into account removed subscribers correctly. This causes the `requestN` value to decrease over time when subscribers are completed. #### Modification - Modified `recalculateMaxPerSubscriber` to take old and new subscriber count instead of trying to determine the correct value from the current subscriber queue size. - `subscribers.remove()` does not happen on unsubscribe but only from the task that recalculates the max `requestN` values. This also coalesces multiple removes into a single task run. #### Result Consistent `requestN` values with new subscribes and completions.
PreviousNext