Finish code dump. Reviewed by: @yukon @vongosling @stevenschew @vintagewang @lollipop @zander
Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/057d0e9b Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/057d0e9b Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/057d0e9b Branch: refs/heads/master Commit: 057d0e9b152ccb1e563d2e41847f45dcd783d114 Parents: Author: xinyuzhou.zxy <[email protected]> Authored: Mon Dec 19 17:34:19 2016 +0800 Committer: xinyuzhou.zxy <[email protected]> Committed: Mon Dec 19 17:34:19 2016 +0800 ---------------------------------------------------------------------- .gitignore | 11 + .travis.yml | 5 + CONTRIBUTING.md | 17 + LICENSE | 201 ++ NOTICE | 8 + README.md | 52 + benchmark/consumer.sh | 6 + benchmark/producer.sh | 6 + benchmark/runclass.sh | 32 + benchmark/tproducer.sh | 6 + checkstyle/checkstyle.xml | 128 ++ conf/2m-2s-async/broker-a-s.properties | 22 + conf/2m-2s-async/broker-a.properties | 22 + conf/2m-2s-async/broker-b-s.properties | 22 + conf/2m-2s-async/broker-b.properties | 22 + conf/2m-2s-sync/broker-a-s.properties | 22 + conf/2m-2s-sync/broker-a.properties | 22 + conf/2m-2s-sync/broker-b-s.properties | 22 + conf/2m-2s-sync/broker-b.properties | 22 + conf/2m-noslave/broker-a.properties | 22 + conf/2m-noslave/broker-b.properties | 22 + conf/broker.conf | 22 + conf/logback_broker.xml | 328 +++ conf/logback_filtersrv.xml | 91 + conf/logback_namesrv.xml | 91 + conf/logback_tools.xml | 96 + deploy.bat | 16 + eclipse.bat | 16 + install.bat | 17 + install.sh | 28 + pom.xml | 518 +++++ release-client.xml | 52 + release.xml | 60 + rocketmq-broker/pom.xml | 79 + .../rocketmq/broker/BrokerController.java | 773 +++++++ .../rocketmq/broker/BrokerPathConfigHelper.java | 52 + .../alibaba/rocketmq/broker/BrokerStartup.java | 266 +++ .../broker/client/ClientChannelInfo.java | 115 + .../client/ClientHousekeepingService.java | 100 + .../broker/client/ConsumerGroupInfo.java | 273 +++ .../client/ConsumerIdsChangeListener.java | 29 + .../rocketmq/broker/client/ConsumerManager.java | 187 ++ .../DefaultConsumerIdsChangeListener.java | 45 + .../rocketmq/broker/client/ProducerManager.java | 199 ++ .../broker/client/net/Broker2Client.java | 317 +++ .../client/rebalance/RebalanceLockManager.java | 281 +++ .../broker/filtersrv/FilterServerManager.java | 175 ++ .../broker/filtersrv/FilterServerUtil.java | 43 + .../broker/latency/BrokerFastFailure.java | 115 + .../latency/BrokerFixedThreadPoolExecutor.java | 46 + .../rocketmq/broker/latency/FutureTaskExt.java | 42 + .../broker/longpolling/ManyPullRequest.java | 49 + .../NotifyMessageArrivingListener.java | 36 + .../broker/longpolling/PullRequest.java | 74 + .../longpolling/PullRequestHoldService.java | 169 ++ .../broker/mqtrace/ConsumeMessageContext.java | 172 ++ .../broker/mqtrace/ConsumeMessageHook.java | 27 + .../broker/mqtrace/SendMessageContext.java | 261 +++ .../broker/mqtrace/SendMessageHook.java | 27 + .../broker/offset/ConsumerOffsetManager.java | 249 +++ .../rocketmq/broker/out/BrokerOuterAPI.java | 302 +++ .../broker/pagecache/ManyMessageTransfer.java | 90 + .../broker/pagecache/OneMessageTransfer.java | 79 + .../broker/pagecache/QueryMessageTransfer.java | 90 + .../plugin/AbstractPluginMessageStore.java | 236 +++ .../broker/plugin/MessageStoreFactory.java | 50 + .../plugin/MessageStorePluginContext.java | 61 + .../processor/AbstractSendMessageProcessor.java | 332 +++ .../broker/processor/AdminBrokerProcessor.java | 1212 +++++++++++ .../broker/processor/ClientManageProcessor.java | 164 ++ .../processor/ConsumerManageProcessor.java | 157 ++ .../processor/EndTransactionProcessor.java | 236 +++ .../processor/ForwardRequestProcessor.java | 51 + .../broker/processor/PullMessageProcessor.java | 540 +++++ .../broker/processor/QueryMessageProcessor.java | 178 ++ .../broker/processor/SendMessageProcessor.java | 496 +++++ .../rocketmq/broker/slave/SlaveSynchronize.java | 158 ++ .../subscription/SubscriptionGroupManager.java | 203 ++ .../broker/topic/TopicConfigManager.java | 440 ++++ .../broker/transaction/TransactionRecord.java | 44 + .../broker/transaction/TransactionStore.java | 46 + .../transaction/jdbc/JDBCTransactionStore.java | 240 +++ .../jdbc/JDBCTransactionStoreConfig.java | 65 + .../src/main/resources/transaction.sql | 4 + .../rocketmq/broker/api/SendMessageTest.java | 87 + .../offset/ConsumerOffsetManagerTest.java | 68 + .../broker/topic/TopicConfigManagerTest.java | 71 + rocketmq-client/deploy.bat | 1 + rocketmq-client/install.bat | 2 + rocketmq-client/pom.xml | 97 + .../alibaba/rocketmq/client/ClientConfig.java | 202 ++ .../com/alibaba/rocketmq/client/MQAdmin.java | 173 ++ .../com/alibaba/rocketmq/client/MQHelper.java | 94 + .../alibaba/rocketmq/client/QueryResult.java | 53 + .../com/alibaba/rocketmq/client/Validators.java | 150 ++ .../rocketmq/client/admin/MQAdminExtInner.java | 24 + .../rocketmq/client/common/ClientErrorCode.java | 26 + .../client/common/ThreadLocalIndex.java | 51 + .../consumer/AllocateMessageQueueStrategy.java | 60 + .../client/consumer/DefaultMQPullConsumer.java | 381 ++++ .../client/consumer/DefaultMQPushConsumer.java | 519 +++++ .../rocketmq/client/consumer/MQConsumer.java | 78 + .../client/consumer/MQPullConsumer.java | 229 ++ .../consumer/MQPullConsumerScheduleService.java | 212 ++ .../client/consumer/MQPushConsumer.java | 117 + .../client/consumer/MessageQueueListener.java | 41 + .../rocketmq/client/consumer/PullCallback.java | 28 + .../rocketmq/client/consumer/PullResult.java | 82 + .../rocketmq/client/consumer/PullStatus.java | 39 + .../client/consumer/PullTaskCallback.java | 24 + .../client/consumer/PullTaskContext.java | 44 + .../listener/ConsumeConcurrentlyContext.java | 66 + .../listener/ConsumeConcurrentlyStatus.java | 31 + .../listener/ConsumeOrderlyContext.java | 61 + .../consumer/listener/ConsumeOrderlyStatus.java | 41 + .../consumer/listener/ConsumeReturnType.java | 44 + .../consumer/listener/MessageListener.java | 25 + .../listener/MessageListenerConcurrently.java | 42 + .../listener/MessageListenerOrderly.java | 42 + .../AllocateMessageQueueAveragely.java | 75 + .../AllocateMessageQueueAveragelyByCircle.java | 71 + .../rebalance/AllocateMessageQueueByConfig.java | 50 + .../AllocateMessageQueueByMachineRoom.java | 75 + .../consumer/store/LocalFileOffsetStore.java | 228 ++ .../consumer/store/OffsetSerializeWrapper.java | 42 + .../client/consumer/store/OffsetStore.java | 97 + .../client/consumer/store/ReadOffsetType.java | 32 + .../consumer/store/RemoteBrokerOffsetStore.java | 261 +++ .../client/exception/MQBrokerException.java | 48 + .../client/exception/MQClientException.java | 62 + .../client/hook/CheckForbiddenContext.java | 148 ++ .../client/hook/CheckForbiddenHook.java | 31 + .../client/hook/ConsumeMessageContext.java | 104 + .../client/hook/ConsumeMessageHook.java | 25 + .../client/hook/FilterMessageContext.java | 91 + .../rocketmq/client/hook/FilterMessageHook.java | 27 + .../client/hook/SendMessageContext.java | 157 ++ .../rocketmq/client/hook/SendMessageHook.java | 25 + .../client/impl/ClientRemotingProcessor.java | 199 ++ .../rocketmq/client/impl/CommunicationMode.java | 26 + .../rocketmq/client/impl/FindBrokerResult.java | 41 + .../rocketmq/client/impl/MQAdminImpl.java | 418 ++++ .../rocketmq/client/impl/MQClientAPIImpl.java | 1996 ++++++++++++++++++ .../rocketmq/client/impl/MQClientManager.java | 71 + .../ConsumeMessageConcurrentlyService.java | 471 +++++ .../consumer/ConsumeMessageOrderlyService.java | 536 +++++ .../impl/consumer/ConsumeMessageService.java | 56 + .../consumer/DefaultMQPullConsumerImpl.java | 706 +++++++ .../consumer/DefaultMQPushConsumerImpl.java | 1071 ++++++++++ .../client/impl/consumer/MQConsumerInner.java | 66 + .../client/impl/consumer/MessageQueueLock.java | 46 + .../client/impl/consumer/ProcessQueue.java | 451 ++++ .../client/impl/consumer/PullAPIWrapper.java | 255 +++ .../impl/consumer/PullMessageService.java | 109 + .../client/impl/consumer/PullRequest.java | 114 + .../client/impl/consumer/PullResultExt.java | 55 + .../client/impl/consumer/RebalanceImpl.java | 481 +++++ .../client/impl/consumer/RebalancePullImpl.java | 85 + .../client/impl/consumer/RebalancePushImpl.java | 196 ++ .../client/impl/consumer/RebalanceService.java | 58 + .../client/impl/factory/MQClientInstance.java | 1147 ++++++++++ .../impl/producer/DefaultMQProducerImpl.java | 1080 ++++++++++ .../client/impl/producer/MQProducerInner.java | 49 + .../client/impl/producer/TopicPublishInfo.java | 133 ++ .../client/latency/LatencyFaultTolerance.java | 31 + .../latency/LatencyFaultToleranceImpl.java | 191 ++ .../client/latency/MQFaultStrategy.java | 108 + .../rocketmq/client/log/ClientLogger.java | 116 + .../client/producer/DefaultMQProducer.java | 380 ++++ .../producer/LocalTransactionExecuter.java | 27 + .../client/producer/LocalTransactionState.java | 26 + .../rocketmq/client/producer/MQProducer.java | 106 + .../client/producer/MessageQueueSelector.java | 30 + .../rocketmq/client/producer/SendCallback.java | 27 + .../rocketmq/client/producer/SendResult.java | 143 ++ .../rocketmq/client/producer/SendStatus.java | 27 + .../producer/TransactionCheckListener.java | 27 + .../client/producer/TransactionMQProducer.java | 109 + .../client/producer/TransactionSendResult.java | 38 + .../selector/SelectMessageQueueByHash.java | 41 + .../SelectMessageQueueByMachineRoom.java | 48 + .../selector/SelectMessageQueueByRandoom.java | 44 + .../client/stat/ConsumerStatsManager.java | 165 ++ .../main/resources/log4j_rocketmq_client.xml | 58 + .../main/resources/logback_rocketmq_client.xml | 58 + .../alibaba/rocketmq/client/ValidatorsTest.java | 39 + .../AllocateMessageQueueAveragelyTest.java | 272 +++ rocketmq-common/pom.xml | 43 + .../alibaba/rocketmq/common/BrokerConfig.java | 540 +++++ .../rocketmq/common/BrokerConfigSingleton.java | 39 + .../alibaba/rocketmq/common/ConfigManager.java | 89 + .../alibaba/rocketmq/common/Configuration.java | 310 +++ .../alibaba/rocketmq/common/CountDownLatch.java | 207 ++ .../alibaba/rocketmq/common/DataVersion.java | 82 + .../com/alibaba/rocketmq/common/MQVersion.java | 362 ++++ .../com/alibaba/rocketmq/common/MixAll.java | 486 +++++ .../java/com/alibaba/rocketmq/common/Pair.java | 51 + .../alibaba/rocketmq/common/ServiceState.java | 39 + .../alibaba/rocketmq/common/ServiceThread.java | 142 ++ .../alibaba/rocketmq/common/SystemClock.java | 26 + .../rocketmq/common/ThreadFactoryImpl.java | 39 + .../alibaba/rocketmq/common/TopicConfig.java | 206 ++ .../rocketmq/common/TopicFilterType.java | 25 + .../com/alibaba/rocketmq/common/UtilAll.java | 525 +++++ .../rocketmq/common/admin/ConsumeStats.java | 67 + .../rocketmq/common/admin/OffsetWrapper.java | 59 + .../rocketmq/common/admin/RollbackStats.java | 91 + .../rocketmq/common/admin/TopicOffset.java | 58 + .../rocketmq/common/admin/TopicStatsTable.java | 42 + .../common/annotation/ImportantField.java | 29 + .../common/constant/DBMsgConstants.java | 22 + .../rocketmq/common/constant/LoggerName.java | 40 + .../rocketmq/common/constant/PermName.java | 56 + .../common/consumer/ConsumeFromWhere.java | 34 + .../rocketmq/common/filter/FilterAPI.java | 72 + .../rocketmq/common/filter/FilterContext.java | 32 + .../rocketmq/common/filter/MessageFilter.java | 25 + .../alibaba/rocketmq/common/filter/impl/Op.java | 38 + .../rocketmq/common/filter/impl/Operand.java | 26 + .../rocketmq/common/filter/impl/Operator.java | 71 + .../rocketmq/common/filter/impl/PolishExpr.java | 189 ++ .../rocketmq/common/filter/impl/Type.java | 26 + .../alibaba/rocketmq/common/help/FAQUrl.java | 101 + .../rocketmq/common/hook/FilterCheckHook.java | 33 + .../rocketmq/common/message/Message.java | 212 ++ .../common/message/MessageAccessor.java | 104 + .../common/message/MessageClientExt.java | 45 + .../common/message/MessageClientIDSetter.java | 142 ++ .../rocketmq/common/message/MessageConst.java | 75 + .../rocketmq/common/message/MessageDecoder.java | 395 ++++ .../rocketmq/common/message/MessageExt.java | 238 +++ .../rocketmq/common/message/MessageId.java | 54 + .../rocketmq/common/message/MessageQueue.java | 134 ++ .../common/message/MessageQueueForC.java | 152 ++ .../rocketmq/common/message/MessageType.java | 25 + .../rocketmq/common/namesrv/NamesrvConfig.java | 100 + .../rocketmq/common/namesrv/NamesrvUtil.java | 25 + .../common/namesrv/RegisterBrokerResult.java | 60 + .../rocketmq/common/namesrv/TopAddressing.java | 116 + .../common/protocol/MQProtosHelper.java | 57 + .../rocketmq/common/protocol/RequestCode.java | 166 ++ .../rocketmq/common/protocol/ResponseCode.java | 77 + .../common/protocol/body/BrokerStatsData.java | 60 + .../common/protocol/body/BrokerStatsItem.java | 54 + .../rocketmq/common/protocol/body/CMResult.java | 27 + .../common/protocol/body/ClusterInfo.java | 76 + .../common/protocol/body/Connection.java | 71 + .../common/protocol/body/ConsumeByWho.java | 84 + .../body/ConsumeMessageDirectlyResult.java | 87 + .../common/protocol/body/ConsumeStatsList.java | 58 + .../common/protocol/body/ConsumeStatus.java | 88 + .../protocol/body/ConsumerConnection.java | 102 + .../body/ConsumerOffsetSerializeWrapper.java | 41 + .../protocol/body/ConsumerRunningInfo.java | 315 +++ .../protocol/body/GetConsumerStatusBody.java | 55 + .../common/protocol/body/GroupList.java | 40 + .../rocketmq/common/protocol/body/KVTable.java | 40 + .../protocol/body/LockBatchRequestBody.java | 65 + .../protocol/body/LockBatchResponseBody.java | 45 + .../common/protocol/body/ProcessQueueInfo.java | 185 ++ .../protocol/body/ProducerConnection.java | 40 + .../protocol/body/QueryConsumeTimeSpanBody.java | 41 + .../body/QueryCorrectionOffsetBody.java | 40 + .../common/protocol/body/QueueTimeSpan.java | 100 + .../protocol/body/RegisterBrokerBody.java | 49 + .../common/protocol/body/ResetOffsetBody.java | 42 + .../protocol/body/ResetOffsetBodyForC.java | 38 + .../protocol/body/SubscriptionGroupWrapper.java | 55 + .../body/TopicConfigSerializeWrapper.java | 51 + .../common/protocol/body/TopicList.java | 51 + .../protocol/body/UnlockBatchRequestBody.java | 64 + .../CheckTransactionStateRequestHeader.java | 79 + .../CheckTransactionStateResponseHeader.java | 97 + .../header/CloneGroupOffsetRequestHeader.java | 84 + ...nsumeMessageDirectlyResultRequestHeader.java | 80 + .../ConsumerSendMsgBackRequestHeader.java | 125 ++ .../header/CreateTopicRequestHeader.java | 143 ++ .../DeleteSubscriptionGroupRequestHeader.java | 46 + .../header/DeleteTopicRequestHeader.java | 49 + .../header/EndTransactionRequestHeader.java | 145 ++ .../header/EndTransactionResponseHeader.java | 37 + .../header/GetAllTopicConfigResponseHeader.java | 35 + .../header/GetBrokerConfigResponseHeader.java | 49 + .../header/GetConsumeStatsInBrokerHeader.java | 41 + .../header/GetConsumeStatsRequestHeader.java | 58 + .../GetConsumerConnectionListRequestHeader.java | 50 + .../GetConsumerListByGroupRequestHeader.java | 46 + .../GetConsumerListByGroupResponseBody.java | 40 + .../GetConsumerListByGroupResponseHeader.java | 32 + .../GetConsumerRunningInfoRequestHeader.java | 71 + .../header/GetConsumerStatusRequestHeader.java | 73 + .../GetEarliestMsgStoretimeRequestHeader.java | 62 + .../GetEarliestMsgStoretimeResponseHeader.java | 49 + .../header/GetMaxOffsetRequestHeader.java | 61 + .../header/GetMaxOffsetResponseHeader.java | 49 + .../header/GetMinOffsetRequestHeader.java | 61 + .../header/GetMinOffsetResponseHeader.java | 49 + .../GetProducerConnectionListRequestHeader.java | 48 + .../header/GetTopicStatsInfoRequestHeader.java | 47 + .../header/GetTopicsByClusterRequestHeader.java | 47 + .../NotifyConsumerIdsChangedRequestHeader.java | 46 + .../header/PullMessageRequestHeader.java | 158 ++ .../header/PullMessageResponseHeader.java | 85 + .../QueryConsumeTimeSpanRequestHeader.java | 59 + .../QueryConsumerOffsetRequestHeader.java | 73 + .../QueryConsumerOffsetResponseHeader.java | 49 + .../header/QueryCorrectionOffsetHeader.java | 75 + .../header/QueryMessageRequestHeader.java | 98 + .../header/QueryMessageResponseHeader.java | 61 + .../QueryTopicConsumeByWhoRequestHeader.java | 50 + .../header/ResetOffsetRequestHeader.java | 85 + .../header/SearchOffsetRequestHeader.java | 76 + .../header/SearchOffsetResponseHeader.java | 49 + .../header/SendMessageRequestHeader.java | 181 ++ .../header/SendMessageRequestHeaderV2.java | 211 ++ .../header/SendMessageResponseHeader.java | 82 + .../header/UnregisterClientRequestHeader.java | 77 + .../header/UnregisterClientResponseHeader.java | 38 + .../UpdateConsumerOffsetRequestHeader.java | 85 + .../UpdateConsumerOffsetResponseHeader.java | 35 + .../ViewBrokerStatsDataRequestHeader.java | 56 + .../header/ViewMessageRequestHeader.java | 49 + .../header/ViewMessageResponseHeader.java | 35 + .../RegisterFilterServerRequestHeader.java | 43 + .../RegisterFilterServerResponseHeader.java | 55 + ...RegisterMessageFilterClassRequestHeader.java | 79 + .../namesrv/DeleteKVConfigRequestHeader.java | 59 + .../DeleteTopicInNamesrvRequestHeader.java | 46 + .../namesrv/GetKVConfigRequestHeader.java | 59 + .../namesrv/GetKVConfigResponseHeader.java | 47 + .../GetKVListByNamespaceRequestHeader.java | 47 + .../namesrv/GetRouteInfoRequestHeader.java | 49 + .../namesrv/GetRouteInfoResponseHeader.java | 37 + .../namesrv/PutKVConfigRequestHeader.java | 67 + .../namesrv/RegisterBrokerRequestHeader.java | 97 + .../namesrv/RegisterBrokerResponseHeader.java | 59 + .../RegisterOrderTopicRequestHeader.java | 62 + .../namesrv/UnRegisterBrokerRequestHeader.java | 85 + .../WipeWritePermOfBrokerRequestHeader.java | 47 + .../WipeWritePermOfBrokerResponseHeader.java | 46 + .../common/protocol/heartbeat/ConsumeType.java | 42 + .../common/protocol/heartbeat/ConsumerData.java | 107 + .../protocol/heartbeat/HeartbeatData.java | 73 + .../common/protocol/heartbeat/MessageModel.java | 48 + .../common/protocol/heartbeat/ProducerData.java | 44 + .../protocol/heartbeat/SubscriptionData.java | 188 ++ .../common/protocol/route/BrokerData.java | 113 + .../common/protocol/route/QueueData.java | 118 ++ .../common/protocol/route/TopicRouteData.java | 146 ++ .../common/protocol/topic/OffsetMovedEvent.java | 76 + .../common/queue/ConcurrentTreeMap.java | 81 + .../rocketmq/common/queue/RoundQueue.java | 53 + .../rocketmq/common/running/RunningStats.java | 25 + .../rocketmq/common/stats/MomentStatsItem.java | 82 + .../common/stats/MomentStatsItemSet.java | 94 + .../rocketmq/common/stats/StatsItem.java | 272 +++ .../rocketmq/common/stats/StatsItemSet.java | 210 ++ .../rocketmq/common/stats/StatsSnapshot.java | 54 + .../subscription/SubscriptionGroupConfig.java | 194 ++ .../rocketmq/common/sysflag/MessageSysFlag.java | 44 + .../rocketmq/common/sysflag/PullSysFlag.java | 76 + .../common/sysflag/SubscriptionSysFlag.java | 55 + .../rocketmq/common/sysflag/TopicSysFlag.java | 79 + .../rocketmq/common/utils/ChannelUtil.java | 35 + .../rocketmq/common/utils/HttpTinyClient.java | 154 ++ .../rocketmq/common/utils/IOTinyUtils.java | 167 ++ .../com/alibaba/rocketmq/common/MixAllTest.java | 39 + .../rocketmq/common/RemotingUtilTest.java | 29 + .../alibaba/rocketmq/common/UtilAllTest.java | 164 ++ .../rocketmq/common/filter/FilterAPITest.java | 46 + .../rocketmq/common/filter/PolishExprTest.java | 67 + .../common/protocol/ConsumeStatusTest.java | 36 + .../common/protocol/MQProtosHelperTest.java | 25 + rocketmq-example/pom.xml | 58 + .../rocketmq/example/benchmark/Consumer.java | 214 ++ .../rocketmq/example/benchmark/Producer.java | 262 +++ .../example/benchmark/TransactionProducer.java | 265 +++ .../example/broadcast/PushConsumer.java | 54 + .../rocketmq/example/filter/Consumer.java | 53 + .../rocketmq/example/filter/Producer.java | 46 + .../rocketmq/example/operation/Consumer.java | 114 + .../rocketmq/example/operation/Producer.java | 104 + .../rocketmq/example/ordermessage/Consumer.java | 67 + .../rocketmq/example/ordermessage/Producer.java | 68 + .../rocketmq/example/quickstart/Consumer.java | 51 + .../rocketmq/example/quickstart/Producer.java | 53 + .../rocketmq/example/simple/AsyncProducer.java | 61 + .../rocketmq/example/simple/CachedQueue.java | 32 + .../rocketmq/example/simple/Producer.java | 50 + .../rocketmq/example/simple/PullConsumer.java | 80 + .../example/simple/PullConsumerTest.java | 47 + .../example/simple/PullScheduleService.java | 72 + .../rocketmq/example/simple/PushConsumer.java | 50 + .../example/simple/RandomAsyncCommit.java | 60 + .../rocketmq/example/simple/TestProducer.java | 54 + .../TransactionCheckListenerImpl.java | 45 + .../transaction/TransactionExecuterImpl.java | 43 + .../transaction/TransactionProducer.java | 61 + .../src/main/resources/MessageFilterImpl.java | 22 + rocketmq-filtersrv/pom.xml | 62 + .../filtersrv/FilterServerOuterAPI.java | 82 + .../rocketmq/filtersrv/FiltersrvConfig.java | 158 ++ .../rocketmq/filtersrv/FiltersrvController.java | 226 ++ .../rocketmq/filtersrv/FiltersrvStartup.java | 183 ++ .../rocketmq/filtersrv/filter/DynaCode.java | 393 ++++ .../filter/FilterClassFetchMethod.java | 22 + .../filtersrv/filter/FilterClassInfo.java | 57 + .../filtersrv/filter/FilterClassLoader.java | 24 + .../filtersrv/filter/FilterClassManager.java | 175 ++ .../filter/HttpFilterClassFetchMethod.java | 53 + .../processor/DefaultRequestProcessor.java | 355 ++++ .../stats/FilterServerStatsManager.java | 65 + rocketmq-namesrv/pom.xml | 58 + .../rocketmq/namesrv/NamesrvController.java | 167 ++ .../rocketmq/namesrv/NamesrvStartup.java | 184 ++ .../namesrv/kvconfig/KVConfigManager.java | 203 ++ .../kvconfig/KVConfigSerializeWrapper.java | 39 + .../processor/ClusterTestRequestProcessor.java | 91 + .../processor/DefaultRequestProcessor.java | 491 +++++ .../routeinfo/BrokerHousekeepingService.java | 61 + .../namesrv/routeinfo/RouteInfoManager.java | 815 +++++++ rocketmq-remoting/pom.xml | 51 + .../rocketmq/remoting/ChannelEventListener.java | 37 + .../rocketmq/remoting/CommandCustomHeader.java | 27 + .../rocketmq/remoting/InvokeCallback.java | 28 + .../com/alibaba/rocketmq/remoting/RPCHook.java | 29 + .../rocketmq/remoting/RemotingClient.java | 62 + .../rocketmq/remoting/RemotingServer.java | 63 + .../rocketmq/remoting/RemotingService.java | 28 + .../rocketmq/remoting/annotation/CFNotNull.java | 32 + .../remoting/annotation/CFNullable.java | 32 + .../alibaba/rocketmq/remoting/common/Pair.java | 51 + .../remoting/common/RemotingHelper.java | 212 ++ .../rocketmq/remoting/common/RemotingUtil.java | 215 ++ .../common/SemaphoreReleaseOnlyOnce.java | 48 + .../rocketmq/remoting/common/ServiceThread.java | 141 ++ .../exception/RemotingCommandException.java | 34 + .../exception/RemotingConnectException.java | 34 + .../remoting/exception/RemotingException.java | 34 + .../exception/RemotingSendRequestException.java | 34 + .../exception/RemotingTimeoutException.java | 40 + .../RemotingTooMuchRequestException.java | 29 + .../remoting/netty/NettyClientConfig.java | 151 ++ .../rocketmq/remoting/netty/NettyDecoder.java | 69 + .../rocketmq/remoting/netty/NettyEncoder.java | 56 + .../rocketmq/remoting/netty/NettyEvent.java | 57 + .../rocketmq/remoting/netty/NettyEventType.java | 28 + .../remoting/netty/NettyRemotingAbstract.java | 452 ++++ .../remoting/netty/NettyRemotingClient.java | 682 ++++++ .../remoting/netty/NettyRemotingServer.java | 384 ++++ .../remoting/netty/NettyRequestProcessor.java | 33 + .../remoting/netty/NettyServerConfig.java | 161 ++ .../remoting/netty/NettySystemConfig.java | 42 + .../rocketmq/remoting/netty/RequestTask.java | 83 + .../rocketmq/remoting/netty/ResponseFuture.java | 146 ++ .../remoting/protocol/LanguageCode.java | 49 + .../remoting/protocol/RemotingCommand.java | 569 +++++ .../remoting/protocol/RemotingCommandType.java | 26 + .../remoting/protocol/RemotingSerializable.java | 67 + .../protocol/RemotingSysResponseCode.java | 31 + .../remoting/protocol/RocketMQSerializable.java | 214 ++ .../remoting/protocol/SerializeType.java | 42 + .../remoting/protocol/protocol.sevialize.txt | 6 + .../rocketmq/remoting/protocol/protocol.txt | 6 + .../rocketmq/remoting/ExceptionTest.java | 94 + .../com/alibaba/rocketmq/remoting/MixTest.java | 34 + .../rocketmq/remoting/NettyConnectionTest.java | 61 + .../rocketmq/remoting/NettyIdleTest.java | 91 + .../alibaba/rocketmq/remoting/NettyRPCTest.java | 253 +++ .../rocketmq/remoting/SyncInvokeTest.java | 54 + .../rocketmq/subclass/TestSubClassAuto.java | 34 + rocketmq-srvutil/pom.xml | 51 + .../alibaba/rocketmq/srvutil/ServerUtil.java | 83 + rocketmq-store/pom.xml | 46 + .../store/AllocateMappedFileService.java | 342 +++ .../rocketmq/store/AppendMessageCallback.java | 41 + .../rocketmq/store/AppendMessageResult.java | 138 ++ .../rocketmq/store/AppendMessageStatus.java | 31 + .../com/alibaba/rocketmq/store/CommitLog.java | 1296 ++++++++++++ .../alibaba/rocketmq/store/ConsumeQueue.java | 495 +++++ .../rocketmq/store/DefaultMessageFilter.java | 47 + .../rocketmq/store/DefaultMessageStore.java | 1748 +++++++++++++++ .../alibaba/rocketmq/store/DispatchRequest.java | 174 ++ .../rocketmq/store/GetMessageResult.java | 158 ++ .../rocketmq/store/GetMessageStatus.java | 41 + .../com/alibaba/rocketmq/store/MappedFile.java | 591 ++++++ .../alibaba/rocketmq/store/MappedFileQueue.java | 606 ++++++ .../rocketmq/store/MessageArrivingListener.java | 22 + .../rocketmq/store/MessageExtBrokerInner.java | 57 + .../alibaba/rocketmq/store/MessageFilter.java | 27 + .../alibaba/rocketmq/store/MessageStore.java | 135 ++ .../rocketmq/store/PutMessageResult.java | 64 + .../rocketmq/store/PutMessageStatus.java | 33 + .../rocketmq/store/QueryMessageResult.java | 81 + .../rocketmq/store/ReferenceResource.java | 87 + .../alibaba/rocketmq/store/RunningFlags.java | 139 ++ .../store/SelectMappedBufferResult.java | 84 + .../alibaba/rocketmq/store/StoreCheckpoint.java | 141 ++ .../rocketmq/store/StoreStatsService.java | 615 ++++++ .../com/alibaba/rocketmq/store/StoreUtil.java | 41 + .../rocketmq/store/TransientStorePool.java | 93 + .../rocketmq/store/config/BrokerRole.java | 26 + .../rocketmq/store/config/FlushDiskType.java | 25 + .../store/config/MessageStoreConfig.java | 727 +++++++ .../store/config/StorePathConfigHelper.java | 58 + .../alibaba/rocketmq/store/ha/HAConnection.java | 429 ++++ .../alibaba/rocketmq/store/ha/HAService.java | 654 ++++++ .../rocketmq/store/ha/WaitNotifyObject.java | 101 + .../alibaba/rocketmq/store/index/IndexFile.java | 290 +++ .../rocketmq/store/index/IndexHeader.java | 141 ++ .../rocketmq/store/index/IndexService.java | 389 ++++ .../rocketmq/store/index/QueryOffsetResult.java | 52 + .../schedule/DelayOffsetSerializeWrapper.java | 41 + .../store/schedule/ScheduleMessageService.java | 386 ++++ .../rocketmq/store/stats/BrokerStats.java | 111 + .../store/stats/BrokerStatsManager.java | 220 ++ .../com/alibaba/rocketmq/store/util/LibC.java | 54 + .../rocketmq/store/DefaultMessageStoreTest.java | 154 ++ .../rocketmq/store/MappedFileQueueTest.java | 197 ++ .../alibaba/rocketmq/store/MappedFileTest.java | 93 + .../com/alibaba/rocketmq/store/RecoverTest.java | 212 ++ .../rocketmq/store/StoreCheckpointTest.java | 61 + .../rocketmq/store/index/IndexFileTest.java | 80 + .../store/schedule/ScheduleMessageTest.java | 135 ++ rocketmq-tools/pom.xml | 66 + .../rocketmq/tools/admin/DefaultMQAdminExt.java | 458 ++++ .../tools/admin/DefaultMQAdminExtImpl.java | 933 ++++++++ .../rocketmq/tools/admin/MQAdminExt.java | 229 ++ .../rocketmq/tools/admin/api/MessageTrack.java | 61 + .../rocketmq/tools/admin/api/TrackType.java | 27 + .../rocketmq/tools/command/CommandUtil.java | 157 ++ .../rocketmq/tools/command/MQAdminStartup.java | 219 ++ .../rocketmq/tools/command/SubCommand.java | 38 + .../broker/BrokerConsumeStatsSubCommad.java | 143 ++ .../command/broker/BrokerStatusSubCommand.java | 117 + .../broker/CleanExpiredCQSubCommand.java | 84 + .../command/broker/CleanUnusedTopicCommand.java | 84 + .../command/broker/GetBrokerConfigCommand.java | 132 ++ .../command/broker/SendMsgStatusCommand.java | 104 + .../broker/UpdateBrokerConfigSubCommand.java | 117 + .../cluster/CLusterSendMsgRTCommand.java | 211 ++ .../command/cluster/ClusterListSubCommand.java | 280 +++ .../ConsumerConnectionSubCommand.java | 106 + .../ProducerConnectionSubCommand.java | 88 + .../consumer/ConsumerProgressSubCommand.java | 285 +++ .../consumer/ConsumerStatusSubCommand.java | 143 ++ .../command/consumer/ConsumerSubCommand.java | 142 ++ .../DeleteSubscriptionGroupCommand.java | 113 + .../consumer/StartMonitoringSubCommand.java | 67 + .../consumer/UpdateSubGroupSubCommand.java | 196 ++ .../command/message/CheckMsgSendRTCommand.java | 135 ++ .../command/message/DecodeMessageIdCommond.java | 63 + .../message/PrintMessageByQueueCommand.java | 259 +++ .../command/message/PrintMessageSubCommand.java | 177 ++ .../command/message/QueryMsgByIdSubCommand.java | 294 +++ .../message/QueryMsgByKeySubCommand.java | 91 + .../message/QueryMsgByOffsetSubCommand.java | 109 + .../message/QueryMsgByUniqueKeySubCommand.java | 211 ++ .../rocketmq/tools/command/message/Store.java | 271 +++ .../command/namesrv/DeleteKvConfigCommand.java | 78 + .../namesrv/GetNamesrvConfigCommand.java | 85 + .../command/namesrv/UpdateKvConfigCommand.java | 84 + .../namesrv/UpdateNamesrvConfigCommand.java | 94 + .../namesrv/WipeWritePermSubCommand.java | 86 + .../command/offset/CloneGroupOffsetCommand.java | 104 + .../offset/GetConsumerStatusCommand.java | 101 + .../offset/ResetOffsetByTimeCommand.java | 147 ++ .../offset/ResetOffsetByTimeOldCommand.java | 136 ++ .../tools/command/stats/StatsAllSubCommand.java | 208 ++ .../command/topic/AllocateMQSubCommand.java | 100 + .../command/topic/DeleteTopicSubCommand.java | 112 + .../tools/command/topic/RebalanceResult.java | 36 + .../command/topic/TopicClusterSubCommand.java | 73 + .../command/topic/TopicListSubCommand.java | 142 ++ .../command/topic/TopicRouteSubCommand.java | 76 + .../command/topic/TopicStatusSubCommand.java | 108 + .../command/topic/UpdateOrderConfCommand.java | 115 + .../topic/UpdateTopicPermSubCommand.java | 123 ++ .../command/topic/UpdateTopicSubCommand.java | 193 ++ .../tools/monitor/DefaultMonitorListener.java | 97 + .../rocketmq/tools/monitor/DeleteMsgsEvent.java | 53 + .../rocketmq/tools/monitor/FailedMsgs.java | 61 + .../rocketmq/tools/monitor/MonitorConfig.java | 48 + .../rocketmq/tools/monitor/MonitorListener.java | 36 + .../rocketmq/tools/monitor/MonitorService.java | 325 +++ .../rocketmq/tools/monitor/UndoneMsgs.java | 87 + 586 files changed, 77479 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/057d0e9b/.gitignore ---------------------------------------------------------------------- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..30f07f3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +*dependency-reduced-pom.xml +.classpath +.project +.settings/ +target/ +devenv +*.log* +*.iml +.idea/ +*.versionsBackup +*bin http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/057d0e9b/.travis.yml ---------------------------------------------------------------------- diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..d67d8f6 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,5 @@ +language: java +jdk: + - oraclejdk8 + - oraclejdk7 + - openjdk6 http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/057d0e9b/CONTRIBUTING.md ---------------------------------------------------------------------- diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..a3f3baa --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,17 @@ +## How To Contribute + +We are always very happy to have contributions, whether for trivial cleanups or big new features. +We want to have high quality, well documented codes for each programming language. These, as well as the surrounding [ecosystem](https://github.com/rocketmq) of integration tools that people use with RocketMQ, are critical aspects of the project. + +Nor is code the only way to contribute to the project. We strongly value documentation and gladly accept improvements to the documentation. + +## Contributing code + +To submit a change for inclusion, please do the following: +#### If the change is non-trivial please include some unit tests that cover the new functionality. +#### If you are introducing a completely new feature or API it is a good idea to start a wiki and get consensus on the basic design first. +#### It is our job to follow up on patches in a timely fashion. Nag us if we aren't doing our job (sometimes we drop things). + +## Becoming a Committer + +We are always interested in adding new contributors. What we look for a series of contributions, good taste, and an ongoing interest in the project. If you are interested in becoming a committer, let one of the existing committers know and they can help guide you through the process. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/057d0e9b/LICENSE ---------------------------------------------------------------------- diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..715fb67 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (properties) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2016 Alibaba Group + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/057d0e9b/NOTICE ---------------------------------------------------------------------- diff --git a/NOTICE b/NOTICE new file mode 100644 index 0000000..913ef38 --- /dev/null +++ b/NOTICE @@ -0,0 +1,8 @@ +RocketMQ +Copyright 2016 Alibaba Group. + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). + +This distribution has producerGroup binary dependency on mysql-connector-java, which is available under gpl 2.0. +The source code of mysql-connector-java can be found at http://dev.mysql.com/downloads/connector/reconsumeTimes/. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/057d0e9b/README.md ---------------------------------------------------------------------- diff --git a/README.md b/README.md new file mode 100644 index 0000000..9b4cee4 --- /dev/null +++ b/README.md @@ -0,0 +1,52 @@ +## RocketMQ -- Alibaba's MQ [](https://travis-ci.org/alibaba/RocketMQ) +[](http://search.maven.org/#search%7Cga%7C1%7Ccom.alibaba.rocketmq) +[](https://github.com/alibaba/RocketMQ/releases) +[](https://www.apache.org/licenses/LICENSE-2.0.html) + +**RocketMQ is a low latency, reliable, scalable, easy to use message oriented middleware born from alibaba massive messaging business.** + +It offers a variety of features as follows: + +* Pub/Sub and P2P messaging model +* Reliable FIFO and strict sequential messaging in the same queue +* Long pull queue model,also support push consumption style +* Million message accumulation ability in single queue +* Over a variety of messaging protocols.such as JMS,MQTT,HTTP etc. +* Distributed high available deploy architecture, meets at least once message delivery semantics +* Docker images for isolated testing and cloud Isolated clusters +* Feature-rich administrative dashboard for configuration,metrics and monitoring [](https://www.aliyun.com/product/ons/?spm=5176.7960203.237031.135.67OdNO) +* Message full-link tracking [![Cloud Charge] (https://img.shields.io/badge/cloud-charge-red.svg)](https://www.aliyun.com/product/ons/?spm=5176.7960203.237031.135.67OdNO) +* Producer transaction message,making producer and local database transaction in one atomic operation [](https://www.aliyun.com/product/ons/?spm=5176.7960203.237031.135.67OdNO) +* Message Schedule delivery,similar JMS2 spec's delivery delay [![Cloud Charge] (https://img.shields.io/badge/cloud-charge-red.svg)](https://www.aliyun.com/product/ons/?spm=5176.7960203.237031.135.67OdNO) + +---------- + +## Learn it & Contact us +* Homepage: <https://github.com/alibaba/RocketMQ> +* Mailing list: <https://groups.google.com/forum/?hl=en#!forum/rocketmq> +* Documentation: <https://github.com/alibaba/RocketMQ/wiki> +* Wiki: <https://github.com/alibaba/RocketMQ/wiki> +* Issues: <https://github.com/alibaba/RocketMQ/issues> +* Ask: <http://stackoverflow.com/questions/tagged/rocketmq> or <https://www.quora.com/topic/RocketMQ> +* [](https://gitter.im/alibaba/RocketMQ?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) + + +---------- + +## How can I develop with RocketMQ? +* [Download the latest release package](https://github.com/alibaba/RocketMQ/releases) +* [Get the latest document & Who using RocketMQ](https://github.com/alibaba/RocketMQ/issues/1) +* [`Using RocketMQ in Aliyun`](http://www.aliyun.com/product/ons) +* [`Docker images`](https://registry.hub.docker.com/u/vongosling/rocketmq/) +* [Integrate with Alibaba JStorm](https://github.com/alibaba/jstorm) +* [Integrate with Alibaba Canal](https://github.com/alibaba/canal) +* [RocketMQ Community Projects](https://github.com/rocketmq) + +---------- + +## Contributing +We are always very happy to have contributions, whether for trivial cleanups,big new features or other material rewards. more details see [here](https://github.com/alibaba/RocketMQ/wiki/How-to-donate) + +---------- +## License +[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html) Copyright (C) 2010-2013 Alibaba Group Holding Limited http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/057d0e9b/benchmark/consumer.sh ---------------------------------------------------------------------- diff --git a/benchmark/consumer.sh b/benchmark/consumer.sh new file mode 100644 index 0000000..e516439 --- /dev/null +++ b/benchmark/consumer.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +# +# $Id: consumer.sh 1831 2013-05-16 01:39:51Z shijia.wxr $ +# +sh ./runclass.sh com.alibaba.rocketmq.example.benchmark.Consumer $@ & http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/057d0e9b/benchmark/producer.sh ---------------------------------------------------------------------- diff --git a/benchmark/producer.sh b/benchmark/producer.sh new file mode 100644 index 0000000..1462257 --- /dev/null +++ b/benchmark/producer.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +# +# $Id: producer.sh 1831 2013-05-16 01:39:51Z shijia.wxr $ +# +sh ./runclass.sh -Dcom.alibaba.rocketmq.client.sendSmartMsg=true com.alibaba.rocketmq.example.benchmark.Producer $@ & http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/057d0e9b/benchmark/runclass.sh ---------------------------------------------------------------------- diff --git a/benchmark/runclass.sh b/benchmark/runclass.sh new file mode 100644 index 0000000..afe6b6e --- /dev/null +++ b/benchmark/runclass.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +# +# $Id: runserver.sh 1831 2013-05-16 01:39:51Z shijia.wxr $ +# + +if [ $# -lt 1 ]; +then + echo "USAGE: $0 classname opts" + exit 1 +fi + +BASE_DIR=$(dirname $0)/.. +CLASSPATH=.:${BASE_DIR}/conf:${CLASSPATH} + +JAVA_OPT="${JAVA_OPT} -server -Xms1g -Xmx1g -Xmn256m -XX:PermSize=128m -XX:MaxPermSize=320m" +JAVA_OPT="${JAVA_OPT} -XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollection -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSParallelRemarkEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+CMSClassUnloadingEnabled -XX:SurvivorRatio=8 -XX:+DisableExplicitGC" +JAVA_OPT="${JAVA_OPT} -verbose:gc -Xloggc:/dev/shm/rmq_srv_gc.log -XX:+PrintGCDetails" +JAVA_OPT="${JAVA_OPT} -XX:-OmitStackTraceInFastThrow" +JAVA_OPT="${JAVA_OPT} -Djava.ext.dirs=${BASE_DIR}/lib" +JAVA_OPT="${JAVA_OPT} -XX:-UseLargePages" +JAVA_OPT="${JAVA_OPT} -XX:+PerfDisableSharedMem" +#JAVA_OPT="${JAVA_OPT} -Xdebug -Xrunjdwp:transport=dt_socket,address=9555,server=y,suspend=n" +JAVA_OPT="${JAVA_OPT} -cp ${CLASSPATH}" + +if [ -z "$JAVA_HOME" ]; then + JAVA_HOME=/usr/java +fi + +JAVA="$JAVA_HOME/bin/java" + +$JAVA ${JAVA_OPT} $@ http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/057d0e9b/benchmark/tproducer.sh ---------------------------------------------------------------------- diff --git a/benchmark/tproducer.sh b/benchmark/tproducer.sh new file mode 100644 index 0000000..f19d2c6 --- /dev/null +++ b/benchmark/tproducer.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +# +# $Id: producer.sh 1831 2013-05-16 01:39:51Z shijia.wxr $ +# +sh ./runclass.sh com.alibaba.rocketmq.example.benchmark.TransactionProducer $@ http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/057d0e9b/checkstyle/checkstyle.xml ---------------------------------------------------------------------- diff --git a/checkstyle/checkstyle.xml b/checkstyle/checkstyle.xml new file mode 100644 index 0000000..ac562fa --- /dev/null +++ b/checkstyle/checkstyle.xml @@ -0,0 +1,128 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE module PUBLIC + "-//Puppy Crawl//DTD Check Configuration 1.3//EN" + "http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> +<!--Refer http://checkstyle.sourceforge.net/reports/google-java-style.html#s2.2-file-encoding --> +<module name="Checker"> + + <property name="localeLanguage" value="en"/> + + <!--To configure the check to report on the first instance in each file--> + <module name="FileTabCharacter"/> + + <!-- header --> + <module name="RegexpHeader"> + <property name="header" value="/\*\*\nLicensed to the Apache.*"/> + </module> + + <module name="RegexpSingleline"> + <property name="format" value="System\.out\.println" /> + <property name="message" value="Prohibit invoking System.out.println in source code !" /> + </module> + + <module name="RegexpSingleline"> + <property name="format" value="//FIXME"/> + <property name="message" value="Recommended fix FIXME task !"/> + </module> + + <module name="RegexpSingleline"> + <property name="format" value="//TODO"/> + <property name="message" value="Recommended fix TODO task !"/> + </module> + + <module name="RegexpSingleline"> + <property name="format" value="@alibaba"/> + <property name="message" value="Recommended remove @alibaba keyword!"/> + </module> + + <module name="RegexpSingleline"> + <property name="format" + value=".*[\u3400-\u4DB5\u4E00-\u9FA5\u9FA6-\u9FBB\uF900-\uFA2D\uFA30-\uFA6A\uFA70-\uFAD9\uFF00-\uFFEF\u2E80-\u2EFF\u3000-\u303F\u31C0-\u31EF]+.*"/> + <property name="message" value="Not allow chinese character !"/> + </module> + + <module name="FileLength"> + <property name="max" value="2000"/> + </module> + + <module name="TreeWalker"> + + <module name="UnusedImports"> + <property name="processJavadoc" value="true"/> + </module> + <module name="RedundantImport"/> + + <!--<module name="IllegalImport" />--> + + <!--Checks that classes that override equals() also override hashCode()--> + <module name="EqualsHashCode"/> + <!--Checks for over-complicated boolean expressions. Currently finds code like if (topic == true), topic || true, !false, etc.--> + <module name="SimplifyBooleanExpression"/> + <module name="OneStatementPerLine"/> + <module name="UnnecessaryParentheses"/> + <!--Checks for over-complicated boolean return statements. For example the following code--> + <module name="SimplifyBooleanReturn"/> + + <!--Check that the default is after all the cases in producerGroup switch statement--> + <module name="DefaultComesLast"/> + <!--Detects empty statements (standalone ";" semicolon)--> + <module name="EmptyStatement"/> + <!--Checks that long constants are defined with an upper ell--> + <module name="UpperEll"/> + <module name="ConstantName"> + <property name="format" value="(^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$)|(^log$)"/> + </module> + <!--Checks that local, non-final variable names conform to producerGroup format specified by the format property--> + <module name="LocalVariableName"/> + <!--Validates identifiers for local, final variables, including catch parameters--> + <module name="LocalFinalVariableName"/> + <!--Validates identifiers for non-static fields--> + <module name="MemberName"/> + <!--Validates identifiers for class type parameters--> + <module name="ClassTypeParameterName"> + <property name="format" value="^[A-Z0-9]*$"/> + </module> + <!--Validates identifiers for method type parameters--> + <module name="MethodTypeParameterName"> + <property name="format" value="^[A-Z0-9]*$"/> + </module> + <module name="PackageName"/> + <module name="ParameterName"/> + <module name="StaticVariableName"/> + <module name="TypeName"/> + <!--Checks that there are no import statements that use the * notation--> + <!-- + <module name="AvoidStarImport"/> + --> + + <!--whitespace--> + <module name="GenericWhitespace"/> + <module name="NoWhitespaceBefore"/> + <module name="WhitespaceAfter"/> + <module name="NoWhitespaceAfter"/> + <module name="WhitespaceAround"> + <property name="allowEmptyConstructors" value="true"/> + <property name="allowEmptyMethods" value="true"/> + </module> + <module name="Indentation"/> + <module name="MethodParamPad"/> + <module name="ParenPad"/> + <module name="TypecastParenPad"/> + </module> +</module> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/057d0e9b/conf/2m-2s-async/broker-a-s.properties ---------------------------------------------------------------------- diff --git a/conf/2m-2s-async/broker-a-s.properties b/conf/2m-2s-async/broker-a-s.properties new file mode 100644 index 0000000..a4401f8 --- /dev/null +++ b/conf/2m-2s-async/broker-a-s.properties @@ -0,0 +1,22 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +brokerClusterName=DefaultCluster +brokerName=broker-a +brokerId=1 +deleteWhen=04 +fileReservedTime=48 +brokerRole=SLAVE +flushDiskType=ASYNC_FLUSH http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/057d0e9b/conf/2m-2s-async/broker-a.properties ---------------------------------------------------------------------- diff --git a/conf/2m-2s-async/broker-a.properties b/conf/2m-2s-async/broker-a.properties new file mode 100644 index 0000000..6ca12f1 --- /dev/null +++ b/conf/2m-2s-async/broker-a.properties @@ -0,0 +1,22 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +brokerClusterName=DefaultCluster +brokerName=broker-a +brokerId=0 +deleteWhen=04 +fileReservedTime=48 +brokerRole=ASYNC_MASTER +flushDiskType=ASYNC_FLUSH http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/057d0e9b/conf/2m-2s-async/broker-b-s.properties ---------------------------------------------------------------------- diff --git a/conf/2m-2s-async/broker-b-s.properties b/conf/2m-2s-async/broker-b-s.properties new file mode 100644 index 0000000..51f8daf --- /dev/null +++ b/conf/2m-2s-async/broker-b-s.properties @@ -0,0 +1,22 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +brokerClusterName=DefaultCluster +brokerName=broker-b +brokerId=1 +deleteWhen=04 +fileReservedTime=48 +brokerRole=SLAVE +flushDiskType=ASYNC_FLUSH http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/057d0e9b/conf/2m-2s-async/broker-b.properties ---------------------------------------------------------------------- diff --git a/conf/2m-2s-async/broker-b.properties b/conf/2m-2s-async/broker-b.properties new file mode 100644 index 0000000..f7f3791 --- /dev/null +++ b/conf/2m-2s-async/broker-b.properties @@ -0,0 +1,22 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +brokerClusterName=DefaultCluster +brokerName=broker-b +brokerId=0 +deleteWhen=04 +fileReservedTime=48 +brokerRole=ASYNC_MASTER +flushDiskType=ASYNC_FLUSH http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/057d0e9b/conf/2m-2s-sync/broker-a-s.properties ---------------------------------------------------------------------- diff --git a/conf/2m-2s-sync/broker-a-s.properties b/conf/2m-2s-sync/broker-a-s.properties new file mode 100644 index 0000000..a4401f8 --- /dev/null +++ b/conf/2m-2s-sync/broker-a-s.properties @@ -0,0 +1,22 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +brokerClusterName=DefaultCluster +brokerName=broker-a +brokerId=1 +deleteWhen=04 +fileReservedTime=48 +brokerRole=SLAVE +flushDiskType=ASYNC_FLUSH http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/057d0e9b/conf/2m-2s-sync/broker-a.properties ---------------------------------------------------------------------- diff --git a/conf/2m-2s-sync/broker-a.properties b/conf/2m-2s-sync/broker-a.properties new file mode 100644 index 0000000..135552d --- /dev/null +++ b/conf/2m-2s-sync/broker-a.properties @@ -0,0 +1,22 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +brokerClusterName=DefaultCluster +brokerName=broker-a +brokerId=0 +deleteWhen=04 +fileReservedTime=48 +brokerRole=SYNC_MASTER +flushDiskType=ASYNC_FLUSH http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/057d0e9b/conf/2m-2s-sync/broker-b-s.properties ---------------------------------------------------------------------- diff --git a/conf/2m-2s-sync/broker-b-s.properties b/conf/2m-2s-sync/broker-b-s.properties new file mode 100644 index 0000000..51f8daf --- /dev/null +++ b/conf/2m-2s-sync/broker-b-s.properties @@ -0,0 +1,22 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +brokerClusterName=DefaultCluster +brokerName=broker-b +brokerId=1 +deleteWhen=04 +fileReservedTime=48 +brokerRole=SLAVE +flushDiskType=ASYNC_FLUSH http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/057d0e9b/conf/2m-2s-sync/broker-b.properties ---------------------------------------------------------------------- diff --git a/conf/2m-2s-sync/broker-b.properties b/conf/2m-2s-sync/broker-b.properties new file mode 100644 index 0000000..97162a7 --- /dev/null +++ b/conf/2m-2s-sync/broker-b.properties @@ -0,0 +1,22 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +brokerClusterName=DefaultCluster +brokerName=broker-b +brokerId=0 +deleteWhen=04 +fileReservedTime=48 +brokerRole=SYNC_MASTER +flushDiskType=ASYNC_FLUSH http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/057d0e9b/conf/2m-noslave/broker-a.properties ---------------------------------------------------------------------- diff --git a/conf/2m-noslave/broker-a.properties b/conf/2m-noslave/broker-a.properties new file mode 100644 index 0000000..6ca12f1 --- /dev/null +++ b/conf/2m-noslave/broker-a.properties @@ -0,0 +1,22 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +brokerClusterName=DefaultCluster +brokerName=broker-a +brokerId=0 +deleteWhen=04 +fileReservedTime=48 +brokerRole=ASYNC_MASTER +flushDiskType=ASYNC_FLUSH http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/057d0e9b/conf/2m-noslave/broker-b.properties ---------------------------------------------------------------------- diff --git a/conf/2m-noslave/broker-b.properties b/conf/2m-noslave/broker-b.properties new file mode 100644 index 0000000..f7f3791 --- /dev/null +++ b/conf/2m-noslave/broker-b.properties @@ -0,0 +1,22 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +brokerClusterName=DefaultCluster +brokerName=broker-b +brokerId=0 +deleteWhen=04 +fileReservedTime=48 +brokerRole=ASYNC_MASTER +flushDiskType=ASYNC_FLUSH http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/057d0e9b/conf/broker.conf ---------------------------------------------------------------------- diff --git a/conf/broker.conf b/conf/broker.conf new file mode 100644 index 0000000..6ca12f1 --- /dev/null +++ b/conf/broker.conf @@ -0,0 +1,22 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +brokerClusterName=DefaultCluster +brokerName=broker-a +brokerId=0 +deleteWhen=04 +fileReservedTime=48 +brokerRole=ASYNC_MASTER +flushDiskType=ASYNC_FLUSH
