{"id":15068593,"url":"https://github.com/xp-forge/stomp","last_synced_at":"2025-04-10T17:36:06.771Z","repository":{"id":5378320,"uuid":"6565734","full_name":"xp-forge/stomp","owner":"xp-forge","description":"STOMP client classes for XP Framework: Publish and subscribe","archived":false,"fork":false,"pushed_at":"2024-10-05T11:14:27.000Z","size":306,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-12T23:02:12.663Z","etag":null,"topics":["php7","php8","stomp","xp-framework"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xp-forge.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":null,"license":null,"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}},"created_at":"2012-11-06T17:00:54.000Z","updated_at":"2024-10-05T11:14:31.000Z","dependencies_parsed_at":"2024-09-25T01:38:35.553Z","dependency_job_id":"0bb54913-c2ef-4088-a648-5763953c5cff","html_url":"https://github.com/xp-forge/stomp","commit_stats":null,"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xp-forge%2Fstomp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xp-forge%2Fstomp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xp-forge%2Fstomp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xp-forge%2Fstomp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xp-forge","download_url":"https://codeload.github.com/xp-forge/stomp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248262032,"owners_count":21074230,"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":["php7","php8","stomp","xp-framework"],"created_at":"2024-09-25T01:38:27.173Z","updated_at":"2025-04-10T17:36:06.755Z","avatar_url":"https://github.com/xp-forge.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"STOMP protocol implementation\n===\n\n[![Build status on GitHub](https://github.com/xp-framework/ast/workflows/Tests/badge.svg)](https://github.com/xp-framework/ast/actions)\n[![XP Framework Module](https://raw.githubusercontent.com/xp-framework/web/master/static/xp-framework-badge.png)](https://github.com/xp-framework/core)\n[![BSD Licence](https://raw.githubusercontent.com/xp-framework/web/master/static/licence-bsd.png)](https://github.com/xp-framework/core/blob/master/LICENCE.md)\n[![Requires PHP 7.0+](https://raw.githubusercontent.com/xp-framework/web/master/static/php-7_0plus.svg)](http://php.net/)\n[![Supports PHP 8.0+](https://raw.githubusercontent.com/xp-framework/web/master/static/php-8_0plus.svg)](http://php.net/)\n[![Latest Stable Version](https://poser.pugx.org/xp-forge/stomp/version.svg)](https://packagist.org/packages/xp-forge/stomp)\n\nAbout\n---\nSTOMP is a network protocol to talk to message brokers such as [Apache ActiveMQ](http://activemq.apache.org/) or [RabbitMQ](http://rabbitmq.org).\n\nThe STOMP specification can be found at http://stomp.github.io/.\n\nExamples\n---\n\n### Producer\nA message producer\n\n```php\nuse peer\\stomp\\{Connection, SendableMessage};\n\n$conn= new Connection('stomp://localhost:61613/');\n$conn-\u003econnect();\n\n$conn-\u003egetDestination('/queue/producer')-\u003esend(\n  new SendableMessage('Message contents', 'text/plain')\n);\n```\n\n### Consumer\nA simple message consumer (subscriber):\n\n```php\nuse peer\\stomp\\{Connection, Subscription};\n\n$conn= new Connection('stomp://localhost:61613/');\n$conn-\u003econnect();\n\n$conn-\u003esubscribeTo(new Subscription('/queue/producer', function($message) {\n  Console::writeLine('---\u003e Received message: ', $message);\n  $message-\u003eack();\n}));\n\n$conn-\u003econsume();\n```\n\n### Multi-endpoint failover\nA consumer with a broker network may connect to any host when available:\n\n```php\nuse peer\\stomp\\{Connection, Subscription, Failover};\n\n$nodes= ['stomp://one.example.com:61613/', 'stomp://two.example.com:61613/'];\n\n// Connect randomly to one or the other\n$conn= new Connection(Failover::using($nodes)-\u003ebyRandom());\n$conn-\u003econnect();\n\n$conn-\u003esubscribeTo(new Subscription('/queue/producer', function($message) {\n  Console::writeLine('---\u003e Received message: ', $message);\n  $message-\u003eack();\n}));\n\n$conn-\u003econsume();\n```\n\n*For more examples, please see the `examples/` directory.*\n\n### The connection URL\nThe URL specifies the options how and where to connect:\n\n* `protocol` should be `stomp` or `stomp+ssl`\n* `host` is the hostname to connect\n* `port` is the port to connect (default: 61613)\n* `user`, `pass` can be given in the URL and will be used for authentication\n* Supported parameters:\n  * `vhost` - virtual host name, since STOMP 1.1 (eg. `?vhost=example.com`)\n  * `versions` - to specify list of supported versions (eg. `?versions=1.0,1.1`); default is to support 1.0, 1.1\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxp-forge%2Fstomp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxp-forge%2Fstomp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxp-forge%2Fstomp/lists"}