npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@saptools/cf-event-mesh

v0.1.0

Published

Listen and publish messages to SAP Event Mesh from SAP BTP Cloud Foundry

Readme

☁️ @saptools/cf-event-mesh

Listen to or publish messages directly to SAP BTP Event Mesh from your terminal.

Easily interact with AMQP queues or publish REST payloads to queues and topics without needing an external client like Postman or Advanced Event Mesh configurations.

npm version license node install size types

InstallQuick StartCLIFAQ


✨ Features

  • 🎧 AMQP Listener — stream live messages from an Event Mesh queue directly into your console
  • 📤 REST Publisher — instantly publish JSON payloads to a queue or a topic
  • 🔐 Auto-Discovery — seamlessly fetches credentials (clientid, clientsecret, tokens) via cf env
  • 🛡️ Safe by Default — listening doesn't acknowledge messages by default, ensuring no data loss while debugging
  • 🧩 Zero Config — just provide the app name bound to enterprise-messaging
  • 🪶 Lightweight — no heavy dependencies, relies on Cloud Foundry CLI

📦 Install

# Global CLI
npm install -g @saptools/cf-event-mesh

# Or as a dependency
npm install @saptools/cf-event-mesh
# pnpm add @saptools/cf-event-mesh
# yarn add @saptools/cf-event-mesh

[!NOTE] Requires Node.js ≥ 20 and the official cf CLI on PATH (v8 recommended).


🚀 Quick Start

# 1. Make sure you are logged into Cloud Foundry and targeting a space
cf target -o my-org -s dev

# 2. Listen to a queue (messages are not acknowledged by default)
cf-event-mesh listen my-app-srv "namespace/queue-name"

# 3. Publish a message to a topic
cf-event-mesh publish my-app-srv topic "namespace/topic-name" '{"hello":"world"}'

🧰 CLI

🎧 cf-event-mesh listen

Connects to the Event Mesh queue via AMQP and streams incoming messages to the console.

cf-event-mesh listen <app-name> <queue-name>
cf-event-mesh listen <app-name> <queue-name> --ack

| Flag | Description | | --- | --- | | --ack | Acknowledge (delete) messages from the queue as they are received. Warning: this consumes the message permanently. |

📤 cf-event-mesh publish

Publishes a string payload to a specified queue or topic using the REST HTTP endpoint.

cf-event-mesh publish <app-name> queue <queue-name> '<payload>'
cf-event-mesh publish <app-name> topic <topic-name> '<payload>'

Example:

cf-event-mesh publish orders-srv topic "sap/s4/beh/salesorder/v1/SalesOrder/Created/v1" '{"SalesOrder":"10000001"}'

❓ FAQ

No. This package is specifically built for the default SAP Event Mesh (enterprise-messaging service plan default).

By default, the listen command connects with autoAck: false so that you can debug and monitor messages without stealing them from your actual application consumers. If you want to consume and remove them, pass the --ack flag.

It runs cf curl /v3/apps/<guid>/env to extract the enterprise-messaging service binding credentials, including the AMQP WebSocket URL, REST URL, and OAuth2 Client Credentials.


🛠️ Development

From the monorepo root:

pnpm install
pnpm --filter @saptools/cf-event-mesh build
pnpm --filter @saptools/cf-event-mesh typecheck
pnpm --filter @saptools/cf-event-mesh test:unit

🌐 Related


👨‍💻 Author

dongtran

📄 License

MIT


Made with ❤️ to make your work life easier!