You are viewing an old version of this page. View the current version.
Compare with Current View Page History
Version 1 Next »
Метод отправляет сообщение в выбранную очередь.
Параметры:
Возвращает:
Пример:
const rabbitMq = new SimpleExternalRabbitMQ('nofication-service'); const messages = [ { userID: 2344, message: "Hello, Ivan" }, { userID: 7444, message: "Hello, Petr" } ]; rabbitMq.publishMultipleMessages( 'push-notifications', messages.map(m => JSON.stringify(m)), { ContentType: "application/json", Headers: { "X-Source": "simple" } } ) ss.info(rabbitMq.getErrors());