diff --git a/app/init/constants.php b/app/init/constants.php index 2b72f8814f..4fe7c418a9 100644 --- a/app/init/constants.php +++ b/app/init/constants.php @@ -243,7 +243,7 @@ const RULE_STATUS_VERIFIED = 'verified'; const MESSAGE_SEND_TYPE_INTERNAL = 'internal'; const MESSAGE_SEND_TYPE_EXTERNAL = 'external'; // External message fan-out tuning -const MESSAGE_RECIPIENTS_PAGE_SIZE = 1000; // Recipients resolved from the database per page while streaming a send +const MESSAGE_RECIPIENTS_PAGE_SIZE = 5000; // Recipients resolved from the database per page while streaming a send; aligned with APP_LIMIT_COUNT to minimise round-trips on large topics const MESSAGE_SEND_CONCURRENCY = 10; // Maximum adapter send requests running concurrently within a single send job const MESSAGE_DELIVERY_ERRORS_LIMIT = 100; // Maximum number of per-recipient delivery errors retained on a message const MESSAGE_SEND_MAX_RETRIES = 5; // Maximum number of attempts to deliver a batch when the provider throttles or fails transiently diff --git a/tests/unit/Messaging/MessagingFanoutTest.php b/tests/unit/Messaging/MessagingFanoutTest.php index 97e888e228..02b1ee55d4 100644 --- a/tests/unit/Messaging/MessagingFanoutTest.php +++ b/tests/unit/Messaging/MessagingFanoutTest.php @@ -292,9 +292,8 @@ class MessagingFanoutTest extends TestCase public function testRecipientsArePaginatedWithoutSubqueryFilter(): void { - // 4500 subscribers over a 1000-row page is five pages, with a duplicate identifier inside one page to - // exercise per-page deduplication. - $count = 4500; + // Always span several pages regardless of the configured page size, so cursor pagination is exercised. + $count = MESSAGE_RECIPIENTS_PAGE_SIZE * 2 + 500; $data = $this->topicDataset($count); $database = new RecordingDatabase($data['subscribers'], $data['targets']);