You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* NOTE: Since Producer itself represents a transaction, and there is no distinct
507
+
* type for a transaction, this method exists on the producer.
508
+
* @returns {boolean} true if there is an ongoing transaction, false otherwise.
509
+
*/
510
+
isActive(){
511
+
returnthis.#ongoingTransaction;
512
+
}
505
513
514
+
/**
515
+
* Sends a record of messages to a specific topic.
516
+
*
506
517
* @param {import('../../types/kafkajs').ProducerRecord} sendOptions - The record to send. The keys `acks`, `timeout`, and `compression` are not used, and should not be set, rather, they should be set in the global config.
507
518
* @returns {Promise<import("../../types/kafkajs").RecordMetadata[]>} Resolves with the record metadata for the messages.
* NOTE: This method is identical to calling send() repeatedly and waiting on all the return values together.
602
615
* @param {import('../../types/kafkajs').ProducerBatch} sendOptions - The record to send. The keys `acks`, `timeout`, and `compression` are not used, and should not be set, rather, they should be set in the global config.
603
616
* @returns {Promise<import("../../types/kafkajs").RecordMetadata[]>} Resolves with the record metadata for the messages.
0 commit comments