
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
simple-message-helper
Advanced tools
Provides a simple interface for a single-exchange, single-queue message pattern
This simplifies interactions for working with a message broker when you really don't need a full feature set - basically just send and receive. It's written in CoffeeScript and is used downstream to run chatops tasks as part of a Hubot deployment.
var readyFn = function() {
console.log("Connected and configured");
communicator.send("Do stuff");
};
var messageHandler = function(message) {
console.log("Got a message:", message);
};
var disconnected = function() {
console.log("Disconnected");
}
var messageHelper = require('message-helper')
var communicator = new messageHelper(readyFn, messageHandler, disconnected);
From the above, you'd expect the message "Do stuff" to get published to your exchange.
You can use the default configuration:
configuration =
user: "guest"
password: "guest"
host: "localhost"
port: 5672
vhost: "/"
commandExchangeName: "hubot-commands"
commandRoutingKey: "hubot-commands"
responseExchangeName: "hubot-responses"
responseQueueName: "hubot-responses"
Or, use custom environment variables:
export AMQP_USER="amqp_user"
export AMQP_PASSWORD="amqp_password"
export AMQP_HOST="amqp_host"
export AMQP_PORT="amqp_port"
export AMQP_VHOST="amqp_vhost"
export AMQP_COMMAND_EXCHANGE_NAME="amqp_command_exchange_name"
export AMQP_COMMAND_ROUTING_KEY="amqp_command_routing_key"
export AMQP_RESPONSE_EXCHANGE_NAME="amqp_response_exchange_name"
export AMQP_RESPONSE_QUEUE_NAME="amqp_response_queue_name"
FAQs
Provides a simple interface for a single-exchange, single-queue message pattern
The npm package simple-message-helper receives a total of 1 weekly downloads. As such, simple-message-helper popularity was classified as not popular.
We found that simple-message-helper 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.