{"id":13597988,"url":"https://github.com/stomp-js/stompjs","last_synced_at":"2026-01-16T06:33:39.108Z","repository":{"id":32710613,"uuid":"134851437","full_name":"stomp-js/stompjs","owner":"stomp-js","description":"Javascript and Typescript Stomp client for Web browsers and node.js apps","archived":false,"fork":false,"pushed_at":"2023-11-08T20:03:55.000Z","size":4573,"stargazers_count":710,"open_issues_count":45,"forks_count":79,"subscribers_count":16,"default_branch":"develop","last_synced_at":"2024-04-14T06:17:18.651Z","etag":null,"topics":["messaging","rabbitmq","stomp","stompclient","stompjs","websocket"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stomp-js.png","metadata":{"files":{"readme":"README.md","changelog":"Change-log.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-05-25T12:08:54.000Z","updated_at":"2024-04-11T16:08:19.000Z","dependencies_parsed_at":"2024-03-18T17:14:51.842Z","dependency_job_id":"0fd2357e-74d3-45d6-8a73-ed92e0291bd7","html_url":"https://github.com/stomp-js/stompjs","commit_stats":{"total_commits":615,"total_committers":11,"mean_commits":55.90909090909091,"dds":"0.38373983739837403","last_synced_commit":"99c164ddcab0395ab79f3d7f8cc4593ea26cb210"},"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stomp-js%2Fstompjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stomp-js%2Fstompjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stomp-js%2Fstompjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stomp-js%2Fstompjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stomp-js","download_url":"https://codeload.github.com/stomp-js/stompjs/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248168121,"owners_count":21058772,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["messaging","rabbitmq","stomp","stompclient","stompjs","websocket"],"created_at":"2024-08-01T17:00:45.205Z","updated_at":"2026-01-16T06:33:39.096Z","avatar_url":"https://github.com/stomp-js.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# STOMP.js\n\n[![Build Status - Firefox, Chrome](https://github.com/stomp-js/stompjs/actions/workflows/linux.yml/badge.svg?branch=develop)](https://github.com/stomp-js/stompjs/actions/workflows/linux.yml)\n[![Build Status - Safari, Edge](https://github.com/stomp-js/stompjs/actions/workflows/osx.yml/badge.svg?branch=develop)](https://github.com/stomp-js/stompjs/actions/workflows/osx.yml)\n[![Node.js Tests](https://github.com/stomp-js/stompjs/actions/workflows/node-js.yml/badge.svg?branch=develop)](https://github.com/stomp-js/stompjs/actions/workflows/node-js.yml)\n[![API Docs Refresh](https://github.com/stomp-js/stompjs/actions/workflows/docs-refresh.yml/badge.svg?branch=develop)](https://github.com/stomp-js/stompjs/actions/workflows/docs-refresh.yml)\n\n**STOMP.js** is a fully-fledged STOMP over WebSocket library for **browsers** and **Node.js**, providing seamless integration with STOMP protocol-compliant messaging brokers.\n\n## Table of Contents\n\n- [Introduction](#introduction)\n- [Features](#features)\n- [Getting Started](#getting-started)\n    - [Browser](#browser)\n    - [Node.js](#nodejs)\n- [Documentation](#documentation)\n- [Upgrading](#upgrading)\n- [Usage with RxJS](#usage-with-rxjs)\n- [TypeScript Support](#typescript-support)\n- [Changelog](#changelog)\n- [Contributing](#contributing)\n- [Authors](#authors)\n- [License](#license)\n\n## Introduction\n\nThis library enables clients to connect to STOMP brokers over WebSocket (or TCP). It fully implements the STOMP protocol specifications (v1.0, v1.1, and v1.2), making it compatible with any broker that supports STOMP or STOMP over WebSocket.\n\nPopular brokers like RabbitMQ, ActiveMQ, and others provide support for STOMP and STOMP over WebSockets out-of-the-box.\n\n## Features\n\n- Simple and intuitive API for interacting with the STOMP protocol\n- Support for STOMP protocol versions: **1.2**, **1.1**, and **1.0**\n- Support for fallback options  when WebSocket is unavailable\n- Supports both **browser** and **Node.js** environments\n- Option to connect using **STOMP over TCP**\n- Full support for **binary payloads**\n- Compatible with RxJS for reactive programming\n\n## Getting Started\n\nThis section provides a quick guide to integrating STOMP.js into your **browser** or **Node.js** application.\n\n### Browser\n\nTo use STOMP.js in a browser:\n\n1. Add the following in your HTML file:\n   ```html\n   \u003cscript type=\"importmap\"\u003e\n     {\n       \"imports\": {\n         \"@stomp/stompjs\": \"https://ga.jspm.io/npm:@stomp/stompjs@7.0.0/esm6/index.js\"\n       }\n     }\n   \u003c/script\u003e\n   \u003cscript\n     async\n     src=\"https://ga.jspm.io/npm:es-module-shims@1.5.1/dist/es-module-shims.js\"\n     crossorigin=\"anonymous\"\n   \u003e\u003c/script\u003e\n   ```\n\n2. Use the library:\n   ```javascript\n   import { Client } from '@stomp/stompjs';\n\n   const client = new Client({\n     brokerURL: 'ws://localhost:15674/ws',\n     onConnect: () =\u003e {\n       client.subscribe('/topic/test01', message =\u003e\n         console.log(`Received: ${message.body}`)\n       );\n       client.publish({ destination: '/topic/test01', body: 'First Message' });\n     },\n   });\n\n   client.activate();\n   ```\n\n### Node.js\n\nTo use STOMP.js in a Node.js environment:\n\n1. Install the package:\n   ```bash\n   npm install @stomp/stompjs ws\n   ```\n\n2. Use it in your application:\n   ```javascript\n   import { Client } from '@stomp/stompjs';\n\n   import { WebSocket } from 'ws';\n   Object.assign(global, { WebSocket });\n\n   const client = new Client({\n     brokerURL: 'ws://localhost:15674/ws',\n     onConnect: () =\u003e {\n       client.subscribe('/topic/test01', message =\u003e\n         console.log(`Received: ${message.body}`)\n       );\n       client.publish({ destination: '/topic/test01', body: 'First Message' });\n     },\n   });\n\n   client.activate();\n   ```\n\n---\n\n## Documentation\n\nComprehensive documentation can be found at: [STOMP.js Documentation](https://stomp-js.github.io/)\n\n- **API Overview**: [API Docs (latest)](https://stomp-js.github.io/api-docs/latest/)\n- **Usage Guide**: [Guide to Using STOMP.js](https://stomp-js.github.io/guide/stompjs/using-stompjs-v5.html)\n- **Feature Guides**: Explore additional guides at [https://stomp-js.github.io/](https://stomp-js.github.io/)\n\n## Upgrading\n\nIf you are updating from an older version of STOMP.js, review the [Upgrading Guide](https://stomp-js.github.io/#upgrading) for any required changes.\n\n## Usage with RxJS\n\n[Rx-Stomp](https://github.com/stomp-js/rx-stomp) builds upon this library, exposing all its features as **RxJS Observables**, enabling reactive programming patterns.\n\n## TypeScript Support\n\nSTOMP.js includes built-in TypeScript definitions, eliminating the need for external type definition files. Begin coding with TypeScript out-of-the-box!\n\n## Changelog\n\nVisit the [Change Log](Change-log.md) for information about changes, improvements, and fixes in recent releases.\n\n## Contributing\n\nThinking of contributing to STOMP.js? Great! To get started:\n\n- Read the [Contributing Guide](Contribute.md) for development instructions.\n- Report bugs or suggest features by creating an issue on GitHub.\n\nWe welcome contributions from the community!\n\n## Authors\n\nThis library is made possible by these amazing contributors:\n\n- [Deepak Kumar](https://github.com/kum-deepak)\n- [Astha Deep](https://github.com/astha183)\n- [Dillon Sellars](https://github.com/dillon-sellars)\n- [Jimi Charalampidis](https://github.com/jimic)\n- [Raul](https://github.com/rulonder)\n- [Dimitar Georgiev](https://github.com/iMitaka)\n- [Genadi](https://github.com/genadis)\n- [Bobohuochai](https://github.com/bobohuochai)\n- [Sailai](https://github.com/sailai)\n- [Harsh Deep](https://github.com/harsh183)\n- [Nikos Epping](https://github.com/Nikos410)\n- [Tom Pachtner](https://github.com/tomamatics)\n- [David Nussio](https://github.com/davidnussio)\n- [Camille Drapier](https://github.com/CamilleDrapier)\n- [chai min](https://github.com/minchai23)\n- [umsungjun](https://github.com/umsungjun)\n- [tomek3e](https://github.com/tomek3e)\n- [Samuel Yinger](https://github.com/GoldenSunX)\n- [RokkieBrown](https://github.com/rokkie)\n- [Alexey](https://github.com/Al-ex-ei)\n\nThis library is originally based on [stompjs](https://github.com/jmesnil/stomp-websocket) by [Jeff Mesnil](http://jmesnil.net/) with enhancements and bug fixes from [Jeff Lindsay](http://github.com/progrium) and [Vanessa Williams](http://github.com/fridgebuzz).\n\n## License\n\nLicensed under the **Apache-2.0 License**. See the [LICENSE file](LICENSE) for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstomp-js%2Fstompjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstomp-js%2Fstompjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstomp-js%2Fstompjs/lists"}