From d86ed69333093bdf3c0f637310f9d8b1e6c9d3d6 Mon Sep 17 00:00:00 2001 From: dead-horse Date: Thu, 3 May 2018 15:06:58 +0800 Subject: [PATCH] f --- README.md | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/README.md b/README.md index 14402d1..c500915 100644 --- a/README.md +++ b/README.md @@ -123,35 +123,6 @@ const msg = new Message('TP_NAME', // topic const sendResult = yield ctx.ons.send(msg); ``` -## Dynamic Create Consumer and Producer - -You can dynamic create comsumer or producer by your self. - -```js -// app.js - -module.exports = app => { - app.beforeStart(function* () { - // dynamic create a consumer, and subscribe topics use the subscriber in the second argument - yield app.createConsumer({ - consumerGroup: 'consumerGroup', - topics: [ - 'TEST_TOPIC', - ], - }, { - TEST_TOPIC: require('./ops/TEST_TOPIC'), // the subscriber for TEST_TOPIC - }); - // dynamic create a producer - yield app.createProducer({ - producerGroup: config.producerGroup, - topics: [ - 'TEST_TOPIC', - ], - }); - }); -}; -``` - ## Questions & Suggestions Please open an issue [here](https://github.com/eggjs/egg/issues).