Skip to content

Commit 3f9f7fa

Browse files
committed
Enable optimization for less-than-cache-size messages in consumer
1 parent 357cdb3 commit 3f9f7fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/kafkajs/_consumer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ class Consumer {
574574
this.#state = ConsumerState.CONNECTED;
575575

576576
/* Slight optimization for cases where the size of messages in our subscription is less than the cache size. */
577-
this.#internalClient.setDefaultIsTimeoutOnlyForFirstMessage(false);
577+
this.#internalClient.setDefaultIsTimeoutOnlyForFirstMessage(true);
578578

579579
// Resolve the promise.
580580
this.#connectPromiseFunc['resolve']();

0 commit comments

Comments
 (0)