{"id":22096907,"url":"https://github.com/streamnative/rop","last_synced_at":"2025-07-24T22:32:41.592Z","repository":{"id":37106732,"uuid":"365458312","full_name":"streamnative/rop","owner":"streamnative","description":"RocketMQ-on-Pulsar - A protocol handler that brings native RocketMQ protocol to Apache Pulsar","archived":false,"fork":false,"pushed_at":"2023-07-24T12:23:53.000Z","size":2446,"stargazers_count":96,"open_issues_count":11,"forks_count":24,"subscribers_count":23,"default_branch":"master","last_synced_at":"2023-08-04T07:13:16.764Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/streamnative.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":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2021-05-08T08:16:43.000Z","updated_at":"2023-07-31T09:16:24.000Z","dependencies_parsed_at":"2023-01-20T17:16:01.043Z","dependency_job_id":null,"html_url":"https://github.com/streamnative/rop","commit_stats":null,"previous_names":[],"tags_count":27,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamnative%2Frop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamnative%2Frop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamnative%2Frop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamnative%2Frop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/streamnative","download_url":"https://codeload.github.com/streamnative/rop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227482460,"owners_count":17779968,"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":[],"created_at":"2024-12-01T04:13:28.933Z","updated_at":"2024-12-01T04:13:29.723Z","avatar_url":"https://github.com/streamnative.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e\r\n\u003e :warning: **This repository is not actively maintained - it may be soon archived.**\r\n\u003e\r\n\r\n# RocketMQ on Pulsar(RoP)\r\n\r\nRoP stands for RocketMQ on Pulsar. Rop broker supports RocketMQ-4.6.1 protocol, and is backed by\r\nPulsar.\r\n\r\nRoP is implemented as a\r\nPulsar [ProtocolHandler](https://github.com/apache/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/protocol/ProtocolHandler.java)\r\nwith protocol name \"rocketmq\". ProtocolHandler is build as a nar file, and is loaded when Pulsar\r\nBroker starts.\r\n\r\n![](docs/rop-architecture.png)\r\n\r\n## Supported\r\n\r\nRoP is implemented based on Pulsar features. Currently, the functions supported by RoP are as\r\nfollows:\r\n\r\n- Send and Receive Messages\r\n- SendAsync Messages\r\n- Queue Selector Producer\r\n- Round Robin Producer\r\n- Producer And Consumer(Push and Pull) With Namespace\r\n- Batch Messages\r\n- Order Messages\r\n- Send And Receive With Tag\r\n- Deliver Level Message\r\n- Retry Topic\r\n- DLQ Topic\r\n- Broadcast Consumer\r\n\r\n## Get started\r\n\r\nIn this guide, you will learn how to use the Pulsar broker to serve requests from RocketMQ client.\r\n\r\n### Download Pulsar\r\n\r\nDownload [Pulsar 2.7.1](https://github.com/streamnative/pulsar/releases/download/v2.7.1/apache-pulsar-2.7.1-bin.tar.gz)\r\nbinary package `apache-pulsar-2.7.1-bin.tar.gz`. and unzip it.\r\n\r\n\u003e Note: Currently, RoP is only compatible with Apache Pulsar 2.7.0 and above.\r\n\r\n### Download and Build RoP Plugin\r\n\r\nYou can download rop nar file from the [RoP sources](https://github.com/streamnative/rop).\r\n\r\nTo build from code, complete the following steps:\r\n\r\n1. Clone the project from GitHub to your local.\r\n\r\n```bash\r\ngit clone https://github.com/streamnative/rop.git\r\ncd rop\r\n```\r\n\r\n2. Build the project.\r\n\r\n```bash\r\nmvn clean install -DskipTests\r\n```\r\n\r\nYou can find the nar file in the following directory.\r\n\r\n```bash\r\n./target/pulsar-protocol-handler-rocketmq-${version}.nar\r\n```\r\n\r\n### Configuration\r\n\r\n|Name|Description|Default|\r\n|---|---|---|\r\nrocketmqTenant|RocketMQ on Pulsar broker tenant|rocketmq\r\nrocketmqMetadataTenant|The tenant used for storing Rocketmq metadata topics|rocketmq\r\nrocketmqNamespace|Rocketmq on Pulsar Broker namespace|default\r\nrocketmqMetadataNamespace|The namespace used for storing rocket metadata topics|__rocketmq\r\nrocketmqListeners|RocketMQ service port|rocketmq://127.0.0.1:9876\r\nrocketmqMaxNoOfChannels|The maximum number of channels which can exist concurrently on a connection|64\r\nrocketmqMaxFrameSize|The maximum frame size on a connection|4194304 (4MB)\r\nrocketmqHeartBeat|The default heartbeat timeout of RoP connection|60 (s)\r\n\r\n### Configure Pulsar broker to run RoP protocol handler as Plugin\r\n\r\nAs mentioned above, RoP module is loaded with Pulsar broker. You need to add configs in Pulsar's\r\nconfig file, such as `broker.conf` or `standalone.conf`.\r\n\r\n1. Protocol handler configuration\r\n\r\nYou need to add `messagingProtocols`(the default value is `null`), `protocolHandlerDirectory` (\r\nthe default value is \"./protocols\") and `loadManagerClassName=org.apache.pulsar.broker.loadbalance.impl.ModularLoadManagerImpl`, in Pulsar configuration files, such as `broker.conf`\r\nor `standalone.conf`. For RoP, the value for `messagingProtocols` is `rocketmq`; the value\r\nfor `protocolHandlerDirectory` is the directory of RoP nar file.\r\n\r\nThe following is an example.\r\n\r\n```access transformers\r\nmessagingProtocols=rocketmq\r\nprotocolHandlerDirectory=./protocols\r\nloadManagerClassName=org.apache.pulsar.broker.loadbalance.impl.ModularLoadManagerImpl\r\n```\r\n\r\n2. Set RocketMQ service listeners\r\n\r\nSet RocketMQ service `listeners`. Note that the hostname value in listeners is the same as Pulsar\r\nbroker's `advertisedListeners`.\r\n\r\nThe following is an example.\r\n\r\n```\r\nrocketmqListeners=rocketmq://127.0.0.1:9876\r\nadvertisedListeners=INTERNAL:pulsar://127.0.0.1:6650,INTERNAL:pulsar+ssl://127.0.0.1:6651,INTERNAL_ROP:pulsar://127.0.0.1:9876,INTERNAL_ROP:pulsar+ssl://127.0.0.1:9896\r\nrocketmqListenerPortMap=9876:INTERNAL_ROP\r\n```\r\n\r\n3. Set offset management as below since offset management for RoP depends on Pulsar \"Broker Entry Metadata\". It’s required for KoP 2.8.0 or higher version.\r\n\r\n```text\r\nbrokerEntryMetadataInterceptors=org.apache.pulsar.common.intercept.AppendIndexMetadataInterceptor\r\n```\r\n\r\n4. Set brokerDeleteInactiveTopicsEnabled to false.\r\n\r\n```text\r\nbrokerDeleteInactiveTopicsEnabled=false\r\n```\r\n\r\n\u003e Note: `advertisedListeners` and `advertisedAddress` cannot be configured at the same time.\r\n\r\n### Run Pulsar broker\r\n\r\nWith the above configuration, you can start your Pulsar broker. For details, refer\r\nto [Pulsar Get started guides](http://pulsar.apache.org/docs/en/standalone/).\r\n\r\n```access transformers\r\ncd apache-pulsar-2.7.1\r\nbin/pulsar standalone -nss -nfw\r\n```\r\n\r\n### Run RocketMQ Client to verify\r\n\r\nIn the RoP repo, we provide a sub model of `examples`, which contains a variety of scenarios used by\r\nthe rocketmq client. You can run these examples directly in the IDE. Or you can download the\r\nRocketMQ src code and run RocketMQ client of `examples`.\r\n\r\n### Log level configuration\r\n\r\nIn Pulsar [log4j2.yaml config file](https://github.com/apache/pulsar/blob/master/conf/log4j2.yaml),\r\nyou can set RoP log level.\r\n\r\nThe following is an example.\r\n\r\n```\r\n    Logger:\r\n      - name: RocketMQProtocolHandler\r\n        level: debug\r\n        additivity: false\r\n        AppenderRef:\r\n          - ref: Console\r\n```\r\n\r\n## License\r\n\r\nThis library is licensed under the terms of the [Apache License 2.0](LICENSE) and may include packages written by third parties which carry their own copyright notices and license terms.\r\n\r\n## About StreamNative\r\n\r\nFounded in 2019 by the original creators of Apache Pulsar, [StreamNative](https://streamnative.io/) is one of the leading contributors to the open-source Apache Pulsar project. We have helped engineering teams worldwide make the move to Pulsar with [StreamNative Cloud](https://streamnative.io/product), a fully managed service to help teams accelerate time-to-production.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreamnative%2Frop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstreamnative%2Frop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreamnative%2Frop/lists"}