@kejiweixun/cmq
v1.2.9
Published
```js const createClient = require("@kejiweixun/cmq"); const SecretId = "xxxxxx"; const SecretKey = "xxxxxx"; const Region = "sh"; const apiEndpoint = "cmq-sh.public.tencenttdmq.com"; const cmqClient = createClient({ SecretId, SecretKey, Region, });
Downloads
3
Readme
const createClient = require("@kejiweixun/cmq");
const SecretId = "xxxxxx";
const SecretKey = "xxxxxx";
const Region = "sh";
const apiEndpoint = "cmq-sh.public.tencenttdmq.com";
const cmqClient = createClient({
SecretId,
SecretKey,
Region,
});
cmqClient
.PublishMessage({
topicName: "test",
msgBody: "test message",
})
.then((res) => {
console.log(res);
})
.catch((err) => {
console.log(err.message);
});