Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Oct 17, 2018
1 parent 742f269 commit 9ecd381
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const producer = new Producer({
producerGroup: 'your-producer-group',
});

co(function*() {
(async () => {
const msg = new Message('your-topic', // topic
'TagA', // tag
'Hello ONS !!! ' // body
Expand All @@ -71,9 +71,9 @@ co(function*() {
// set Message#keys
msg.keys = ['key1'];

const sendResult = yield producer.send(msg);
const sendResult = await producer.send(msg);
console.log(sendResult);
}).catch(err => console.error(err))
})().catch(err => console.error(err))
```

## License
Expand Down

0 comments on commit 9ecd381

Please sign in to comment.