
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
@tuia/egg-rocketmq
Advanced tools
$ npm i egg-rocketmq --save
// {app_root}/config/plugin.js
exports.rocketmq = {
enable: true,
package: 'egg-rocketmq'
};
// {app_root}/config/config.default.js
exports.rocketmq = {
producer: {
options: {
nameServer: 'your rocketmq server',
compressLevel: 5,
sendMessageTimeout: 3000,
maxMessageSize: 1024 * 128
},
topicsList: [{
groupId: 'test-1',
instanceName: '', // optional
groupName: 'test-1',
topic: 'test-1'
}, {
groupId: 'test-2',
instanceName: '', // optional
groupName: 'test-2',
topic: 'test-2'
}],
},
consumer: {
options: {
nameServer: 'your rocketmq server',
},
topicsList: [{
topic: 'test-1',
groupId: 'test-1',
groupName: 'test-1',
instanceName: '', // optional
serviceFloderName: 'consumer', // service floder name
fileNameWithMethod: 'receive.testMsg1' // service filename and method name
}, {
topic: 'test-2',
groupId: 'test-2',
groupName: 'test-2',
instanceName: '', // optional
serviceFloderName: 'consumer',
fileNameWithMethod: 'receive.testMsg2'
}]
}
};
see example/config/config.default.js for more detail.
// producer
await this.ctx.service.producer.index('test-1', {
body: 'I am your dad-1'
});
// consumer
const Service = require('egg').Service;
module.exports = class Receive extends Service {
async testMsg1(topic, payload) {
this.ctx.logger.info(topic, payload);
}
};
see example/app/service/producer.js and example/app/service/consumer/receive.js for more detail.
Please open an issue here.
FAQs
egg rocketmq plugin
The npm package @tuia/egg-rocketmq receives a total of 5 weekly downloads. As such, @tuia/egg-rocketmq popularity was classified as not popular.
We found that @tuia/egg-rocketmq demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.