zk-drizzle commented on code in PR #1215:
URL: https://github.com/apache/rocketmq-clients/pull/1215#discussion_r3056964381
##########
nodejs/src/consumer/PushConsumer.ts:
##########
@@ -470,4 +495,49 @@ export class PushConsumer extends Consumer {
this.#processQueueTable.set(mqKey, { mq, pq: processQueue });
return processQueue;
}
+
+ /**
+ * Create a virtual process queue for Lite consumer.
+ * Lite consumers use a special message queue with queueId=-1 to receive
messages.
+ * This method creates the virtual queue and starts fetching messages
immediately.
+ *
+ * @param topic - The bind topic name
+ * @param filterExpression - The filter expression for message filtering
+ */
+ protected createVirtualProcessQueueForLite(topic: string, filterExpression:
FilterExpression) {
+ // Create a virtual broker with default endpoints
+ const brokerPb = new
(require('../../proto/apache/rocketmq/v2/definition_pb').Broker)();
Review Comment:
The dynamic import here doesn't align with module best practices. I
recommend using a static import at the top of the file instead.
import { Broker as BrokerPB, MessageQueue as MessageQueuePB, Permission,
MessageType } from '../../proto/apache/rocketmq/v2/definition_pb';
--
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]