在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:RocketMQ-on-Pulsar开源软件地址:https://gitee.com/mirrors/RocketMQ-on-Pulsar开源软件介绍:RocketMQ on Pulsar(RoP)RoP stands for RocketMQ on Pulsar. Rop broker supports RocketMQ-4.6.1 protocol, and is backed byPulsar. RoP is implemented as aPulsar ProtocolHandlerwith protocol name "rocketmq". ProtocolHandler is build as a nar file, and is loaded when PulsarBroker starts. SupportedRoP is implemented based on Pulsar features. Currently, the functions supported by RoP are asfollows:
Get startedIn this guide, you will learn how to use the Pulsar broker to serve requests from RocketMQ client. Download PulsarDownload Pulsar 2.7.1binary package
Download and Build RoP PluginYou can download rop nar file from the RoP sources. To build from code, complete the following steps:
git clone https://github.com/streamnative/rop.gitcd rop
mvn clean install -DskipTests You can find the nar file in the following directory. ./target/pulsar-protocol-handler-rocketmq-${version}.nar Configuration
Configure Pulsar broker to run RoP protocol handler as PluginAs mentioned above, RoP module is loaded with Pulsar broker. You need to add configs in Pulsar'sconfig file, such as
You need to add The following is an example. messagingProtocols=rocketmqprotocolHandlerDirectory=./protocolsloadManagerClassName=org.apache.pulsar.broker.loadbalance.impl.ModularLoadManagerImpl
Set RocketMQ service The following is an example. rocketmqListeners=rocketmq://127.0.0.1:9876advertisedListeners=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:9896rocketmqListenerPortMap=9876:INTERNAL_ROP
brokerEntryMetadataInterceptors=org.apache.pulsar.common.intercept.AppendIndexMetadataInterceptor
brokerDeleteInactiveTopicsEnabled=false
Run Pulsar brokerWith the above configuration, you can start your Pulsar broker. For details, referto Pulsar Get started guides. cd apache-pulsar-2.7.1bin/pulsar standalone -nss -nfw Run RocketMQ Client to verifyIn the RoP repo, we provide a sub model of Log level configurationIn Pulsar log4j2.yaml config file,you can set RoP log level. The following is an example. Logger: - name: RocketMQProtocolHandler level: debug additivity: false AppenderRef: - ref: Console |
请发表评论