Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
sbis3-rabbit-subscribe
Advanced tools
var
Rabbit = require('sbis3-rabbit-subscribe'),
connection = Rabbit({
amqp: 'amqp://cloud_service:cloud_service@test-eventmq.unix.tensor.ru', // адресс брокера сообщений
cloud: 'dev-cloud.sbis.ru' // облако, на события которого необходимо подписаться
}),
options = {
queue: 'my_queue_' + process.pid // имя очереди(опционально)
};
connection.on('eventName1', function (msg) {
console.log('eventName: %s', msg);
});
connection.on('eventName2', function (msg) {
console.log('eventName2: %s', msg);
});
connection.on('error', function (err) {
console.log(err);
});
connection.on('close', function () {
console.log('Connection closed');
});
rabbit.subscribe('eventName1', options);
rabbit.subscribe('eventName2', options);
Параметры amqp и cloud можно получить с помощью модуля sbis3-cloud-config
amqp - Ядро.Асинхронные сообщения.БрокерыПодпискиНаСобытия
cloud - это hostname от параметра СервисАдминистрирования.Адрес
eventName - строка, имя события на которое необходимо подписаться
options - опциональный параметр для конфигурирования exchange и queue
По умолчанию:
{
queue: os.hostname() + '_' + process.pid + '_' + timeInNanosec,
exOptions: {
durable: false
},
qOptions: {
autoDelete: true,
durable: false
}
}
публикует событие с именем эвента, на который была осуществлена подписка
message - сообщение от кролика
error - ошибка
FAQs
Rabbit subscriber
The npm package sbis3-rabbit-subscribe receives a total of 1 weekly downloads. As such, sbis3-rabbit-subscribe popularity was classified as not popular.
We found that sbis3-rabbit-subscribe demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.