Skip to content

Conversation

@yug49
Copy link
Contributor

@yug49 yug49 commented Dec 6, 2025

Resolves #228

Description

This PR makes the hardcoded MAX_BUFFERED_MESSAGES constant configurable via a new max_stream_capacity builder method, allowing users to tune the internal channel buffer sizes based on their specific use case. The MAX_BUFFERED_MESSAGES constant (50,000) was previously hardcoded and used for both mpsc::channel and broadcast::channel capacities.

Changes

  • Added max_stream_capacity field to BlockRangeScanner, ConnectedBlockRangeScanner, and BlockRangeScannerClient
  • Added max_stream_capacity() builder method to EventScannerBuilder for all scanner modes
  • Updated handle_stream() to accept configurable capacity parameter
  • All internal channel creations now use the configurable capacity
  • Default value remains 50,000 for backward compatibility

@yug49 yug49 marked this pull request as draft December 6, 2025 00:50
@yug49 yug49 marked this pull request as ready for review December 6, 2025 01:00
@LeoPatOZ
Copy link
Collaborator

Resolved in:
#266

@LeoPatOZ LeoPatOZ closed this Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Max Stream Capacity Should be Configurable

2 participants