Socket
Book a DemoInstallSign in
Socket

@mqueue/stompjs

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mqueue/stompjs

MQueue adapter for STOMP

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

STOMP.js for MQueue

An STOMP.js adapter for MQueue, adding support for STOMP queues with a multi-backend setup with MQueue.

npm install --save @mqueue/queue @mqueue/stompjs
# or use pnpm/yarn
import MQueue from "@mqueue/queue"; // or require("@mqueue/queue");
import { StompQueue } from "@mqueue/stompjs"; // or require("@mqueue/stompjs");

const outgoingQueue = new MQueue.Outgoing(
  await StompQueue.Outgoing.connect("amqp://rabbitmq:5271", "queue-name"),
);

outgoingQueue.sendMessage({
  headers: {
    "Account-ID": "123",
  },
  body: "...",
});

// ...

const incomingQueue = new MQueue.Incoming(
  await StompQueue.Incoming.connect("amqp://rabbitmq:5271", "queue-name"),
);

// Start listening to the queue
await incomingQueue.consume(async (payload) => {
  const topicOrQueueName = payload.transport.name;
  const headers = payload.message.headers;
  const data = await payload.message.json();
  await payload.accept(); // or await payload.reject();
  // ...
});

Compatibility

License

MIT © Dom Webber

Keywords

queue

FAQs

Package last updated on 04 Oct 2025

Did you know?

Socket

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.

Install

Related posts