Browse Source

Merge pull request #6782 from smatvienko-tb/js-executor-kafka-producer-partitioner

[3.4] js-executor: kafkaClient.producer({ createPartitioner: Partitioners.DefaultPartitioner })
pull/6797/head
Andrew Shvayka 4 years ago
committed by GitHub
parent
commit
3ab01ba1ba
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      msa/js-executor/queue/kafkaTemplate.js

4
msa/js-executor/queue/kafkaTemplate.js

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
const {logLevel, Kafka, CompressionTypes} = require('kafkajs'); const {logLevel, Kafka, CompressionTypes, Partitioners} = require('kafkajs');
const config = require('config'), const config = require('config'),
JsInvokeMessageProcessor = require('../api/jsInvokeMessageProcessor'), JsInvokeMessageProcessor = require('../api/jsInvokeMessageProcessor'),
@ -159,7 +159,7 @@ async function sendMessagesAsBatch(isImmediately) {
} }
consumer = kafkaClient.consumer({groupId: 'js-executor-group'}); consumer = kafkaClient.consumer({groupId: 'js-executor-group'});
producer = kafkaClient.producer(); producer = kafkaClient.producer({ createPartitioner: Partitioners.DefaultPartitioner });
/* /*
//producer event instrumentation to debug //producer event instrumentation to debug

Loading…
Cancel
Save