{"id":13342852,"url":"https://github.com/walterwanderley/xk6-stomp","last_synced_at":"2026-02-01T22:03:00.404Z","repository":{"id":55158105,"uuid":"448299524","full_name":"walterwanderley/xk6-stomp","owner":"walterwanderley","description":"A STOMP protocol client library for k6","archived":false,"fork":false,"pushed_at":"2025-03-02T17:38:47.000Z","size":135,"stargazers_count":6,"open_issues_count":2,"forks_count":10,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-23T10:09:00.167Z","etag":null,"topics":["k6","stomp","xk6"],"latest_commit_sha":null,"homepage":"","language":"Go","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/walterwanderley.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-01-15T14:26:03.000Z","updated_at":"2025-12-11T19:07:16.000Z","dependencies_parsed_at":"2023-11-24T02:30:50.576Z","dependency_job_id":"eb85e88c-ef9d-4724-81f0-dafc2c01452e","html_url":"https://github.com/walterwanderley/xk6-stomp","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/walterwanderley/xk6-stomp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/walterwanderley%2Fxk6-stomp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/walterwanderley%2Fxk6-stomp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/walterwanderley%2Fxk6-stomp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/walterwanderley%2Fxk6-stomp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/walterwanderley","download_url":"https://codeload.github.com/walterwanderley/xk6-stomp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/walterwanderley%2Fxk6-stomp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28992655,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T22:01:47.507Z","status":"ssl_error","status_checked_at":"2026-02-01T21:58:37.335Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["k6","stomp","xk6"],"created_at":"2024-07-29T19:30:06.188Z","updated_at":"2026-02-01T22:03:00.387Z","avatar_url":"https://github.com/walterwanderley.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# xk6-stomp\r\n\r\nThis is a [Stomp protocol](https://stomp.github.io/) client library for [k6](https://k6.io),\r\nimplemented as an extension using the [xk6](https://github.com/grafana/xk6) system.\r\n\r\n\r\n## Build\r\n\r\nTo build a `k6` binary with this extension, first ensure you have the prerequisites:\r\n\r\n- [Go toolchain](https://go101.org/article/go-toolchain.html)\r\n- Git\r\n\r\nThen:\r\n\r\n1. Install `xk6`:\r\n  ```shell\r\n  go install go.k6.io/xk6/cmd/xk6@latest\r\n  ```\r\n\r\n2. Build the binary:\r\n  ```shell\r\n  xk6 build --with github.com/walterwanderley/xk6-stomp\r\n  ```\r\n\r\n## Example test script\r\n\r\n1. Start a [Stomp server](https://stomp.github.io/implementations.html#STOMP_Servers) (ActiveMQ, RabbitMQ, etc)\r\n\r\n```shell\r\ndocker run -p 8161:8161 -p 61613:61613 rmohr/activemq\r\n```\r\n\r\n2. Write the test code\r\n\r\n```javascript\r\n// test.js\r\nimport stomp from 'k6/x/stomp';\r\n\r\n// connect to broker\r\nconst client = stomp.connect({\r\n    addr: 'localhost:61613',\r\n    timeout: '2s',\r\n});\r\n\r\nexport default function () {\r\n    // send a message to '/my/destination' with text/plain as MIME content-type\r\n    client.send('my/destination', 'text/plain', 'Hello xk6-stomp!');\r\n\r\n    const subscribeOpts = {\r\n        ack: 'client' // client-individual or auto (default)\r\n    }\r\n    // subscribe to receive messages from 'my/destination' with the client ack mode\r\n    const subscription = client.subscribe('my/destination', subscribeOpts); \r\n\r\n    // read the message\r\n    const msg = subscription.read();\r\n\r\n    // show the message as a string\r\n    console.log('msg', msg.string());\r\n    \r\n    // ack the message\r\n    client.ack(msg);\r\n    \r\n    // unsubscribe from destination\r\n    subscription.unsubscribe();\r\n}\r\n\r\nexport function teardown() {\r\n    // disconnect from broker\r\n    client.disconnect();\r\n}\r\n```\r\n\r\n3. Result output:\r\n\r\n```shell\r\n$ ./k6 run _examples/test.js \r\n\r\n          /\\      |‾‾| /‾‾/   /‾‾/   \r\n     /\\  /  \\     |  |/  /   /  /    \r\n    /  \\/    \\    |     (   /   ‾‾\\  \r\n   /          \\   |  |\\  \\ |  (‾)  | \r\n  / __________ \\  |__| \\__\\ \\_____/ .io\r\n\r\n  execution: local\r\n     script: _examples/test.js\r\n     output: -\r\n\r\n  scenarios: (100.00%) 1 scenario, 1 max VUs, 10m30s max duration (incl. graceful stop):\r\n           * default: 1 iterations for each of 1 VUs (maxDuration: 10m0s, gracefulStop: 30s)\r\n\r\nINFO[0000] msg Hello xk6-stomp!                          source=console\r\n\r\nrunning (00m00.0s), 0/1 VUs, 1 complete and 0 interrupted iterations\r\ndefault ✓ [======================================] 1 VUs  00m00.0s/10m0s  1/1 iters, 1 per VU\r\n\r\n     █ teardown\r\n\r\n     data_received........: 322 B 16 kB/s\r\n     data_sent............: 251 B 12 kB/s\r\n     iteration_duration...: avg=5.23ms min=1.12ms med=5.23ms max=9.33ms p(90)=8.51ms p(95)=8.92ms\r\n     iterations...........: 1     48.05613/s\r\n     stomp_ack_count......: 1     48.05613/s\r\n     stomp_read_count.....: 1     48.05613/s\r\n     stomp_read_time......: avg=6.2ms  min=6.2ms  med=6.2ms  max=6.2ms  p(90)=6.2ms  p(95)=6.2ms \r\n     stomp_send_count.....: 1     48.05613/s\r\n     stomp_send_time......: avg=5.5µs  min=5.5µs  med=5.5µs  max=5.5µs  p(90)=5.5µs  p(95)=5.5µs\r\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwalterwanderley%2Fxk6-stomp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwalterwanderley%2Fxk6-stomp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwalterwanderley%2Fxk6-stomp/lists"}