Windows RocketMQ
This commit is contained in:
parent
a7072d1e9d
commit
bb76a6520d
334
base/Resources/rocketmq/LICENSE
Normal file
334
base/Resources/rocketmq/LICENSE
Normal file
@ -0,0 +1,334 @@
|
||||
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 (i) 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 [yyyy] [name of copyright owner]
|
||||
|
||||
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.
|
||||
|
||||
------
|
||||
This product has a bundle logback, which is available under the EPL v1.0 License.
|
||||
The source code of logback can be found at https://github.com/qos-ch/logback.
|
||||
|
||||
Logback LICENSE
|
||||
---------------
|
||||
|
||||
Logback: the reliable, generic, fast and flexible logging framework.
|
||||
Copyright (C) 1999-2015, QOS.ch. All rights reserved.
|
||||
|
||||
This program and the accompanying materials are dual-licensed under
|
||||
either the terms of the Eclipse Public License v1.0 as published by
|
||||
the Eclipse Foundation
|
||||
|
||||
or (per the licensee's choosing)
|
||||
|
||||
under the terms of the GNU Lesser General Public License version 2.1
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
------
|
||||
This product has a bundle slf4j, which is available under the MIT License.
|
||||
The source code of slf4j can be found at https://github.com/qos-ch/slf4j.
|
||||
|
||||
Copyright (c) 2004-2017 QOS.ch
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
------
|
||||
This product has a bundle fastjson, which is available under the ASL2 License.
|
||||
The source code of fastjson can be found at https://github.com/alibaba/fastjson.
|
||||
|
||||
Copyright 1999-2016 Alibaba Group Holding Ltd.
|
||||
|
||||
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.
|
||||
|
||||
------
|
||||
This product has a bundle javassist, which is available under the ASL2 License.
|
||||
The source code of javassist can be found at https://github.com/jboss-javassist/javassist.
|
||||
|
||||
Copyright (C) 1999- by Shigeru Chiba, All rights reserved.
|
||||
|
||||
Javassist (JAVA programming ASSISTant) makes Java bytecode manipulation simple.
|
||||
It is a class library for editing bytecodes in Java; it enables Java programs to define a new class
|
||||
at runtime and to modify a class file when the JVM loads it. Unlike other similar bytecode editors,
|
||||
Javassist provides two levels of API: source level and bytecode level. If the users use the source- level API,
|
||||
they can edit a class file without knowledge of the specifications of the Java bytecode.
|
||||
The whole API is designed with only the vocabulary of the Java language.
|
||||
You can even specify inserted bytecode in the form of source text; Javassist compiles it on the fly.
|
||||
On the other hand, the bytecode-level API allows the users to directly edit a class file as other editors.
|
||||
|
||||
This software is distributed under the Mozilla Public License Version 1.1,
|
||||
the GNU Lesser General Public License Version 2.1 or later, or the Apache License Version 2.0.
|
||||
|
||||
------
|
||||
This product has a bundle jna, which is available under the ASL2 License.
|
||||
The source code of jna can be found at https://github.com/java-native-access/jna.
|
||||
|
||||
This copy of JNA is licensed under the
|
||||
Apache (Software) License, version 2.0 ("the License").
|
||||
See the License for details about distribution rights, and the
|
||||
specific rights regarding derivate works.
|
||||
|
||||
You may obtain a copy of the License at:
|
||||
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
A copy is also included in the downloadable source code package
|
||||
containing JNA, in file "AL2.0", under the same directory
|
||||
as this file.
|
||||
------
|
||||
This product has a bundle guava, which is available under the ASL2 License.
|
||||
The source code of guava can be found at https://github.com/google/guava.
|
||||
|
||||
Copyright (C) 2007 The Guava authors
|
||||
|
||||
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.
|
||||
------
|
||||
This product has a bundle OpenMessaging, which is available under the ASL2 License.
|
||||
The source code of OpenMessaging can be found at https://github.com/openmessaging/openmessaging.
|
||||
|
||||
Copyright (C) 2017 The OpenMessaging authors.
|
||||
|
||||
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.
|
||||
|
36
base/Resources/rocketmq/NOTICE
Normal file
36
base/Resources/rocketmq/NOTICE
Normal file
@ -0,0 +1,36 @@
|
||||
Apache RocketMQ
|
||||
Copyright 2016-2022 The Apache Software Foundation
|
||||
|
||||
This product includes software developed at
|
||||
The Apache Software Foundation (http://www.apache.org/).
|
||||
|
||||
------
|
||||
This product has a bundle netty:
|
||||
The Netty Project
|
||||
=================
|
||||
|
||||
Please visit the Netty web site for more information:
|
||||
|
||||
* http://netty.io/
|
||||
|
||||
Copyright 2014 The Netty Project
|
||||
|
||||
The Netty Project 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.
|
||||
|
||||
Also, please refer to each LICENSE.<component>.txt file, which is located in
|
||||
the 'license' directory of the distribution file, for the license terms of the
|
||||
components that this product depends on.
|
||||
|
||||
------
|
||||
This product has a bundle commons-lang, which includes software from the Spring Framework,
|
||||
under the Apache License 2.0 (see: StringUtils.containsWhitespace())
|
250
base/Resources/rocketmq/README.md
Normal file
250
base/Resources/rocketmq/README.md
Normal file
@ -0,0 +1,250 @@
|
||||
## Apache RocketMQ
|
||||
|
||||
[![Build Status][maven-build-image]][maven-build-url]
|
||||
[![CodeCov][codecov-image]][codecov-url]
|
||||
[![Maven Central][maven-central-image]][maven-central-url]
|
||||
[![Release][release-image]][release-url]
|
||||
[![License][license-image]][license-url]
|
||||
[![Average Time to Resolve An Issue][percentage-of-issues-still-open-image]][percentage-of-issues-still-open-url]
|
||||
[![Percentage of Issues Still Open][average-time-to-resolve-an-issue-image]][average-time-to-resolve-an-issue-url]
|
||||
[![Twitter Follow][twitter-follow-image]][twitter-follow-url]
|
||||
|
||||
**[Apache RocketMQ](https://rocketmq.apache.org) is a distributed messaging and streaming platform with low latency, high performance and reliability, trillion-level capacity and flexible scalability.**
|
||||
|
||||
|
||||
It offers a variety of features:
|
||||
|
||||
* Messaging patterns including publish/subscribe, request/reply and streaming
|
||||
* Financial grade transactional message
|
||||
* Built-in fault tolerance and high availability configuration options base on [DLedger Controller](docs/en/controller/quick_start.md)
|
||||
* Built-in message tracing capability, also support opentracing
|
||||
* Versatile big-data and streaming ecosystem integration
|
||||
* Message retroactivity by time or offset
|
||||
* Reliable FIFO and strict ordered messaging in the same queue
|
||||
* Efficient pull and push consumption model
|
||||
* Million-level message accumulation capacity in a single queue
|
||||
* Multiple messaging protocols like gRPC, MQTT, JMS and OpenMessaging
|
||||
* Flexible distributed scale-out deployment architecture
|
||||
* Lightning-fast batch message exchange system
|
||||
* Various message filter mechanics such as SQL and Tag
|
||||
* Docker images for isolated testing and cloud isolated clusters
|
||||
* Feature-rich administrative dashboard for configuration, metrics and monitoring
|
||||
* Authentication and authorization
|
||||
* Free open source connectors, for both sources and sinks
|
||||
* Lightweight real-time computing
|
||||
----------
|
||||
|
||||
|
||||
## Quick Start
|
||||
|
||||
This paragraph guides you through steps of installing RocketMQ in different ways.
|
||||
For local development and testing, only one instance will be created for each component.
|
||||
|
||||
### Run RocketMQ locally
|
||||
|
||||
RocketMQ runs on all major operating systems and requires only a Java JDK version 8 or higher to be installed.
|
||||
To check, run `java -version`:
|
||||
```shell
|
||||
$ java -version
|
||||
java version "1.8.0_121"
|
||||
```
|
||||
|
||||
For Windows users, click [here](https://dist.apache.org/repos/dist/release/rocketmq/5.2.0/rocketmq-all-5.2.0-bin-release.zip) to download the 5.2.0 RocketMQ binary release,
|
||||
unpack it to your local disk, such as `D:\rocketmq`.
|
||||
For macOS and Linux users, execute following commands:
|
||||
|
||||
```shell
|
||||
# Download release from the Apache mirror
|
||||
$ wget https://dist.apache.org/repos/dist/release/rocketmq/5.2.0/rocketmq-all-5.2.0-bin-release.zip
|
||||
|
||||
# Unpack the release
|
||||
$ unzip rocketmq-all-5.2.0-bin-release.zip
|
||||
```
|
||||
|
||||
Prepare a terminal and change to the extracted `bin` directory:
|
||||
```shell
|
||||
$ cd rocketmq-all-5.2.0-bin-release/bin
|
||||
```
|
||||
|
||||
**1) Start NameServer**
|
||||
|
||||
NameServer will be listening at `0.0.0.0:9876`, make sure that the port is not used by others on the local machine, and then do as follows.
|
||||
|
||||
For macOS and Linux users:
|
||||
```shell
|
||||
### start Name Server
|
||||
$ nohup sh mqnamesrv &
|
||||
|
||||
### check whether Name Server is successfully started
|
||||
$ tail -f ~/logs/rocketmqlogs/namesrv.log
|
||||
The Name Server boot success...
|
||||
```
|
||||
|
||||
For Windows users, you need set environment variables first:
|
||||
- From the desktop, right click the Computer icon.
|
||||
- Choose Properties from the context menu.
|
||||
- Click the Advanced system settings link.
|
||||
- Click Environment Variables.
|
||||
- Add Environment `ROCKETMQ_HOME="D:\rocketmq"`.
|
||||
|
||||
Then change directory to rocketmq, type and run:
|
||||
```shell
|
||||
$ mqnamesrv.cmd
|
||||
The Name Server boot success...
|
||||
```
|
||||
|
||||
**2) Start Broker**
|
||||
|
||||
For macOS and Linux users:
|
||||
```shell
|
||||
### start Broker
|
||||
$ nohup sh bin/mqbroker -n localhost:9876 &
|
||||
|
||||
### check whether Broker is successfully started, eg: Broker's IP is 192.168.1.2, Broker's name is broker-a
|
||||
$ tail -f ~/logs/rocketmqlogs/broker.log
|
||||
The broker[broker-a, 192.169.1.2:10911] boot success...
|
||||
```
|
||||
|
||||
For Windows users:
|
||||
```shell
|
||||
$ mqbroker.cmd -n localhost:9876
|
||||
The broker[broker-a, 192.169.1.2:10911] boot success...
|
||||
```
|
||||
|
||||
### Run RocketMQ in Docker
|
||||
|
||||
You can run RocketMQ on your own machine within Docker containers,
|
||||
`host` network will be used to expose listening port in the container.
|
||||
|
||||
**1) Start NameServer**
|
||||
|
||||
```shell
|
||||
$ docker run -it --net=host apache/rocketmq ./mqnamesrv
|
||||
```
|
||||
|
||||
**2) Start Broker**
|
||||
|
||||
```shell
|
||||
$ docker run -it --net=host --mount source=/tmp/store,target=/home/rocketmq/store apache/rocketmq ./mqbroker -n localhost:9876
|
||||
```
|
||||
|
||||
### Run RocketMQ in Kubernetes
|
||||
|
||||
You can also run a RocketMQ cluster within a Kubernetes cluster using [RocketMQ Operator](https://github.com/apache/rocketmq-operator).
|
||||
Before your operations, make sure that `kubectl` and related kubeconfig file installed on your machine.
|
||||
|
||||
**1) Install CRDs**
|
||||
```shell
|
||||
### install CRDs
|
||||
$ git clone https://github.com/apache/rocketmq-operator
|
||||
$ cd rocketmq-operator && make deploy
|
||||
|
||||
### check whether CRDs is successfully installed
|
||||
$ kubectl get crd | grep rocketmq.apache.org
|
||||
brokers.rocketmq.apache.org 2022-05-12T09:23:18Z
|
||||
consoles.rocketmq.apache.org 2022-05-12T09:23:19Z
|
||||
nameservices.rocketmq.apache.org 2022-05-12T09:23:18Z
|
||||
topictransfers.rocketmq.apache.org 2022-05-12T09:23:19Z
|
||||
|
||||
### check whether operator is running
|
||||
$ kubectl get pods | grep rocketmq-operator
|
||||
rocketmq-operator-6f65c77c49-8hwmj 1/1 Running 0 93s
|
||||
```
|
||||
|
||||
**2) Create Cluster Instance**
|
||||
```shell
|
||||
### create RocketMQ cluster resource
|
||||
$ cd example && kubectl create -f rocketmq_v1alpha1_rocketmq_cluster.yaml
|
||||
|
||||
### check whether cluster resources is running
|
||||
$ kubectl get sts
|
||||
NAME READY AGE
|
||||
broker-0-master 1/1 107m
|
||||
broker-0-replica-1 1/1 107m
|
||||
name-service 1/1 107m
|
||||
```
|
||||
|
||||
---
|
||||
## Apache RocketMQ Community
|
||||
* [RocketMQ Streams](https://github.com/apache/rocketmq-streams): A lightweight stream computing engine based on Apache RocketMQ.
|
||||
* [RocketMQ Flink](https://github.com/apache/rocketmq-flink): The Apache RocketMQ connector of Apache Flink that supports source and sink connector in data stream and Table.
|
||||
* [RocketMQ APIs](https://github.com/apache/rocketmq-apis): RocketMQ protobuf protocol.
|
||||
* [RocketMQ Clients](https://github.com/apache/rocketmq-clients): gRPC/protobuf-based RocketMQ clients.
|
||||
* RocketMQ Remoting-based Clients
|
||||
- [RocketMQ Client CPP](https://github.com/apache/rocketmq-client-cpp)
|
||||
- [RocketMQ Client Go](https://github.com/apache/rocketmq-client-go)
|
||||
- [RocketMQ Client Python](https://github.com/apache/rocketmq-client-python)
|
||||
- [RocketMQ Client Nodejs](https://github.com/apache/rocketmq-client-nodejs)
|
||||
* [RocketMQ Spring](https://github.com/apache/rocketmq-spring): A project which helps developers quickly integrate Apache RocketMQ with Spring Boot.
|
||||
* [RocketMQ Exporter](https://github.com/apache/rocketmq-exporter): An Apache RocketMQ exporter for Prometheus.
|
||||
* [RocketMQ Operator](https://github.com/apache/rocketmq-operator): Providing a way to run an Apache RocketMQ cluster on Kubernetes.
|
||||
* [RocketMQ Docker](https://github.com/apache/rocketmq-docker): The Git repo of the Docker Image for Apache RocketMQ.
|
||||
* [RocketMQ Dashboard](https://github.com/apache/rocketmq-dashboard): Operation and maintenance console of Apache RocketMQ.
|
||||
* [RocketMQ Connect](https://github.com/apache/rocketmq-connect): A tool for scalably and reliably streaming data between Apache RocketMQ and other systems.
|
||||
* [RocketMQ MQTT](https://github.com/apache/rocketmq-mqtt): A new MQTT protocol architecture model, based on which Apache RocketMQ can better support messages from terminals such as IoT devices and Mobile APP.
|
||||
* [RocketMQ EventBridge](https://github.com/apache/rocketmq-eventbridge): EventBridge make it easier to build a event-driven application.
|
||||
* [RocketMQ Incubating Community Projects](https://github.com/apache/rocketmq-externals): Incubator community projects of Apache RocketMQ, including [logappender](https://github.com/apache/rocketmq-externals/tree/master/logappender), [rocketmq-ansible](https://github.com/apache/rocketmq-externals/tree/master/rocketmq-ansible), [rocketmq-beats-integration](https://github.com/apache/rocketmq-externals/tree/master/rocketmq-beats-integration), [rocketmq-cloudevents-binding](https://github.com/apache/rocketmq-externals/tree/master/rocketmq-cloudevents-binding), etc.
|
||||
* [RocketMQ Site](https://github.com/apache/rocketmq-site): The repository for Apache RocketMQ website.
|
||||
* [RocketMQ E2E](https://github.com/apache/rocketmq-e2e): A project for testing Apache RocketMQ, including end-to-end, performance, compatibility tests.
|
||||
|
||||
|
||||
----------
|
||||
## Learn it & Contact us
|
||||
* Mailing Lists: <https://rocketmq.apache.org/about/contact/>
|
||||
* Home: <https://rocketmq.apache.org>
|
||||
* Docs: <https://rocketmq.apache.org/docs/quick-start/>
|
||||
* Issues: <https://github.com/apache/rocketmq/issues>
|
||||
* Rips: <https://github.com/apache/rocketmq/wiki/RocketMQ-Improvement-Proposal>
|
||||
* Ask: <https://stackoverflow.com/questions/tagged/rocketmq>
|
||||
* Slack: <https://rocketmq-invite-automation.herokuapp.com/>
|
||||
|
||||
|
||||
----------
|
||||
|
||||
|
||||
|
||||
## Contributing
|
||||
We always welcome new contributions, whether for trivial cleanups, [big new features](https://github.com/apache/rocketmq/wiki/RocketMQ-Improvement-Proposal) or other material rewards, more details see [here](http://rocketmq.apache.org/docs/how-to-contribute/).
|
||||
|
||||
----------
|
||||
## License
|
||||
[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html) Copyright (C) Apache Software Foundation
|
||||
|
||||
|
||||
----------
|
||||
## Export Control Notice
|
||||
This distribution includes cryptographic software. The country in which you currently reside may have
|
||||
restrictions on the import, possession, use, and/or re-export to another country, of encryption software.
|
||||
BEFORE using any encryption software, please check your country's laws, regulations and policies concerning
|
||||
the import, possession, or use, and re-export of encryption software, to see if this is permitted. See
|
||||
<http://www.wassenaar.org/> for more information.
|
||||
|
||||
The U.S. Government Department of Commerce, Bureau of Industry and Security (BIS), has classified this
|
||||
software as Export Commodity Control Number (ECCN) 5D002.C.1, which includes information security software
|
||||
using or performing cryptographic functions with asymmetric algorithms. The form and manner of this Apache
|
||||
Software Foundation distribution makes it eligible for export under the License Exception ENC Technology
|
||||
Software Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Section 740.13) for
|
||||
both object code and source code.
|
||||
|
||||
The following provides more details on the included cryptographic software:
|
||||
|
||||
This software uses Apache Commons Crypto (https://commons.apache.org/proper/commons-crypto/) to
|
||||
support authentication, and encryption and decryption of data sent across the network between
|
||||
services.
|
||||
|
||||
[maven-build-image]: https://github.com/apache/rocketmq/actions/workflows/maven.yaml/badge.svg
|
||||
[maven-build-url]: https://github.com/apache/rocketmq/actions/workflows/maven.yaml
|
||||
[codecov-image]: https://codecov.io/gh/apache/rocketmq/branch/master/graph/badge.svg
|
||||
[codecov-url]: https://codecov.io/gh/apache/rocketmq
|
||||
[maven-central-image]: https://maven-badges.herokuapp.com/maven-central/org.apache.rocketmq/rocketmq-all/badge.svg
|
||||
[maven-central-url]: http://search.maven.org/#search%7Cga%7C1%7Corg.apache.rocketmq
|
||||
[release-image]: https://img.shields.io/badge/release-download-orange.svg
|
||||
[release-url]: https://www.apache.org/licenses/LICENSE-2.0.html
|
||||
[license-image]: https://img.shields.io/badge/license-Apache%202-4EB1BA.svg
|
||||
[license-url]: https://www.apache.org/licenses/LICENSE-2.0.html
|
||||
[average-time-to-resolve-an-issue-image]: http://isitmaintained.com/badge/resolution/apache/rocketmq.svg
|
||||
[average-time-to-resolve-an-issue-url]: http://isitmaintained.com/project/apache/rocketmq
|
||||
[percentage-of-issues-still-open-image]: http://isitmaintained.com/badge/open/apache/rocketmq.svg
|
||||
[percentage-of-issues-still-open-url]: http://isitmaintained.com/project/apache/rocketmq
|
||||
[twitter-follow-image]: https://img.shields.io/twitter/follow/ApacheRocketMQ?style=social
|
||||
[twitter-follow-url]: https://twitter.com/intent/follow?screen_name=ApacheRocketMQ
|
18
base/Resources/rocketmq/benchmark/batchproducer.sh
Normal file
18
base/Resources/rocketmq/benchmark/batchproducer.sh
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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.
|
||||
|
||||
sh ./runclass.sh org.apache.rocketmq.example.benchmark.BatchProducer $@ &
|
18
base/Resources/rocketmq/benchmark/consumer.sh
Normal file
18
base/Resources/rocketmq/benchmark/consumer.sh
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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.
|
||||
|
||||
sh ./runclass.sh org.apache.rocketmq.example.benchmark.Consumer $@ &
|
18
base/Resources/rocketmq/benchmark/producer.sh
Normal file
18
base/Resources/rocketmq/benchmark/producer.sh
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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.
|
||||
|
||||
sh ./runclass.sh -Dorg.apache.rocketmq.client.sendSmartMsg=true org.apache.rocketmq.example.benchmark.Producer $@ &
|
72
base/Resources/rocketmq/benchmark/runclass.sh
Normal file
72
base/Resources/rocketmq/benchmark/runclass.sh
Normal file
@ -0,0 +1,72 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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.
|
||||
|
||||
if [ $# -lt 1 ];
|
||||
then
|
||||
echo "USAGE: $0 classname opts"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
BASE_DIR=$(dirname $0)/..
|
||||
CLASSPATH=.:${BASE_DIR}/conf:${BASE_DIR}/lib/*:${CLASSPATH}
|
||||
|
||||
# The RAMDisk initializing size in MB on Darwin OS for gc-log
|
||||
DIR_SIZE_IN_MB=600
|
||||
|
||||
choose_gc_log_directory()
|
||||
{
|
||||
case "`uname`" in
|
||||
Darwin)
|
||||
if [ ! -d "/Volumes/RAMDisk" ]; then
|
||||
# create ram disk on Darwin systems as gc-log directory
|
||||
DEV=`hdiutil attach -nomount ram://$((2 * 1024 * DIR_SIZE_IN_MB))` > /dev/null
|
||||
diskutil eraseVolume HFS+ RAMDisk ${DEV} > /dev/null
|
||||
echo "Create RAMDisk /Volumes/RAMDisk for gc logging on Darwin OS."
|
||||
fi
|
||||
GC_LOG_DIR="/Volumes/RAMDisk"
|
||||
;;
|
||||
*)
|
||||
# check if /dev/shm exists on other systems
|
||||
if [ -d "/dev/shm" ]; then
|
||||
GC_LOG_DIR="/dev/shm"
|
||||
else
|
||||
GC_LOG_DIR=${BASE_DIR}
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
choose_gc_log_directory
|
||||
|
||||
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:${GC_LOG_DIR}/rmq_run_class_gc_%p_%t.log -XX:+PrintGCDetails"
|
||||
JAVA_OPT="${JAVA_OPT} -XX:-OmitStackTraceInFastThrow"
|
||||
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}"
|
||||
JAVA_OPT="${JAVA_OPT} -Djava.ext.dirs=${JAVA_HOME}/jre/lib/ext:${BASE_DIR}/lib:${JAVA_HOME}/lib/ext"
|
||||
JAVA_OPT="${JAVA_OPT} -Drmq.logback.configurationFile=${BASE_DIR}/conf/rmq.client.logback.xml"
|
||||
|
||||
if [ -z "$JAVA_HOME" ]; then
|
||||
JAVA_HOME=/usr/java
|
||||
fi
|
||||
|
||||
JAVA="$JAVA_HOME/bin/java"
|
||||
|
||||
$JAVA ${JAVA_OPT} $@
|
77
base/Resources/rocketmq/benchmark/shutdown.sh
Normal file
77
base/Resources/rocketmq/benchmark/shutdown.sh
Normal file
@ -0,0 +1,77 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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.
|
||||
|
||||
case $1 in
|
||||
producer)
|
||||
|
||||
pid=`ps ax | grep -i 'org.apache.rocketmq.example.benchmark.Producer' |grep java | grep -v grep | awk '{print $1}'`
|
||||
if [ -z "$pid" ] ; then
|
||||
echo "No benchmark producer running."
|
||||
exit -1;
|
||||
fi
|
||||
|
||||
echo "The benchmark producer(${pid}) is running..."
|
||||
|
||||
kill ${pid}
|
||||
|
||||
echo "Send shutdown request to benchmark producer(${pid}) OK"
|
||||
;;
|
||||
consumer)
|
||||
|
||||
pid=`ps ax | grep -i 'org.apache.rocketmq.example.benchmark.Consumer' |grep java | grep -v grep | awk '{print $1}'`
|
||||
if [ -z "$pid" ] ; then
|
||||
echo "No benchmark consumer running."
|
||||
exit -1;
|
||||
fi
|
||||
|
||||
echo "The benchmark consumer(${pid}) is running..."
|
||||
|
||||
kill ${pid}
|
||||
|
||||
echo "Send shutdown request to benchmark consumer(${pid}) OK"
|
||||
;;
|
||||
tproducer)
|
||||
|
||||
pid=`ps ax | grep -i 'org.apache.rocketmq.example.benchmark.TransactionProducer' |grep java | grep -v grep | awk '{print $1}'`
|
||||
if [ -z "$pid" ] ; then
|
||||
echo "No benchmark transaction producer running."
|
||||
exit -1;
|
||||
fi
|
||||
|
||||
echo "The benchmark transaction producer(${pid}) is running..."
|
||||
|
||||
kill ${pid}
|
||||
|
||||
echo "Send shutdown request to benchmark transaction producer(${pid}) OK"
|
||||
;;
|
||||
bproducer)
|
||||
|
||||
pid=`ps ax | grep -i 'org.apache.rocketmq.example.benchmark.BatchProducer' |grep java | grep -v grep | awk '{print $1}'`
|
||||
if [ -z "$pid" ] ; then
|
||||
echo "No benchmark batch producer running."
|
||||
exit -1;
|
||||
fi
|
||||
|
||||
echo "The benchmark batch producer(${pid}) is running..."
|
||||
|
||||
kill ${pid}
|
||||
|
||||
echo "Send shutdown request to benchmark batch producer(${pid}) OK"
|
||||
;;
|
||||
*)
|
||||
echo "Usage: shutdown producer | consumer | tproducer | bproducer"
|
||||
esac
|
18
base/Resources/rocketmq/benchmark/tproducer.sh
Normal file
18
base/Resources/rocketmq/benchmark/tproducer.sh
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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.
|
||||
|
||||
sh ./runclass.sh org.apache.rocketmq.example.benchmark.TransactionProducer $@ &
|
29
base/Resources/rocketmq/bin/README.md
Normal file
29
base/Resources/rocketmq/bin/README.md
Normal file
@ -0,0 +1,29 @@
|
||||
### Operating system tuning
|
||||
Before deploying broker servers, it's highly recommended to run **os.sh**, which is to optimize your operating system for better performance.
|
||||
|
||||
## Notice
|
||||
### os.sh should be executed only once with root permission.
|
||||
### os.sh parameter settings are for reference purpose only. You can tune them according to your target host configurations.
|
||||
|
||||
|
||||
### Start broker
|
||||
* Unix platform
|
||||
|
||||
`nohup sh mqbroker &`
|
||||
|
||||
### Shutdown broker
|
||||
sh mqshutdown broker
|
||||
|
||||
### Start Nameserver
|
||||
* Unix platform
|
||||
|
||||
`nohup sh mqnamesrv &`
|
||||
|
||||
### Shutdown Nameserver
|
||||
sh mqshutdown namesrv
|
||||
|
||||
### Update or create Topic
|
||||
sh mqadmin updateTopic -b 127.0.0.1:10911 -t TopicA
|
||||
|
||||
### Update or create subscription group
|
||||
sh mqadmin updateSubGroup -b 127.0.0.1:10911 -g SubGroupA
|
42
base/Resources/rocketmq/bin/cachedog.sh
Normal file
42
base/Resources/rocketmq/bin/cachedog.sh
Normal file
@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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.
|
||||
|
||||
export PATH=$PATH:/sbin
|
||||
|
||||
while true; do
|
||||
nr_free_pages=`fgrep -A 10 Normal /proc/zoneinfo |grep nr_free_pages |awk -F ' ' '{print $2}'`
|
||||
high=`fgrep -A 10 Normal /proc/zoneinfo |grep high |awk -F ' ' '{print $2}'`
|
||||
|
||||
NOW_DATE=`date +%D`
|
||||
NOW_TIME=`date +%T`
|
||||
|
||||
if [ ${nr_free_pages} -le ${high} ]; then
|
||||
sysctl -w vm.drop_caches=3
|
||||
nr_free_pages_new=`fgrep -A 10 Normal /proc/zoneinfo |grep nr_free_pages |awk -F ' ' '{print $2}'`
|
||||
|
||||
printf "%s %s [CLEAN] nr_free_pages < high, clean cache. nr_free_pages=%s ====> nr_free_pages=%s\n" "${NOW_DATE}" "${NOW_TIME}" ${nr_free_pages} ${nr_free_pages_new}
|
||||
|
||||
sysctl -w vm.drop_caches=1
|
||||
echo
|
||||
echo
|
||||
echo
|
||||
else
|
||||
printf "%s %s [NOTHING] nr_free_pages=%s high=%s\n" "${NOW_DATE}" "${NOW_TIME}" ${nr_free_pages} ${high}
|
||||
fi
|
||||
|
||||
sleep 1
|
||||
done
|
20
base/Resources/rocketmq/bin/cleancache.sh
Normal file
20
base/Resources/rocketmq/bin/cleancache.sh
Normal file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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.
|
||||
|
||||
export PATH=$PATH:/sbin
|
||||
|
||||
sysctl -w vm.drop_caches=3
|
40
base/Resources/rocketmq/bin/cleancache.v1.sh
Normal file
40
base/Resources/rocketmq/bin/cleancache.v1.sh
Normal file
@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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.
|
||||
|
||||
export PATH=$PATH:/sbin
|
||||
|
||||
#
|
||||
# GB
|
||||
#
|
||||
function changeFreeCache()
|
||||
{
|
||||
EXTRA=$1
|
||||
MIN=$2
|
||||
sysctl -w vm.extra_free_kbytes=${EXTRA}000000
|
||||
sysctl -w vm.min_free_kbytes=${MIN}000000
|
||||
}
|
||||
|
||||
|
||||
if [ $# -ne 1 ]
|
||||
then
|
||||
echo "Usage: $0 freecache(GB)"
|
||||
echo "Example: $0 15"
|
||||
exit
|
||||
fi
|
||||
|
||||
changeFreeCache 3 $1
|
||||
changeFreeCache 3 1
|
@ -0,0 +1,36 @@
|
||||
@echo off
|
||||
rem Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
rem contributor license agreements. See the NOTICE file distributed with
|
||||
rem this work for additional information regarding copyright ownership.
|
||||
rem The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
rem (the "License"); you may not use this file except in compliance with
|
||||
rem the License. You may obtain a copy of the License at
|
||||
rem
|
||||
rem http://www.apache.org/licenses/LICENSE-2.0
|
||||
rem
|
||||
rem Unless required by applicable law or agreed to in writing, software
|
||||
rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
rem See the License for the specific language governing permissions and
|
||||
rem limitations under the License.
|
||||
|
||||
set ROCKETMQ_HOME=%cd%
|
||||
if not exist "%ROCKETMQ_HOME%\conf\controller\cluster-3n-independent\controller-n0.conf" echo Make sure the %ROCKETMQ_HOME%\conf\controller\cluster-3n-independent\controller-n0.conf exists & EXIT /B 1
|
||||
if not exist "%ROCKETMQ_HOME%\conf\controller\cluster-3n-independent\controller-n1.conf" echo Make sure the %ROCKETMQ_HOME%\conf\controller\cluster-3n-independent\controller-n1.conf exists & EXIT /B 1
|
||||
if not exist "%ROCKETMQ_HOME%\conf\controller\cluster-3n-independent\controller-n2.conf" echo Make sure the %ROCKETMQ_HOME%\conf\controller\cluster-3n-independent\controller-n2.conf exists & EXIT /B 1
|
||||
|
||||
set "JAVA_OPT_EXT= -server -Xms512m -Xmx512m"
|
||||
start call "%ROCKETMQ_HOME%\bin\runserver.cmd" org.apache.rocketmq.controller.ControllerStartup -c %ROCKETMQ_HOME%\conf\controller\cluster-3n-independent\controller-n0.conf
|
||||
IF %ERRORLEVEL% EQU 0 (
|
||||
ECHO "Controller start OK"
|
||||
)
|
||||
timeout /T 3 /NOBREAK
|
||||
start call "%ROCKETMQ_HOME%\bin\runserver.cmd" org.apache.rocketmq.controller.ControllerStartup -c %ROCKETMQ_HOME%\conf\controller\cluster-3n-independent\controller-n1.conf
|
||||
IF %ERRORLEVEL% EQU 0 (
|
||||
ECHO "Controller start OK"
|
||||
)
|
||||
timeout /T 3 /NOBREAK
|
||||
start call "%ROCKETMQ_HOME%\bin\runserver.cmd" org.apache.rocketmq.controller.ControllerStartup -c %ROCKETMQ_HOME%\conf\controller\cluster-3n-independent\controller-n2.conf
|
||||
IF %ERRORLEVEL% EQU 0 (
|
||||
ECHO "Controller start OK"
|
||||
)
|
@ -0,0 +1,76 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# 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.
|
||||
|
||||
## Revise the base dir
|
||||
CURRENT_DIR="$(cd "$(dirname "$0")"; pwd)"
|
||||
RMQ_DIR=$CURRENT_DIR/../..
|
||||
cd $RMQ_DIR
|
||||
|
||||
startController() {
|
||||
export JAVA_OPT_EXT=" -Xms512m -Xmx512m "
|
||||
conf_name=$1
|
||||
nohup bin/mqcontroller -c $conf_name &
|
||||
}
|
||||
|
||||
stopController() {
|
||||
PIDS=$(ps -ef|grep java|grep ControllerStartup|grep -v grep|awk '{print $2}')
|
||||
if [ ! -z "$PIDS" ]; then
|
||||
kill -s TERM $PIDS
|
||||
fi
|
||||
}
|
||||
|
||||
stopAll() {
|
||||
stopController
|
||||
}
|
||||
|
||||
startAll() {
|
||||
startController ./conf/controller/cluster-3n-independent/controller-n0.conf
|
||||
startController ./conf/controller/cluster-3n-independent/controller-n1.conf
|
||||
startController ./conf/controller/cluster-3n-independent/controller-n2.conf
|
||||
}
|
||||
|
||||
checkConf() {
|
||||
if [ ! -f ./conf/controller/cluster-3n-independent/controller-n0.conf -o ! -f ./conf/controller/cluster-3n-independent/controller-n1.conf -o ! -f ./conf/controller/cluster-3n-independent/controller-n2.conf ]; then
|
||||
echo "Make sure the ./conf/controller/cluster-3n-independent/controller-n0.conf, ./conf/controller/cluster-3n-independent/controller-n1.conf, ./conf/controller/cluster-3n-independent/controller-n2.conf exists"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
## Main
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "Usage: sh $0 start|stop"
|
||||
exit 1
|
||||
fi
|
||||
action=$1
|
||||
checkConf
|
||||
case $action in
|
||||
"start")
|
||||
startAll
|
||||
exit
|
||||
;;
|
||||
"stop")
|
||||
stopAll
|
||||
exit
|
||||
;;
|
||||
*)
|
||||
echo "Usage: sh $0 start|stop"
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
|
@ -0,0 +1,36 @@
|
||||
@echo off
|
||||
rem Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
rem contributor license agreements. See the NOTICE file distributed with
|
||||
rem this work for additional information regarding copyright ownership.
|
||||
rem The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
rem (the "License"); you may not use this file except in compliance with
|
||||
rem the License. You may obtain a copy of the License at
|
||||
rem
|
||||
rem http://www.apache.org/licenses/LICENSE-2.0
|
||||
rem
|
||||
rem Unless required by applicable law or agreed to in writing, software
|
||||
rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
rem See the License for the specific language governing permissions and
|
||||
rem limitations under the License.
|
||||
|
||||
set ROCKETMQ_HOME=%cd%
|
||||
if not exist "%ROCKETMQ_HOME%\conf\controller\cluster-3n-namesrv-plugin\namesrv-n0.conf" echo Make sure the %ROCKETMQ_HOME%\conf\controller\cluster-3n-independent\controller-n0.conf exists & EXIT /B 1
|
||||
if not exist "%ROCKETMQ_HOME%\conf\controller\cluster-3n-namesrv-plugin\namesrv-n1.conf" echo Make sure the %ROCKETMQ_HOME%\conf\controller\cluster-3n-independent\controller-n1.conf exists & EXIT /B 1
|
||||
if not exist "%ROCKETMQ_HOME%\conf\controller\cluster-3n-namesrv-plugin\namesrv-n2.conf" echo Make sure the %ROCKETMQ_HOME%\conf\controller\cluster-3n-independent\controller-n2.conf exists & EXIT /B 1
|
||||
|
||||
set "JAVA_OPT_EXT= -server -Xms512m -Xmx512m"
|
||||
start call "%ROCKETMQ_HOME%\bin\runserver.cmd" org.apache.rocketmq.namesrv.NamesrvStartup -c %ROCKETMQ_HOME%\conf\controller\cluster-3n-namesrv-plugin\namesrv-n0.conf
|
||||
IF %ERRORLEVEL% EQU 0 (
|
||||
ECHO "Controller start OK"
|
||||
)
|
||||
timeout /T 3 /NOBREAK
|
||||
start call "%ROCKETMQ_HOME%\bin\runserver.cmd" org.apache.rocketmq.namesrv.NamesrvStartup -c %ROCKETMQ_HOME%\conf\controller\cluster-3n-namesrv-plugin\namesrv-n1.conf
|
||||
IF %ERRORLEVEL% EQU 0 (
|
||||
ECHO "Controller start OK"
|
||||
)
|
||||
timeout /T 3 /NOBREAK
|
||||
start call "%ROCKETMQ_HOME%\bin\runserver.cmd" org.apache.rocketmq.namesrv.NamesrvStartup -c %ROCKETMQ_HOME%\conf\controller\cluster-3n-namesrv-plugin\namesrv-n2.conf
|
||||
IF %ERRORLEVEL% EQU 0 (
|
||||
ECHO "Controller start OK"
|
||||
)
|
@ -0,0 +1,76 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# 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.
|
||||
|
||||
## Revise the base dir
|
||||
CURRENT_DIR="$(cd "$(dirname "$0")"; pwd)"
|
||||
RMQ_DIR=$CURRENT_DIR/../..
|
||||
cd $RMQ_DIR
|
||||
|
||||
startNameserver() {
|
||||
export JAVA_OPT_EXT=" -Xms512m -Xmx512m "
|
||||
conf_name=$1
|
||||
nohup bin/mqnamesrv -c $conf_name &
|
||||
}
|
||||
|
||||
stopNameserver() {
|
||||
PIDS=$(ps -ef|grep java|grep NamesrvStartup|grep -v grep|awk '{print $2}')
|
||||
if [ ! -z "$PIDS" ]; then
|
||||
kill -s TERM $PIDS
|
||||
fi
|
||||
}
|
||||
|
||||
stopAll() {
|
||||
stopNameserver
|
||||
}
|
||||
|
||||
startAll() {
|
||||
startNameserver ./conf/controller/cluster-3n-namesrv-plugin/namesrv-n0.conf
|
||||
startNameserver ./conf/controller/cluster-3n-namesrv-plugin/namesrv-n1.conf
|
||||
startNameserver ./conf/controller/cluster-3n-namesrv-plugin/namesrv-n2.conf
|
||||
}
|
||||
|
||||
checkConf() {
|
||||
if [ ! -f ./conf/controller/cluster-3n-namesrv-plugin/namesrv-n0.conf -o ! -f ./conf/controller/cluster-3n-namesrv-plugin/namesrv-n1.conf -o ! -f ./conf/controller/cluster-3n-namesrv-plugin/namesrv-n2.conf ]; then
|
||||
echo "Make sure the ./conf/controller/cluster-3n-namesrv-plugin/namesrv-n0.conf, ./conf/controller/cluster-3n-namesrv-plugin/namesrv-n1.conf, ./conf/controller/cluster-3n-namesrv-plugin/namesrv-n2.conf exists"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
## Main
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "Usage: sh $0 start|stop"
|
||||
exit 1
|
||||
fi
|
||||
action=$1
|
||||
checkConf
|
||||
case $action in
|
||||
"start")
|
||||
startAll
|
||||
exit
|
||||
;;
|
||||
"stop")
|
||||
stopAll
|
||||
exit
|
||||
;;
|
||||
*)
|
||||
echo "Usage: sh $0 start|stop"
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
|
37
base/Resources/rocketmq/bin/controller/fast-try.cmd
Normal file
37
base/Resources/rocketmq/bin/controller/fast-try.cmd
Normal file
@ -0,0 +1,37 @@
|
||||
@echo off
|
||||
rem Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
rem contributor license agreements. See the NOTICE file distributed with
|
||||
rem this work for additional information regarding copyright ownership.
|
||||
rem The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
rem (the "License"); you may not use this file except in compliance with
|
||||
rem the License. You may obtain a copy of the License at
|
||||
rem
|
||||
rem http://www.apache.org/licenses/LICENSE-2.0
|
||||
rem
|
||||
rem Unless required by applicable law or agreed to in writing, software
|
||||
rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
rem See the License for the specific language governing permissions and
|
||||
rem limitations under the License.
|
||||
|
||||
set ROCKETMQ_HOME=%cd%
|
||||
if not exist "%ROCKETMQ_HOME%\conf\controller\quick-start\namesrv.conf" echo Make sure the %ROCKETMQ_HOME%\conf\controller\quick-start\namesrv.conf exists & EXIT /B 1
|
||||
if not exist "%ROCKETMQ_HOME%\conf\controller\quick-start\broker-n0.conf" echo Make sure the %ROCKETMQ_HOME%\conf\controller\quick-start\broker-n0.conf exists & EXIT /B 1
|
||||
if not exist "%ROCKETMQ_HOME%\conf\controller\quick-start\broker-n1.conf" echo Make sure the %ROCKETMQ_HOME%\conf\controller\quick-start\broker-n1.conf exists & EXIT /B 1
|
||||
|
||||
set "JAVA_OPT_EXT= -server -Xms512m -Xmx512m"
|
||||
start call "%ROCKETMQ_HOME%\bin\runserver.cmd" org.apache.rocketmq.namesrv.NamesrvStartup -c %ROCKETMQ_HOME%\conf\controller\quick-start\namesrv.conf
|
||||
IF %ERRORLEVEL% EQU 0 (
|
||||
ECHO "Namesrv start OK"
|
||||
)
|
||||
timeout /T 3 /NOBREAK
|
||||
|
||||
set "JAVA_OPT_EXT= -server -Xms1g -Xmx1g"
|
||||
start call "%ROCKETMQ_HOME%\bin\runbroker.cmd" org.apache.rocketmq.broker.BrokerStartup -c %ROCKETMQ_HOME%\conf\controller\quick-start\broker-n0.conf
|
||||
timeout /T 1 /NOBREAK
|
||||
start call "%ROCKETMQ_HOME%\bin\runbroker.cmd" org.apache.rocketmq.broker.BrokerStartup -c %ROCKETMQ_HOME%\conf\controller\quick-start\broker-n1.conf
|
||||
timeout /T 1 /NOBREAK
|
||||
|
||||
IF %ERRORLEVEL% EQU 0 (
|
||||
ECHO "Broker starts OK"
|
||||
)
|
101
base/Resources/rocketmq/bin/controller/fast-try.sh
Normal file
101
base/Resources/rocketmq/bin/controller/fast-try.sh
Normal file
@ -0,0 +1,101 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# 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.
|
||||
|
||||
## Revise the base dir
|
||||
CURRENT_DIR="$(cd "$(dirname "$0")"; pwd)"
|
||||
RMQ_DIR=$CURRENT_DIR/../..
|
||||
cd $RMQ_DIR
|
||||
|
||||
startNameserver() {
|
||||
export JAVA_OPT_EXT=" -Xms512m -Xmx512m "
|
||||
conf_name=$1
|
||||
nohup bin/mqnamesrv -c $conf_name &
|
||||
}
|
||||
|
||||
startBroker() {
|
||||
export JAVA_OPT_EXT=" -Xms1g -Xmx1g "
|
||||
conf_name=$1
|
||||
nohup bin/mqbroker -c $conf_name &
|
||||
}
|
||||
|
||||
stopNameserver() {
|
||||
PIDS=$(ps -ef|grep java|grep NamesrvStartup|grep -v grep|awk '{print $2}')
|
||||
if [ ! -z "$PIDS" ]; then
|
||||
kill -s TERM $PIDS
|
||||
fi
|
||||
}
|
||||
|
||||
stopBroker() {
|
||||
conf_name=$1
|
||||
PIDS=$(ps -ef|grep java|grep BrokerStartup|grep $conf_name|grep -v grep|awk '{print $2}')
|
||||
i=1
|
||||
while [ ! -z "$PIDS" -a $i -lt 5 ]
|
||||
do
|
||||
echo "Waiting to kill ..."
|
||||
kill -s TERM $PIDS
|
||||
i=`expr $i + 1`
|
||||
sleep 2
|
||||
PIDS=$(ps -ef|grep java|grep BrokerStartup|grep $conf_name|grep -v grep|awk '{print $2}')
|
||||
done
|
||||
PIDS=$(ps -ef|grep java|grep BrokerStartup|grep $conf_name|grep -v grep|awk '{print $2}')
|
||||
if [ ! -z "$PIDS" ]; then
|
||||
kill -9 $PIDS
|
||||
fi
|
||||
}
|
||||
|
||||
stopAll() {
|
||||
ps -ef|grep java|grep BrokerStartup|grep -v grep|awk '{print $2}'|xargs kill
|
||||
stopNameserver
|
||||
stopBroker ./conf/controller/quick-start/broker-n0.conf
|
||||
stopBroker ./conf/controller/quick-start/broker-n1.conf
|
||||
}
|
||||
|
||||
startAll() {
|
||||
startNameserver ./conf/controller/quick-start/namesrv.conf
|
||||
startBroker ./conf/controller/quick-start/broker-n0.conf
|
||||
startBroker ./conf/controller/quick-start/broker-n1.conf
|
||||
}
|
||||
|
||||
checkConf() {
|
||||
if [ ! -f ./conf/controller/quick-start/broker-n0.conf -o ! -f ./conf/controller/quick-start/broker-n1.conf -o ! -f ./conf/controller/quick-start/namesrv.conf ]; then
|
||||
echo "Make sure the ./conf/controller/quick-start/broker-n0.conf, ./conf/controller/quick-start/broker-n1.conf, ./conf/controller/quick-start/namesrv.conf exists"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
## Main
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "Usage: sh $0 start|stop"
|
||||
exit 1
|
||||
fi
|
||||
action=$1
|
||||
checkConf
|
||||
case $action in
|
||||
"start")
|
||||
startAll
|
||||
exit
|
||||
;;
|
||||
"stop")
|
||||
stopAll
|
||||
;;
|
||||
*)
|
||||
echo "Usage: sh $0 start|stop"
|
||||
;;
|
||||
esac
|
||||
|
102
base/Resources/rocketmq/bin/dledger/fast-try.sh
Normal file
102
base/Resources/rocketmq/bin/dledger/fast-try.sh
Normal file
@ -0,0 +1,102 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# 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.
|
||||
|
||||
## Revise the base dir
|
||||
CURRENT_DIR="$(cd "$(dirname "$0")"; pwd)"
|
||||
RMQ_DIR=$CURRENT_DIR/../..
|
||||
cd $RMQ_DIR
|
||||
|
||||
startNameserver() {
|
||||
export JAVA_OPT_EXT=" -Xms512m -Xmx512m "
|
||||
nohup bin/mqnamesrv &
|
||||
}
|
||||
|
||||
startBroker() {
|
||||
export JAVA_OPT_EXT=" -Xms1g -Xmx1g "
|
||||
conf_name=$1
|
||||
nohup bin/mqbroker -c $conf_name &
|
||||
}
|
||||
|
||||
stopNameserver() {
|
||||
PIDS=$(ps -ef|grep java|grep NamesrvStartup|grep -v grep|awk '{print $2}')
|
||||
if [ ! -z "$PIDS" ]; then
|
||||
kill -s TERM $PIDS
|
||||
fi
|
||||
}
|
||||
|
||||
stopBroker() {
|
||||
conf_name=$1
|
||||
PIDS=$(ps -ef|grep java|grep BrokerStartup|grep $conf_name|grep -v grep|awk '{print $2}')
|
||||
i=1
|
||||
while [ ! -z "$PIDS" -a $i -lt 5 ]
|
||||
do
|
||||
echo "Waiting to kill ..."
|
||||
kill -s TERM $PIDS
|
||||
i=`expr $i + 1`
|
||||
sleep 2
|
||||
PIDS=$(ps -ef|grep java|grep BrokerStartup|grep $conf_name|grep -v grep|awk '{print $2}')
|
||||
done
|
||||
PIDS=$(ps -ef|grep java|grep BrokerStartup|grep $conf_name|grep -v grep|awk '{print $2}')
|
||||
if [ ! -z "$PIDS" ]; then
|
||||
kill -9 $PIDS
|
||||
fi
|
||||
}
|
||||
|
||||
stopAll() {
|
||||
ps -ef|grep java|grep BrokerStartup|grep -v grep|awk '{print $2}'|xargs kill
|
||||
stopNameserver
|
||||
stopBroker ./conf/dledger/broker-n0.conf
|
||||
stopBroker ./conf/dledger/broker-n1.conf
|
||||
stopBroker ./conf/dledger/broker-n2.conf
|
||||
}
|
||||
|
||||
startAll() {
|
||||
startNameserver
|
||||
startBroker ./conf/dledger/broker-n0.conf
|
||||
startBroker ./conf/dledger/broker-n1.conf
|
||||
startBroker ./conf/dledger/broker-n2.conf
|
||||
}
|
||||
|
||||
checkConf() {
|
||||
if [ ! -f ./conf/dledger/broker-n0.conf -o ! -f ./conf/dledger/broker-n1.conf -o ! -f ./conf/dledger/broker-n2.conf ]; then
|
||||
echo "Make sure the ./conf/dledger/broker-n0.conf, ./conf/dledger/broker-n1.conf, ./conf/dledger/broker-n2.conf exists"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
## Main
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "Usage: sh $0 start|stop"
|
||||
exit 1
|
||||
fi
|
||||
action=$1
|
||||
checkConf
|
||||
case $action in
|
||||
"start")
|
||||
startAll
|
||||
exit
|
||||
;;
|
||||
"stop")
|
||||
stopAll
|
||||
;;
|
||||
*)
|
||||
echo "Usage: sh $0 start|stop"
|
||||
;;
|
||||
esac
|
||||
|
89
base/Resources/rocketmq/bin/export.sh
Normal file
89
base/Resources/rocketmq/bin/export.sh
Normal file
@ -0,0 +1,89 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 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.
|
||||
|
||||
if [ -z "$ROCKETMQ_HOME" ]; then
|
||||
## resolve links - $0 may be a link to maven's home
|
||||
PRG="$0"
|
||||
|
||||
# need this for relative symlinks
|
||||
while [ -h "$PRG" ]; do
|
||||
ls=$(ls -ld "$PRG")
|
||||
link=$(expr "$ls" : '.*-> \(.*\)$')
|
||||
if expr "$link" : '/.*' >/dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG="$(dirname "$PRG")/$link"
|
||||
fi
|
||||
done
|
||||
|
||||
saveddir=$(pwd)
|
||||
|
||||
ROCKETMQ_HOME=$(dirname "$PRG")/..
|
||||
|
||||
# make it fully qualified
|
||||
ROCKETMQ_HOME=$(cd "$ROCKETMQ_HOME" && pwd)
|
||||
|
||||
cd "$saveddir"
|
||||
fi
|
||||
|
||||
export ROCKETMQ_HOME
|
||||
|
||||
namesrvAddr=
|
||||
while [ -z "${namesrvAddr}" ]; do
|
||||
read -p "Enter name server address list:" namesrvAddr
|
||||
done
|
||||
|
||||
clusterName=
|
||||
while [ -z "${clusterName}" ]; do
|
||||
read -p "Choose a cluster to export:" clusterName
|
||||
done
|
||||
|
||||
read -p "Enter file path to export [default /tmp/rocketmq/export]:" filePath
|
||||
if [ -z "${filePath}" ]; then
|
||||
filePath="/tmp/rocketmq/config"
|
||||
fi
|
||||
|
||||
if [[ -e ${filePath} ]]; then
|
||||
rm -rf ${filePath}
|
||||
fi
|
||||
|
||||
sh ${ROCKETMQ_HOME}/bin/mqadmin exportMetrics -c ${clusterName} -n ${namesrvAddr} -f ${filePath}
|
||||
sh ${ROCKETMQ_HOME}/bin/mqadmin exportConfigs -c ${clusterName} -n ${namesrvAddr} -f ${filePath}
|
||||
sh ${ROCKETMQ_HOME}/bin/mqadmin exportMetadata -c ${clusterName} -n ${namesrvAddr} -f ${filePath}
|
||||
|
||||
cd ${filePath} || exit
|
||||
|
||||
configs=$(cat ./configs.json)
|
||||
if [ -z "$configs" ]; then
|
||||
configs="{}"
|
||||
fi
|
||||
metadata=$(cat ./metadata.json)
|
||||
if [ -z "$metadata" ]; then
|
||||
metadata="{}"
|
||||
fi
|
||||
metrics=$(cat ./metrics.json)
|
||||
if [ -z "$metrics" ]; then
|
||||
metrics="{}"
|
||||
fi
|
||||
|
||||
echo "{
|
||||
\"configs\": ${configs},
|
||||
\"metadata\": ${metadata},
|
||||
\"metrics\": ${metrics}
|
||||
}" >rocketmq-metadata-export.json
|
||||
|
||||
echo -e "[INFO] The RocketMQ metadata has been exported to the file:${filePath}/rocketmq-metadata-export.json"
|
45
base/Resources/rocketmq/bin/mqadmin
Normal file
45
base/Resources/rocketmq/bin/mqadmin
Normal file
@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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.
|
||||
|
||||
if [ -z "$ROCKETMQ_HOME" ] ; then
|
||||
## resolve links - $0 may be a link to maven's home
|
||||
PRG="$0"
|
||||
|
||||
# need this for relative symlinks
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG="`dirname "$PRG"`/$link"
|
||||
fi
|
||||
done
|
||||
|
||||
saveddir=`pwd`
|
||||
|
||||
ROCKETMQ_HOME=`dirname "$PRG"`/..
|
||||
|
||||
# make it fully qualified
|
||||
ROCKETMQ_HOME=`cd "$ROCKETMQ_HOME" && pwd`
|
||||
|
||||
cd "$saveddir"
|
||||
fi
|
||||
|
||||
export ROCKETMQ_HOME
|
||||
|
||||
sh ${ROCKETMQ_HOME}/bin/tools.sh -Drmq.logback.configurationFile=$ROCKETMQ_HOME/conf/rmq.tools.logback.xml org.apache.rocketmq.tools.command.MQAdminStartup "$@"
|
18
base/Resources/rocketmq/bin/mqadmin.cmd
Normal file
18
base/Resources/rocketmq/bin/mqadmin.cmd
Normal file
@ -0,0 +1,18 @@
|
||||
@echo off
|
||||
rem Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
rem contributor license agreements. See the NOTICE file distributed with
|
||||
rem this work for additional information regarding copyright ownership.
|
||||
rem The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
rem (the "License"); you may not use this file except in compliance with
|
||||
rem the License. You may obtain a copy of the License at
|
||||
rem
|
||||
rem http://www.apache.org/licenses/LICENSE-2.0
|
||||
rem
|
||||
rem Unless required by applicable law or agreed to in writing, software
|
||||
rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
rem See the License for the specific language governing permissions and
|
||||
rem limitations under the License.
|
||||
|
||||
if not exist "%ROCKETMQ_HOME%\bin\tools.cmd" echo Please set the ROCKETMQ_HOME variable in your environment! & EXIT /B 1
|
||||
call "%ROCKETMQ_HOME%\bin\tools.cmd" -Drmq.logback.configurationFile=%ROCKETMQ_HOME%\conf\rmq.tools.logback.xml org.apache.rocketmq.tools.command.MQAdminStartup %*
|
78
base/Resources/rocketmq/bin/mqbroker
Normal file
78
base/Resources/rocketmq/bin/mqbroker
Normal file
@ -0,0 +1,78 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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.
|
||||
|
||||
if [ -z "$ROCKETMQ_HOME" ] ; then
|
||||
## resolve links - $0 may be a link to maven's home
|
||||
PRG="$0"
|
||||
|
||||
# need this for relative symlinks
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG="`dirname "$PRG"`/$link"
|
||||
fi
|
||||
done
|
||||
|
||||
saveddir=`pwd`
|
||||
|
||||
ROCKETMQ_HOME=`dirname "$PRG"`/..
|
||||
|
||||
# make it fully qualified
|
||||
ROCKETMQ_HOME=`cd "$ROCKETMQ_HOME" && pwd`
|
||||
|
||||
cd "$saveddir"
|
||||
fi
|
||||
|
||||
export ROCKETMQ_HOME
|
||||
|
||||
other_args=" "
|
||||
enable_proxy=false
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case $1 in
|
||||
--enable-proxy)
|
||||
enable_proxy=true
|
||||
shift
|
||||
;;
|
||||
-c|--configFile)
|
||||
broker_config="$2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
other_args=${other_args}" "${1}
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$enable_proxy" = true ]; then
|
||||
args_for_proxy=$other_args" -pm local"
|
||||
if [ "$broker_config" != "" ]; then
|
||||
args_for_proxy=${args_for_proxy}" -bc "${broker_config}
|
||||
fi
|
||||
sh ${ROCKETMQ_HOME}/bin/runbroker.sh -Drmq.logback.configurationFile=$ROCKETMQ_HOME/conf/rmq.proxy.logback.xml org.apache.rocketmq.proxy.ProxyStartup ${args_for_proxy}
|
||||
else
|
||||
args_for_broker=$other_args
|
||||
if [ "$broker_config" != "" ]; then
|
||||
args_for_broker=${args_for_broker}" -c "${broker_config}
|
||||
fi
|
||||
sh ${ROCKETMQ_HOME}/bin/runbroker.sh -Drmq.logback.configurationFile=$ROCKETMQ_HOME/conf/rmq.broker.logback.xml org.apache.rocketmq.broker.BrokerStartup ${args_for_broker}
|
||||
fi
|
23
base/Resources/rocketmq/bin/mqbroker.cmd
Normal file
23
base/Resources/rocketmq/bin/mqbroker.cmd
Normal file
@ -0,0 +1,23 @@
|
||||
@echo off
|
||||
rem Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
rem contributor license agreements. See the NOTICE file distributed with
|
||||
rem this work for additional information regarding copyright ownership.
|
||||
rem The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
rem (the "License"); you may not use this file except in compliance with
|
||||
rem the License. You may obtain a copy of the License at
|
||||
rem
|
||||
rem http://www.apache.org/licenses/LICENSE-2.0
|
||||
rem
|
||||
rem Unless required by applicable law or agreed to in writing, software
|
||||
rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
rem See the License for the specific language governing permissions and
|
||||
rem limitations under the License.
|
||||
|
||||
if not exist "%ROCKETMQ_HOME%\bin\runbroker.cmd" echo Please set the ROCKETMQ_HOME variable in your environment! & EXIT /B 1
|
||||
|
||||
call "%ROCKETMQ_HOME%\bin\runbroker.cmd" -Drmq.logback.configurationFile=%ROCKETMQ_HOME%\conf\rmq.broker.logback.xml org.apache.rocketmq.broker.BrokerStartup %*
|
||||
|
||||
IF %ERRORLEVEL% EQU 0 (
|
||||
ECHO "Broker starts OK"
|
||||
)
|
47
base/Resources/rocketmq/bin/mqbroker.numanode0
Normal file
47
base/Resources/rocketmq/bin/mqbroker.numanode0
Normal file
@ -0,0 +1,47 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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.
|
||||
|
||||
if [ -z "$ROCKETMQ_HOME" ] ; then
|
||||
## resolve links - $0 may be a link to maven's home
|
||||
PRG="$0"
|
||||
|
||||
# need this for relative symlinks
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG="`dirname "$PRG"`/$link"
|
||||
fi
|
||||
done
|
||||
|
||||
saveddir=`pwd`
|
||||
|
||||
ROCKETMQ_HOME=`dirname "$PRG"`/..
|
||||
|
||||
# make it fully qualified
|
||||
ROCKETMQ_HOME=`cd "$ROCKETMQ_HOME" && pwd`
|
||||
|
||||
cd "$saveddir"
|
||||
fi
|
||||
|
||||
export ROCKETMQ_HOME
|
||||
|
||||
export RMQ_NUMA_NODE=0
|
||||
|
||||
sh ${ROCKETMQ_HOME}/bin/mqbroker $@
|
47
base/Resources/rocketmq/bin/mqbroker.numanode1
Normal file
47
base/Resources/rocketmq/bin/mqbroker.numanode1
Normal file
@ -0,0 +1,47 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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.
|
||||
|
||||
if [ -z "$ROCKETMQ_HOME" ] ; then
|
||||
## resolve links - $0 may be a link to maven's home
|
||||
PRG="$0"
|
||||
|
||||
# need this for relative symlinks
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG="`dirname "$PRG"`/$link"
|
||||
fi
|
||||
done
|
||||
|
||||
saveddir=`pwd`
|
||||
|
||||
ROCKETMQ_HOME=`dirname "$PRG"`/..
|
||||
|
||||
# make it fully qualified
|
||||
ROCKETMQ_HOME=`cd "$ROCKETMQ_HOME" && pwd`
|
||||
|
||||
cd "$saveddir"
|
||||
fi
|
||||
|
||||
export ROCKETMQ_HOME
|
||||
|
||||
export RMQ_NUMA_NODE=1
|
||||
|
||||
sh ${ROCKETMQ_HOME}/bin/mqbroker $@
|
47
base/Resources/rocketmq/bin/mqbroker.numanode2
Normal file
47
base/Resources/rocketmq/bin/mqbroker.numanode2
Normal file
@ -0,0 +1,47 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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.
|
||||
|
||||
if [ -z "$ROCKETMQ_HOME" ] ; then
|
||||
## resolve links - $0 may be a link to maven's home
|
||||
PRG="$0"
|
||||
|
||||
# need this for relative symlinks
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG="`dirname "$PRG"`/$link"
|
||||
fi
|
||||
done
|
||||
|
||||
saveddir=`pwd`
|
||||
|
||||
ROCKETMQ_HOME=`dirname "$PRG"`/..
|
||||
|
||||
# make it fully qualified
|
||||
ROCKETMQ_HOME=`cd "$ROCKETMQ_HOME" && pwd`
|
||||
|
||||
cd "$saveddir"
|
||||
fi
|
||||
|
||||
export ROCKETMQ_HOME
|
||||
|
||||
export RMQ_NUMA_NODE=2
|
||||
|
||||
sh ${ROCKETMQ_HOME}/bin/mqbroker $@
|
47
base/Resources/rocketmq/bin/mqbroker.numanode3
Normal file
47
base/Resources/rocketmq/bin/mqbroker.numanode3
Normal file
@ -0,0 +1,47 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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.
|
||||
|
||||
if [ -z "$ROCKETMQ_HOME" ] ; then
|
||||
## resolve links - $0 may be a link to maven's home
|
||||
PRG="$0"
|
||||
|
||||
# need this for relative symlinks
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG="`dirname "$PRG"`/$link"
|
||||
fi
|
||||
done
|
||||
|
||||
saveddir=`pwd`
|
||||
|
||||
ROCKETMQ_HOME=`dirname "$PRG"`/..
|
||||
|
||||
# make it fully qualified
|
||||
ROCKETMQ_HOME=`cd "$ROCKETMQ_HOME" && pwd`
|
||||
|
||||
cd "$saveddir"
|
||||
fi
|
||||
|
||||
export ROCKETMQ_HOME
|
||||
|
||||
export RMQ_NUMA_NODE=3
|
||||
|
||||
sh ${ROCKETMQ_HOME}/bin/mqbroker $@
|
45
base/Resources/rocketmq/bin/mqbrokercontainer
Normal file
45
base/Resources/rocketmq/bin/mqbrokercontainer
Normal file
@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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.
|
||||
|
||||
if [ -z "$ROCKETMQ_HOME" ] ; then
|
||||
## resolve links - $0 may be a link to maven's home
|
||||
PRG="$0"
|
||||
|
||||
# need this for relative symlinks
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG="`dirname "$PRG"`/$link"
|
||||
fi
|
||||
done
|
||||
|
||||
saveddir=`pwd`
|
||||
|
||||
ROCKETMQ_HOME=`dirname "$PRG"`/..
|
||||
|
||||
# make it fully qualified
|
||||
ROCKETMQ_HOME=`cd "$ROCKETMQ_HOME" && pwd`
|
||||
|
||||
cd "$saveddir"
|
||||
fi
|
||||
|
||||
export ROCKETMQ_HOME
|
||||
|
||||
sh ${ROCKETMQ_HOME}/bin/runbroker.sh org.apache.rocketmq.container.BrokerContainerStartup $@
|
45
base/Resources/rocketmq/bin/mqcontroller
Normal file
45
base/Resources/rocketmq/bin/mqcontroller
Normal file
@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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.
|
||||
|
||||
if [ -z "$ROCKETMQ_HOME" ] ; then
|
||||
## resolve links - $0 may be a link to maven's home
|
||||
PRG="$0"
|
||||
|
||||
# need this for relative symlinks
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG="`dirname "$PRG"`/$link"
|
||||
fi
|
||||
done
|
||||
|
||||
saveddir=`pwd`
|
||||
|
||||
ROCKETMQ_HOME=`dirname "$PRG"`/..
|
||||
|
||||
# make it fully qualified
|
||||
ROCKETMQ_HOME=`cd "$ROCKETMQ_HOME" && pwd`
|
||||
|
||||
cd "$saveddir"
|
||||
fi
|
||||
|
||||
export ROCKETMQ_HOME
|
||||
|
||||
sh ${ROCKETMQ_HOME}/bin/runserver.sh -Drmq.logback.configurationFile=$ROCKETMQ_HOME/conf/rmq.controller.logback.xml org.apache.rocketmq.controller.ControllerStartup $@
|
23
base/Resources/rocketmq/bin/mqcontroller.cmd
Normal file
23
base/Resources/rocketmq/bin/mqcontroller.cmd
Normal file
@ -0,0 +1,23 @@
|
||||
@echo off
|
||||
rem Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
rem contributor license agreements. See the NOTICE file distributed with
|
||||
rem this work for additional information regarding copyright ownership.
|
||||
rem The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
rem (the "License"); you may not use this file except in compliance with
|
||||
rem the License. You may obtain a copy of the License at
|
||||
rem
|
||||
rem http://www.apache.org/licenses/LICENSE-2.0
|
||||
rem
|
||||
rem Unless required by applicable law or agreed to in writing, software
|
||||
rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
rem See the License for the specific language governing permissions and
|
||||
rem limitations under the License.
|
||||
|
||||
if not exist "%ROCKETMQ_HOME%\bin\runserver.cmd" echo Please set the ROCKETMQ_HOME variable in your environment! & EXIT /B 1
|
||||
|
||||
call "%ROCKETMQ_HOME%\bin\runserver.cmd" -Drmq.logback.configurationFile=%ROCKETMQ_HOME%\conf\rmq.controller.logback.xml org.apache.rocketmq.controller.ControllerStartup %*
|
||||
|
||||
IF %ERRORLEVEL% EQU 0 (
|
||||
ECHO "Controller starts OK"
|
||||
)
|
45
base/Resources/rocketmq/bin/mqnamesrv
Normal file
45
base/Resources/rocketmq/bin/mqnamesrv
Normal file
@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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.
|
||||
|
||||
if [ -z "$ROCKETMQ_HOME" ] ; then
|
||||
## resolve links - $0 may be a link to maven's home
|
||||
PRG="$0"
|
||||
|
||||
# need this for relative symlinks
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG="`dirname "$PRG"`/$link"
|
||||
fi
|
||||
done
|
||||
|
||||
saveddir=`pwd`
|
||||
|
||||
ROCKETMQ_HOME=`dirname "$PRG"`/..
|
||||
|
||||
# make it fully qualified
|
||||
ROCKETMQ_HOME=`cd "$ROCKETMQ_HOME" && pwd`
|
||||
|
||||
cd "$saveddir"
|
||||
fi
|
||||
|
||||
export ROCKETMQ_HOME
|
||||
|
||||
sh ${ROCKETMQ_HOME}/bin/runserver.sh -Drmq.logback.configurationFile=$ROCKETMQ_HOME/conf/rmq.namesrv.logback.xml org.apache.rocketmq.namesrv.NamesrvStartup $@
|
23
base/Resources/rocketmq/bin/mqnamesrv.cmd
Normal file
23
base/Resources/rocketmq/bin/mqnamesrv.cmd
Normal file
@ -0,0 +1,23 @@
|
||||
@echo off
|
||||
rem Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
rem contributor license agreements. See the NOTICE file distributed with
|
||||
rem this work for additional information regarding copyright ownership.
|
||||
rem The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
rem (the "License"); you may not use this file except in compliance with
|
||||
rem the License. You may obtain a copy of the License at
|
||||
rem
|
||||
rem http://www.apache.org/licenses/LICENSE-2.0
|
||||
rem
|
||||
rem Unless required by applicable law or agreed to in writing, software
|
||||
rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
rem See the License for the specific language governing permissions and
|
||||
rem limitations under the License.
|
||||
|
||||
if not exist "%ROCKETMQ_HOME%\bin\runserver.cmd" echo Please set the ROCKETMQ_HOME variable in your environment! & EXIT /B 1
|
||||
|
||||
call "%ROCKETMQ_HOME%\bin\runserver.cmd" -Drmq.logback.configurationFile=%ROCKETMQ_HOME%\conf\rmq.namesrv.logback.xml org.apache.rocketmq.namesrv.NamesrvStartup %*
|
||||
|
||||
IF %ERRORLEVEL% EQU 0 (
|
||||
ECHO "Namesrv starts OK"
|
||||
)
|
45
base/Resources/rocketmq/bin/mqproxy
Normal file
45
base/Resources/rocketmq/bin/mqproxy
Normal file
@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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.
|
||||
|
||||
if [ -z "$ROCKETMQ_HOME" ] ; then
|
||||
## resolve links - $0 may be a link to maven's home
|
||||
PRG="$0"
|
||||
|
||||
# need this for relative symlinks
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG="`dirname "$PRG"`/$link"
|
||||
fi
|
||||
done
|
||||
|
||||
saveddir=`pwd`
|
||||
|
||||
ROCKETMQ_HOME=`dirname "$PRG"`/..
|
||||
|
||||
# make it fully qualified
|
||||
ROCKETMQ_HOME=`cd "$ROCKETMQ_HOME" && pwd`
|
||||
|
||||
cd "$saveddir"
|
||||
fi
|
||||
|
||||
export ROCKETMQ_HOME
|
||||
|
||||
sh ${ROCKETMQ_HOME}/bin/runserver.sh -Drmq.logback.configurationFile=$ROCKETMQ_HOME/conf/rmq.proxy.logback.xml org.apache.rocketmq.proxy.ProxyStartup $@
|
23
base/Resources/rocketmq/bin/mqproxy.cmd
Normal file
23
base/Resources/rocketmq/bin/mqproxy.cmd
Normal file
@ -0,0 +1,23 @@
|
||||
@echo off
|
||||
rem Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
rem contributor license agreements. See the NOTICE file distributed with
|
||||
rem this work for additional information regarding copyright ownership.
|
||||
rem The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
rem (the "License"); you may not use this file except in compliance with
|
||||
rem the License. You may obtain a copy of the License at
|
||||
rem
|
||||
rem http://www.apache.org/licenses/LICENSE-2.0
|
||||
rem
|
||||
rem Unless required by applicable law or agreed to in writing, software
|
||||
rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
rem See the License for the specific language governing permissions and
|
||||
rem limitations under the License.
|
||||
|
||||
if not exist "%ROCKETMQ_HOME%\bin\runserver.cmd" echo Please set the ROCKETMQ_HOME variable in your environment! & EXIT /B 1
|
||||
|
||||
call "%ROCKETMQ_HOME%\bin\runserver.cmd" -Drmq.logback.configurationFile=%ROCKETMQ_HOME%\conf\rmq.proxy.logback.xml org.apache.rocketmq.proxy.ProxyStartup %*
|
||||
|
||||
IF %ERRORLEVEL% EQU 0 (
|
||||
ECHO "Proxy starts OK"
|
||||
)
|
96
base/Resources/rocketmq/bin/mqshutdown
Normal file
96
base/Resources/rocketmq/bin/mqshutdown
Normal file
@ -0,0 +1,96 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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.
|
||||
|
||||
case $1 in
|
||||
broker)
|
||||
pid=`ps ax | grep -i 'org.apache.rocketmq.proxy.ProxyStartup' | grep '\-pm local' |grep java | grep -v grep | awk '{print $1}'`
|
||||
if [ "$pid" != "" ] ; then
|
||||
echo "The mqbroker with proxy enable is running(${pid})..."
|
||||
kill ${pid}
|
||||
echo "Send shutdown request to mqbroker with proxy enable OK(${pid})"
|
||||
fi
|
||||
pid=`ps ax | grep -i 'org.apache.rocketmq.broker.BrokerStartup' |grep java | grep -v grep | awk '{print $1}'`
|
||||
if [ -z "$pid" ] ; then
|
||||
echo "No mqbroker running."
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
echo "The mqbroker(${pid}) is running..."
|
||||
|
||||
kill ${pid}
|
||||
|
||||
echo "Send shutdown request to mqbroker(${pid}) OK"
|
||||
;;
|
||||
brokerContainer)
|
||||
|
||||
pid=`ps ax | grep -i 'org.apache.rocketmq.container.BrokerContainerStartup' |grep java | grep -v grep | awk '{print $1}'`
|
||||
if [ -z "$pid" ] ; then
|
||||
echo "No broker container running."
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
echo "The broker container(${pid}) is running..."
|
||||
|
||||
kill ${pid}
|
||||
|
||||
echo "Send shutdown request to broker container(${pid}) OK"
|
||||
;;
|
||||
namesrv)
|
||||
|
||||
pid=`ps ax | grep -i 'org.apache.rocketmq.namesrv.NamesrvStartup' |grep java | grep -v grep | awk '{print $1}'`
|
||||
if [ -z "$pid" ] ; then
|
||||
echo "No mqnamesrv running."
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
echo "The mqnamesrv(${pid}) is running..."
|
||||
|
||||
kill ${pid}
|
||||
|
||||
echo "Send shutdown request to mqnamesrv(${pid}) OK"
|
||||
;;
|
||||
controller)
|
||||
|
||||
pid=`ps ax | grep -i 'org.apache.rocketmq.controller.ControllerStartup' |grep java | grep -v grep | awk '{print $1}'`
|
||||
if [ -z "$pid" ] ; then
|
||||
echo "No mqcontroller running."
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
echo "The mqcontroller(${pid}) is running..."
|
||||
|
||||
kill ${pid}
|
||||
|
||||
echo "Send shutdown request to mqcontroller(${pid}) OK"
|
||||
;;
|
||||
proxy)
|
||||
|
||||
pid=`ps ax | grep -i 'org.apache.rocketmq.proxy.ProxyStartup' |grep java | grep -v grep | awk '{print $1}'`
|
||||
if [ -z "$pid" ] ; then
|
||||
echo "No mqproxy running."
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
echo "The mqproxy(${pid}) is running..."
|
||||
|
||||
kill ${pid}
|
||||
|
||||
echo "Send shutdown request to mqproxy(${pid}) OK"
|
||||
;;
|
||||
*)
|
||||
echo "Usage: mqshutdown broker | namesrv | controller | proxy"
|
||||
esac
|
41
base/Resources/rocketmq/bin/mqshutdown.cmd
Normal file
41
base/Resources/rocketmq/bin/mqshutdown.cmd
Normal file
@ -0,0 +1,41 @@
|
||||
@echo off
|
||||
rem Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
rem contributor license agreements. See the NOTICE file distributed with
|
||||
rem this work for additional information regarding copyright ownership.
|
||||
rem The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
rem (the "License"); you may not use this file except in compliance with
|
||||
rem the License. You may obtain a copy of the License at
|
||||
rem
|
||||
rem http://www.apache.org/licenses/LICENSE-2.0
|
||||
rem
|
||||
rem Unless required by applicable law or agreed to in writing, software
|
||||
rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
rem See the License for the specific language governing permissions and
|
||||
rem limitations under the License.
|
||||
|
||||
if not exist "%JAVA_HOME%\bin\jps.exe" echo Please set the JAVA_HOME variable in your environment, We need java(x64)! & EXIT /B 1
|
||||
|
||||
setlocal
|
||||
|
||||
set "PATH=%JAVA_HOME%\bin;%PATH%"
|
||||
|
||||
if /I "%1" == "broker" (
|
||||
echo killing broker
|
||||
for /f "tokens=1" %%i in ('jps -m ^| find "BrokerStartup"') do ( taskkill /F /PID %%i )
|
||||
echo Done!
|
||||
) else if /I "%1" == "namesrv" (
|
||||
echo killing name server
|
||||
|
||||
for /f "tokens=1" %%i in ('jps -m ^| find "NamesrvStartup"') do ( taskkill /F /PID %%i )
|
||||
|
||||
echo Done!
|
||||
) else if /I "%1" == "controller" (
|
||||
echo killing controller server
|
||||
|
||||
for /f "tokens=1" %%i in ('jps -m ^| find "ControllerStartup"') do ( taskkill /F /PID %%i )
|
||||
|
||||
echo Done!
|
||||
) else (
|
||||
echo Unknown role to kill, please specify broker or namesrv or controller
|
||||
)
|
64
base/Resources/rocketmq/bin/os.sh
Normal file
64
base/Resources/rocketmq/bin/os.sh
Normal file
@ -0,0 +1,64 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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.
|
||||
|
||||
export PATH=$PATH:/sbin
|
||||
|
||||
# sudo sysctl -w vm.extra_free_kbytes=2000000
|
||||
# sudo sysctl -w vm.min_free_kbytes=1000000
|
||||
sudo sysctl -w vm.overcommit_memory=1
|
||||
sudo sysctl -w vm.drop_caches=1
|
||||
sudo sysctl -w vm.zone_reclaim_mode=0
|
||||
sudo sysctl -w vm.max_map_count=655360
|
||||
sudo sysctl -w vm.dirty_background_ratio=50
|
||||
sudo sysctl -w vm.dirty_ratio=50
|
||||
sudo sysctl -w vm.dirty_writeback_centisecs=360000
|
||||
sudo sysctl -w vm.page-cluster=3
|
||||
sudo sysctl -w vm.swappiness=1
|
||||
|
||||
echo 'ulimit -n 655350' >> /etc/profile
|
||||
echo '* hard nofile 655350' >> /etc/security/limits.conf
|
||||
|
||||
echo '* hard memlock unlimited' >> /etc/security/limits.conf
|
||||
echo '* soft memlock unlimited' >> /etc/security/limits.conf
|
||||
|
||||
DISK=`df -k | sort -n -r -k 2 | awk -F/ 'NR==1 {gsub(/[0-9].*/,"",$3); print $3}'`
|
||||
[ "$DISK" = 'cciss' ] && DISK='cciss!c0d0'
|
||||
echo 'deadline' > /sys/block/${DISK}/queue/scheduler
|
||||
|
||||
|
||||
echo "---------------------------------------------------------------"
|
||||
sysctl vm.extra_free_kbytes
|
||||
sysctl vm.min_free_kbytes
|
||||
sysctl vm.overcommit_memory
|
||||
sysctl vm.drop_caches
|
||||
sysctl vm.zone_reclaim_mode
|
||||
sysctl vm.max_map_count
|
||||
sysctl vm.dirty_background_ratio
|
||||
sysctl vm.dirty_ratio
|
||||
sysctl vm.dirty_writeback_centisecs
|
||||
sysctl vm.page-cluster
|
||||
sysctl vm.swappiness
|
||||
|
||||
su - admin -c 'ulimit -n'
|
||||
cat /sys/block/$DISK/queue/scheduler
|
||||
|
||||
if [ -d ${HOME}/tmpfs ] ; then
|
||||
echo "tmpfs exist, do nothing."
|
||||
else
|
||||
ln -s /dev/shm ${HOME}/tmpfs
|
||||
echo "create tmpfs ok"
|
||||
fi
|
30
base/Resources/rocketmq/bin/play.cmd
Normal file
30
base/Resources/rocketmq/bin/play.cmd
Normal file
@ -0,0 +1,30 @@
|
||||
@echo off
|
||||
rem Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
rem contributor license agreements. See the NOTICE file distributed with
|
||||
rem this work for additional information regarding copyright ownership.
|
||||
rem The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
rem (the "License"); you may not use this file except in compliance with
|
||||
rem the License. You may obtain a copy of the License at
|
||||
rem
|
||||
rem http://www.apache.org/licenses/LICENSE-2.0
|
||||
rem
|
||||
rem Unless required by applicable law or agreed to in writing, software
|
||||
rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
rem See the License for the specific language governing permissions and
|
||||
rem limitations under the License.
|
||||
|
||||
START /B mqnamesrv > ns.log 2>&1
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
echo "Failed to start name server. Please check ns.log"
|
||||
EXIT /B 1
|
||||
)
|
||||
|
||||
START /B mqbroker -n localhost:9876 > bk.log 2>&1
|
||||
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
ECHO "Failed to start broker. Please check bk.log"
|
||||
EXIT /B 1
|
||||
)
|
||||
|
||||
echo "Start Name Server and Broker Successfully."
|
33
base/Resources/rocketmq/bin/play.sh
Normal file
33
base/Resources/rocketmq/bin/play.sh
Normal file
@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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.
|
||||
|
||||
#
|
||||
# Name Server
|
||||
#
|
||||
nohup sh mqnamesrv > ns.log 2>&1 &
|
||||
|
||||
#
|
||||
# Service Addr
|
||||
#
|
||||
ADDR=`hostname -i`:9876
|
||||
|
||||
#
|
||||
# Broker
|
||||
#
|
||||
nohup sh mqbroker -n ${ADDR} > bk.log 2>&1 &
|
||||
|
||||
echo "Start Name Server and Broker Successfully, ${ADDR}"
|
BIN
base/Resources/rocketmq/bin/rocketmq-dashboard.jar
Normal file
BIN
base/Resources/rocketmq/bin/rocketmq-dashboard.jar
Normal file
Binary file not shown.
60
base/Resources/rocketmq/bin/runbroker.cmd
Normal file
60
base/Resources/rocketmq/bin/runbroker.cmd
Normal file
@ -0,0 +1,60 @@
|
||||
@echo off
|
||||
rem Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
rem contributor license agreements. See the NOTICE file distributed with
|
||||
rem this work for additional information regarding copyright ownership.
|
||||
rem The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
rem (the "License"); you may not use this file except in compliance with
|
||||
rem the License. You may obtain a copy of the License at
|
||||
rem
|
||||
rem http://www.apache.org/licenses/LICENSE-2.0
|
||||
rem
|
||||
rem Unless required by applicable law or agreed to in writing, software
|
||||
rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
rem See the License for the specific language governing permissions and
|
||||
rem limitations under the License.
|
||||
|
||||
if not exist "%JAVA_HOME%\bin\java.exe" echo Please set the JAVA_HOME variable in your environment, We need java(x64)! & EXIT /B 1
|
||||
set "JAVA=%JAVA_HOME%\bin\java.exe"
|
||||
|
||||
setlocal
|
||||
|
||||
set BASE_DIR=%~dp0
|
||||
set BASE_DIR=%BASE_DIR:~0,-1%
|
||||
for %%d in (%BASE_DIR%) do set BASE_DIR=%%~dpd
|
||||
|
||||
set CLASSPATH=.;%BASE_DIR%conf;%BASE_DIR%lib\*;"%CLASSPATH%"
|
||||
|
||||
rem ===========================================================================================
|
||||
rem JVM Configuration
|
||||
rem ===========================================================================================
|
||||
for /f "tokens=2 delims=" %%v in ('java -version 2^>^&1 ^| findstr /i "version"') do (
|
||||
for /f "tokens=1 delims=." %%m in ("%%v") do set "JAVA_MAJOR_VERSION=%%m"
|
||||
)
|
||||
|
||||
if "%JAVA_MAJOR_VERSION%"=="" (
|
||||
set "JAVA_MAJOR_VERSION=0"
|
||||
)
|
||||
if %JAVA_MAJOR_VERSION% lss 17 (
|
||||
set "JAVA_OPT=%JAVA_OPT% -server -Xms2g -Xmx2g"
|
||||
set "JAVA_OPT=%JAVA_OPT% -XX:+UseG1GC -XX:G1HeapRegionSize=16m -XX:G1ReservePercent=25 -XX:InitiatingHeapOccupancyPercent=30 -XX:SoftRefLRUPolicyMSPerMB=0 -XX:SurvivorRatio=8"
|
||||
set "JAVA_OPT=%JAVA_OPT% -verbose:gc -Xloggc:%USERPROFILE%\mq_gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationStoppedTime -XX:+PrintAdaptiveSizePolicy"
|
||||
set "JAVA_OPT=%JAVA_OPT% -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=30m"
|
||||
set "JAVA_OPT=%JAVA_OPT% -XX:-OmitStackTraceInFastThrow"
|
||||
set "JAVA_OPT=%JAVA_OPT% -XX:+AlwaysPreTouch"
|
||||
set "JAVA_OPT=%JAVA_OPT% -XX:MaxDirectMemorySize=15g"
|
||||
set "JAVA_OPT=%JAVA_OPT% -XX:-UseLargePages -XX:-UseBiasedLocking"
|
||||
set "JAVA_OPT=%JAVA_OPT% %JAVA_OPT_EXT% -cp %CLASSPATH%"
|
||||
) else (
|
||||
set "JAVA_OPT=%JAVA_OPT% -server -Xms2g -Xmx2g"
|
||||
set "JAVA_OPT=%JAVA_OPT% -XX:+UseG1GC -XX:G1HeapRegionSize=16m -XX:G1ReservePercent=25 -XX:InitiatingHeapOccupancyPercent=30 -XX:SoftRefLRUPolicyMSPerMB=0 -XX:SurvivorRatio=8"
|
||||
rem set "JAVA_OPT=%JAVA_OPT% -verbose:gc -Xloggc:%USERPROFILE%\mq_gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationStoppedTime -XX:+PrintAdaptiveSizePolicy"
|
||||
rem set "JAVA_OPT=%JAVA_OPT% -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=30m"
|
||||
set "JAVA_OPT=%JAVA_OPT% -XX:-OmitStackTraceInFastThrow"
|
||||
set "JAVA_OPT=%JAVA_OPT% -XX:+AlwaysPreTouch"
|
||||
set "JAVA_OPT=%JAVA_OPT% -XX:MaxDirectMemorySize=15g"
|
||||
set "JAVA_OPT=%JAVA_OPT% -XX:-UseLargePages -XX:-UseBiasedLocking"
|
||||
set "JAVA_OPT=%JAVA_OPT% %JAVA_OPT_EXT% -cp "%CLASSPATH%""
|
||||
)
|
||||
|
||||
"%JAVA%" %JAVA_OPT% %*
|
123
base/Resources/rocketmq/bin/runbroker.sh
Normal file
123
base/Resources/rocketmq/bin/runbroker.sh
Normal file
@ -0,0 +1,123 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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.
|
||||
|
||||
#===========================================================================================
|
||||
# Java Environment Setting
|
||||
#===========================================================================================
|
||||
error_exit ()
|
||||
{
|
||||
echo "ERROR: $1 !!"
|
||||
exit 1
|
||||
}
|
||||
|
||||
find_java_home()
|
||||
{
|
||||
case "`uname`" in
|
||||
Darwin)
|
||||
if [ -n "$JAVA_HOME" ]; then
|
||||
JAVA_HOME=$JAVA_HOME
|
||||
return
|
||||
fi
|
||||
JAVA_HOME=$(/usr/libexec/java_home)
|
||||
;;
|
||||
*)
|
||||
JAVA_HOME=$(dirname $(dirname $(readlink -f $(which javac))))
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
find_java_home
|
||||
|
||||
[ ! -e "$JAVA_HOME/bin/java" ] && JAVA_HOME=$HOME/jdk/java
|
||||
[ ! -e "$JAVA_HOME/bin/java" ] && JAVA_HOME=/usr/java
|
||||
[ ! -e "$JAVA_HOME/bin/java" ] && error_exit "Please set the JAVA_HOME variable in your environment, We need java(x64)!"
|
||||
|
||||
export JAVA_HOME
|
||||
export JAVA="$JAVA_HOME/bin/java"
|
||||
export BASE_DIR=$(dirname $0)/..
|
||||
export CLASSPATH=.:${BASE_DIR}/conf:${BASE_DIR}/lib/*:${CLASSPATH}
|
||||
|
||||
#===========================================================================================
|
||||
# JVM Configuration
|
||||
#===========================================================================================
|
||||
# The RAMDisk initializing size in MB on Darwin OS for gc-log
|
||||
DIR_SIZE_IN_MB=600
|
||||
|
||||
choose_gc_log_directory()
|
||||
{
|
||||
case "`uname`" in
|
||||
Darwin)
|
||||
if [ ! -d "/Volumes/RAMDisk" ]; then
|
||||
# create ram disk on Darwin systems as gc-log directory
|
||||
DEV=`hdiutil attach -nomount ram://$((2 * 1024 * DIR_SIZE_IN_MB))` > /dev/null
|
||||
diskutil eraseVolume HFS+ RAMDisk ${DEV} > /dev/null
|
||||
echo "Create RAMDisk /Volumes/RAMDisk for gc logging on Darwin OS."
|
||||
fi
|
||||
GC_LOG_DIR="/Volumes/RAMDisk"
|
||||
;;
|
||||
*)
|
||||
# check if /dev/shm exists on other systems
|
||||
if [ -d "/dev/shm" ]; then
|
||||
GC_LOG_DIR="/dev/shm"
|
||||
else
|
||||
GC_LOG_DIR=${BASE_DIR}
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
choose_gc_options()
|
||||
{
|
||||
JAVA_MAJOR_VERSION=$("$JAVA" -version 2>&1 | head -1 | cut -d'"' -f2 | sed 's/^1\.//' | cut -d'.' -f1)
|
||||
if [ -z "$JAVA_MAJOR_VERSION" ] || [ "$JAVA_MAJOR_VERSION" -lt "8" ] ; then
|
||||
JAVA_OPT="${JAVA_OPT} -Xmn4g -XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollection -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSParallelRemarkEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+CMSClassUnloadingEnabled -XX:SurvivorRatio=8 -XX:-UseParNewGC"
|
||||
else
|
||||
JAVA_OPT="${JAVA_OPT} -XX:+UseG1GC -XX:G1HeapRegionSize=16m -XX:G1ReservePercent=25 -XX:InitiatingHeapOccupancyPercent=30 -XX:SoftRefLRUPolicyMSPerMB=0"
|
||||
fi
|
||||
|
||||
if [ -z "$JAVA_MAJOR_VERSION" ] || [ "$JAVA_MAJOR_VERSION" -lt "9" ] ; then
|
||||
JAVA_OPT="${JAVA_OPT} -verbose:gc -Xloggc:${GC_LOG_DIR}/rmq_srv_gc_%p_%t.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationStoppedTime -XX:+PrintAdaptiveSizePolicy"
|
||||
JAVA_OPT="${JAVA_OPT} -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=30m"
|
||||
else
|
||||
JAVA_OPT="${JAVA_OPT} -XX:+UseG1GC -XX:G1HeapRegionSize=16m -XX:G1ReservePercent=25 -XX:InitiatingHeapOccupancyPercent=30 -XX:SoftRefLRUPolicyMSPerMB=0"
|
||||
JAVA_OPT="${JAVA_OPT} -Xlog:gc*:file=${GC_LOG_DIR}/rmq_srv_gc_%p_%t.log:time,tags:filecount=5,filesize=30M"
|
||||
fi
|
||||
}
|
||||
|
||||
choose_gc_log_directory
|
||||
|
||||
JAVA_OPT="${JAVA_OPT} -server -Xms8g -Xmx8g"
|
||||
choose_gc_options
|
||||
JAVA_OPT="${JAVA_OPT} -XX:-OmitStackTraceInFastThrow"
|
||||
JAVA_OPT="${JAVA_OPT} -XX:+AlwaysPreTouch"
|
||||
JAVA_OPT="${JAVA_OPT} -XX:MaxDirectMemorySize=15g"
|
||||
JAVA_OPT="${JAVA_OPT} -XX:-UseLargePages -XX:-UseBiasedLocking"
|
||||
#JAVA_OPT="${JAVA_OPT} -Xdebug -Xrunjdwp:transport=dt_socket,address=9555,server=y,suspend=n"
|
||||
JAVA_OPT="${JAVA_OPT} ${JAVA_OPT_EXT}"
|
||||
JAVA_OPT="${JAVA_OPT} -cp ${CLASSPATH}"
|
||||
|
||||
numactl --interleave=all pwd > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
if [ -z "$RMQ_NUMA_NODE" ] ; then
|
||||
numactl --interleave=all $JAVA ${JAVA_OPT} $@
|
||||
else
|
||||
numactl --cpunodebind=$RMQ_NUMA_NODE --membind=$RMQ_NUMA_NODE $JAVA ${JAVA_OPT} $@
|
||||
fi
|
||||
else
|
||||
"$JAVA" ${JAVA_OPT} $@
|
||||
fi
|
56
base/Resources/rocketmq/bin/runserver.cmd
Normal file
56
base/Resources/rocketmq/bin/runserver.cmd
Normal file
@ -0,0 +1,56 @@
|
||||
@echo off
|
||||
rem Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
rem contributor license agreements. See the NOTICE file distributed with
|
||||
rem this work for additional information regarding copyright ownership.
|
||||
rem The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
rem (the "License"); you may not use this file except in compliance with
|
||||
rem the License. You may obtain a copy of the License at
|
||||
rem
|
||||
rem http://www.apache.org/licenses/LICENSE-2.0
|
||||
rem
|
||||
rem Unless required by applicable law or agreed to in writing, software
|
||||
rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
rem See the License for the specific language governing permissions and
|
||||
rem limitations under the License.
|
||||
|
||||
|
||||
if not exist "%JAVA_HOME%\bin\java.exe" echo Please set the JAVA_HOME variable in your environment, We need java(x64)! & EXIT /B 1
|
||||
set "JAVA=%JAVA_HOME%\bin\java.exe"
|
||||
|
||||
setlocal
|
||||
|
||||
set BASE_DIR=%~dp0
|
||||
set BASE_DIR=%BASE_DIR:~0,-1%
|
||||
for %%d in (%BASE_DIR%) do set BASE_DIR=%%~dpd
|
||||
|
||||
set CLASSPATH=.;%BASE_DIR%conf;%BASE_DIR%lib\*;%CLASSPATH%
|
||||
|
||||
REM Example of JAVA_MAJOR_VERSION value: '1', '9', '10', '11', ...
|
||||
REM '1' means releases before Java 9
|
||||
|
||||
for /f "tokens=2 delims=" %%v in ('java -version 2^>^&1 ^| findstr /i "version"') do (
|
||||
for /f "tokens=1 delims=." %%m in ("%%v") do set "JAVA_MAJOR_VERSION=%%m"
|
||||
)
|
||||
|
||||
if "%JAVA_MAJOR_VERSION%"=="" (
|
||||
set "JAVA_MAJOR_VERSION=0"
|
||||
)
|
||||
|
||||
if %JAVA_MAJOR_VERSION% lss 17 (
|
||||
set "JAVA_OPT=%JAVA_OPT% -server -Xms2g -Xmx2g -Xmn1g -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m"
|
||||
set "JAVA_OPT=%JAVA_OPT% -XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollection -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSParallelRemarkEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+CMSClassUnloadingEnabled -XX:SurvivorRatio=8 -XX:-UseParNewGC"
|
||||
set "JAVA_OPT=%JAVA_OPT% -verbose:gc -Xloggc:"%USERPROFILE%\rmq_srv_gc.log" -XX:+PrintGCDetails -XX:+PrintGCDateStamps"
|
||||
set "JAVA_OPT=%JAVA_OPT% -XX:-OmitStackTraceInFastThrow"
|
||||
set "JAVA_OPT=%JAVA_OPT% -XX:-UseLargePages"
|
||||
set "JAVA_OPT=%JAVA_OPT% %JAVA_OPT_EXT% -cp "%CLASSPATH%""
|
||||
) else (
|
||||
set "JAVA_OPT=%JAVA_OPT% -server -Xms2g -Xmx2g -Xmn1g -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m"
|
||||
rem set "JAVA_OPT=%JAVA_OPT% -XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollection -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSParallelRemarkEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+CMSClassUnloadingEnabled -XX:SurvivorRatio=8 -XX:-UseParNewGC"
|
||||
rem set "JAVA_OPT=%JAVA_OPT% -verbose:gc -Xloggc:"%USERPROFILE%\rmq_srv_gc.log" -XX:+PrintGCDetails -XX:+PrintGCDateStamps"
|
||||
set "JAVA_OPT=%JAVA_OPT% -XX:-OmitStackTraceInFastThrow"
|
||||
set "JAVA_OPT=%JAVA_OPT% -XX:-UseLargePages"
|
||||
set "JAVA_OPT=%JAVA_OPT% %JAVA_OPT_EXT% -cp "%CLASSPATH%""
|
||||
)
|
||||
|
||||
"%JAVA%" %JAVA_OPT% %*
|
108
base/Resources/rocketmq/bin/runserver.sh
Normal file
108
base/Resources/rocketmq/bin/runserver.sh
Normal file
@ -0,0 +1,108 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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.
|
||||
|
||||
#===========================================================================================
|
||||
# Java Environment Setting
|
||||
#===========================================================================================
|
||||
error_exit ()
|
||||
{
|
||||
echo "ERROR: $1 !!"
|
||||
exit 1
|
||||
}
|
||||
|
||||
find_java_home()
|
||||
{
|
||||
case "`uname`" in
|
||||
Darwin)
|
||||
if [ -n "$JAVA_HOME" ]; then
|
||||
JAVA_HOME=$JAVA_HOME
|
||||
return
|
||||
fi
|
||||
JAVA_HOME=$(/usr/libexec/java_home)
|
||||
;;
|
||||
*)
|
||||
JAVA_HOME=$(dirname $(dirname $(readlink -f $(which javac))))
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
find_java_home
|
||||
|
||||
[ ! -e "$JAVA_HOME/bin/java" ] && JAVA_HOME=$HOME/jdk/java
|
||||
[ ! -e "$JAVA_HOME/bin/java" ] && JAVA_HOME=/usr/java
|
||||
[ ! -e "$JAVA_HOME/bin/java" ] && error_exit "Please set the JAVA_HOME variable in your environment, We need java(x64)!"
|
||||
|
||||
export JAVA_HOME
|
||||
export JAVA="$JAVA_HOME/bin/java"
|
||||
export BASE_DIR=$(dirname $0)/..
|
||||
export CLASSPATH=.:${BASE_DIR}/conf:${BASE_DIR}/lib/*:${CLASSPATH}
|
||||
|
||||
#===========================================================================================
|
||||
# JVM Configuration
|
||||
#===========================================================================================
|
||||
# The RAMDisk initializing size in MB on Darwin OS for gc-log
|
||||
DIR_SIZE_IN_MB=600
|
||||
|
||||
choose_gc_log_directory()
|
||||
{
|
||||
case "`uname`" in
|
||||
Darwin)
|
||||
if [ ! -d "/Volumes/RAMDisk" ]; then
|
||||
# create ram disk on Darwin systems as gc-log directory
|
||||
DEV=`hdiutil attach -nomount ram://$((2 * 1024 * DIR_SIZE_IN_MB))` > /dev/null
|
||||
diskutil eraseVolume HFS+ RAMDisk ${DEV} > /dev/null
|
||||
echo "Create RAMDisk /Volumes/RAMDisk for gc logging on Darwin OS."
|
||||
fi
|
||||
GC_LOG_DIR="/Volumes/RAMDisk"
|
||||
;;
|
||||
*)
|
||||
# check if /dev/shm exists on other systems
|
||||
if [ -d "/dev/shm" ]; then
|
||||
GC_LOG_DIR="/dev/shm"
|
||||
else
|
||||
GC_LOG_DIR=${BASE_DIR}
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
choose_gc_options()
|
||||
{
|
||||
# Example of JAVA_MAJOR_VERSION value : '1', '9', '10', '11', ...
|
||||
# '1' means releases before Java 9
|
||||
JAVA_MAJOR_VERSION=$("$JAVA" -version 2>&1 | awk -F '"' '/version/ {print $2}' | awk -F '.' '{print $1}')
|
||||
if [ -z "$JAVA_MAJOR_VERSION" ] || [ "$JAVA_MAJOR_VERSION" -lt "9" ] ; then
|
||||
JAVA_OPT="${JAVA_OPT} -server -Xms4g -Xmx4g -Xmn2g -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m"
|
||||
JAVA_OPT="${JAVA_OPT} -XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollection -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSParallelRemarkEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+CMSClassUnloadingEnabled -XX:SurvivorRatio=8 -XX:-UseParNewGC"
|
||||
JAVA_OPT="${JAVA_OPT} -verbose:gc -Xloggc:${GC_LOG_DIR}/rmq_srv_gc_%p_%t.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps"
|
||||
JAVA_OPT="${JAVA_OPT} -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=30m"
|
||||
else
|
||||
JAVA_OPT="${JAVA_OPT} -server -Xms4g -Xmx4g -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m"
|
||||
JAVA_OPT="${JAVA_OPT} -XX:+UseG1GC -XX:G1HeapRegionSize=16m -XX:G1ReservePercent=25 -XX:InitiatingHeapOccupancyPercent=30 -XX:SoftRefLRUPolicyMSPerMB=0"
|
||||
JAVA_OPT="${JAVA_OPT} -Xlog:gc*:file=${GC_LOG_DIR}/rmq_srv_gc_%p_%t.log:time,tags:filecount=5,filesize=30M"
|
||||
fi
|
||||
}
|
||||
|
||||
choose_gc_log_directory
|
||||
choose_gc_options
|
||||
JAVA_OPT="${JAVA_OPT} -XX:-OmitStackTraceInFastThrow"
|
||||
JAVA_OPT="${JAVA_OPT} -XX:-UseLargePages"
|
||||
#JAVA_OPT="${JAVA_OPT} -Xdebug -Xrunjdwp:transport=dt_socket,address=9555,server=y,suspend=n"
|
||||
JAVA_OPT="${JAVA_OPT} ${JAVA_OPT_EXT}"
|
||||
JAVA_OPT="${JAVA_OPT} -cp ${CLASSPATH}"
|
||||
|
||||
"$JAVA" ${JAVA_OPT} $@
|
40
base/Resources/rocketmq/bin/setcache.sh
Normal file
40
base/Resources/rocketmq/bin/setcache.sh
Normal file
@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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.
|
||||
|
||||
export PATH=$PATH:/sbin
|
||||
|
||||
#
|
||||
# GB
|
||||
#
|
||||
function changeFreeCache()
|
||||
{
|
||||
EXTRA=$1
|
||||
MIN=$2
|
||||
sysctl -w vm.extra_free_kbytes=${EXTRA}000000
|
||||
sysctl -w vm.min_free_kbytes=${MIN}000000
|
||||
sysctl -w vm.swappiness=0
|
||||
}
|
||||
|
||||
|
||||
if [ $# -ne 2 ]
|
||||
then
|
||||
echo "Usage: $0 extra_free_kbytes(GB) min_free_kbytes(GB)"
|
||||
echo "Example: $0 3 1"
|
||||
exit
|
||||
fi
|
||||
|
||||
changeFreeCache $1 $2
|
45
base/Resources/rocketmq/bin/startfsrv.sh
Normal file
45
base/Resources/rocketmq/bin/startfsrv.sh
Normal file
@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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.
|
||||
|
||||
if [ -z "$ROCKETMQ_HOME" ] ; then
|
||||
## resolve links - $0 may be a link to maven's home
|
||||
PRG="$0"
|
||||
|
||||
# need this for relative symlinks
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG="`dirname "$PRG"`/$link"
|
||||
fi
|
||||
done
|
||||
|
||||
saveddir=`pwd`
|
||||
|
||||
ROCKETMQ_HOME=`dirname "$PRG"`/..
|
||||
|
||||
# make it fully qualified
|
||||
ROCKETMQ_HOME=`cd "$ROCKETMQ_HOME" && pwd`
|
||||
|
||||
cd "$saveddir"
|
||||
fi
|
||||
|
||||
export ROCKETMQ_HOME
|
||||
|
||||
nohup sh ${ROCKETMQ_HOME}/bin/runserver.sh org.apache.rocketmq.filtersrv.FiltersrvStartup $@ &
|
34
base/Resources/rocketmq/bin/tools.cmd
Normal file
34
base/Resources/rocketmq/bin/tools.cmd
Normal file
@ -0,0 +1,34 @@
|
||||
@echo off
|
||||
rem Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
rem contributor license agreements. See the NOTICE file distributed with
|
||||
rem this work for additional information regarding copyright ownership.
|
||||
rem The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
rem (the "License"); you may not use this file except in compliance with
|
||||
rem the License. You may obtain a copy of the License at
|
||||
rem
|
||||
rem http://www.apache.org/licenses/LICENSE-2.0
|
||||
rem
|
||||
rem Unless required by applicable law or agreed to in writing, software
|
||||
rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
rem See the License for the specific language governing permissions and
|
||||
rem limitations under the License.
|
||||
|
||||
if not exist "%JAVA_HOME%\bin\java.exe" echo Please set the JAVA_HOME variable in your environment, We need java(x64)! & EXIT /B 1
|
||||
|
||||
set "JAVA=%JAVA_HOME%\bin\java.exe"
|
||||
|
||||
setlocal
|
||||
set BASE_DIR=%~dp0
|
||||
set BASE_DIR=%BASE_DIR:~0,-1%
|
||||
for %%d in (%BASE_DIR%) do set BASE_DIR=%%~dpd
|
||||
|
||||
set CLASSPATH=.;%BASE_DIR%conf;%BASE_DIR%lib\*;%CLASSPATH%
|
||||
|
||||
rem ===========================================================================================
|
||||
rem JVM Configuration
|
||||
rem ===========================================================================================
|
||||
set "JAVA_OPT=%JAVA_OPT% -server -Xms1g -Xmx1g -Xmn256m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=128m"
|
||||
set "JAVA_OPT=%JAVA_OPT% -cp "%CLASSPATH%""
|
||||
|
||||
"%JAVA%" %JAVA_OPT% %*
|
60
base/Resources/rocketmq/bin/tools.sh
Normal file
60
base/Resources/rocketmq/bin/tools.sh
Normal file
@ -0,0 +1,60 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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.
|
||||
|
||||
#===========================================================================================
|
||||
# Java Environment Setting
|
||||
#===========================================================================================
|
||||
error_exit ()
|
||||
{
|
||||
echo "ERROR: $1 !!"
|
||||
exit 1
|
||||
}
|
||||
|
||||
find_java_home()
|
||||
{
|
||||
if [ -n "$JAVA_HOME" ]; then
|
||||
JAVA_HOME=$JAVA_HOME
|
||||
return
|
||||
fi
|
||||
case "`uname`" in
|
||||
Darwin)
|
||||
JAVA_HOME=$(/usr/libexec/java_home)
|
||||
;;
|
||||
*)
|
||||
JAVA_HOME=$(dirname $(dirname $(readlink -f $(which javac))))
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
find_java_home
|
||||
|
||||
[ ! -e "$JAVA_HOME/bin/java" ] && JAVA_HOME=$HOME/jdk/java
|
||||
[ ! -e "$JAVA_HOME/bin/java" ] && JAVA_HOME=/usr/java
|
||||
[ ! -e "$JAVA_HOME/bin/java" ] && error_exit "Please set the JAVA_HOME variable in your environment, We need java(x64)!"
|
||||
|
||||
export JAVA_HOME
|
||||
export JAVA="$JAVA_HOME/bin/java"
|
||||
export BASE_DIR=$(dirname $0)/..
|
||||
export CLASSPATH=.:${BASE_DIR}/conf:${BASE_DIR}/lib/*:${CLASSPATH}
|
||||
|
||||
#===========================================================================================
|
||||
# JVM Configuration
|
||||
#===========================================================================================
|
||||
JAVA_OPT="${JAVA_OPT} -server -Xms1g -Xmx1g -Xmn256m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=128m"
|
||||
JAVA_OPT="${JAVA_OPT} -cp ${CLASSPATH}"
|
||||
|
||||
"$JAVA" ${JAVA_OPT} "$@"
|
@ -0,0 +1,21 @@
|
||||
# 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
|
21
base/Resources/rocketmq/conf/2m-2s-async/broker-a.properties
Normal file
21
base/Resources/rocketmq/conf/2m-2s-async/broker-a.properties
Normal file
@ -0,0 +1,21 @@
|
||||
# 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
|
@ -0,0 +1,21 @@
|
||||
# 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
|
21
base/Resources/rocketmq/conf/2m-2s-async/broker-b.properties
Normal file
21
base/Resources/rocketmq/conf/2m-2s-async/broker-b.properties
Normal file
@ -0,0 +1,21 @@
|
||||
# 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
|
@ -0,0 +1,21 @@
|
||||
# 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
|
21
base/Resources/rocketmq/conf/2m-2s-sync/broker-a.properties
Normal file
21
base/Resources/rocketmq/conf/2m-2s-sync/broker-a.properties
Normal file
@ -0,0 +1,21 @@
|
||||
# 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
|
@ -0,0 +1,21 @@
|
||||
# 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
|
21
base/Resources/rocketmq/conf/2m-2s-sync/broker-b.properties
Normal file
21
base/Resources/rocketmq/conf/2m-2s-sync/broker-b.properties
Normal file
@ -0,0 +1,21 @@
|
||||
# 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
|
21
base/Resources/rocketmq/conf/2m-noslave/broker-a.properties
Normal file
21
base/Resources/rocketmq/conf/2m-noslave/broker-a.properties
Normal file
@ -0,0 +1,21 @@
|
||||
# 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
|
21
base/Resources/rocketmq/conf/2m-noslave/broker-b.properties
Normal file
21
base/Resources/rocketmq/conf/2m-noslave/broker-b.properties
Normal file
@ -0,0 +1,21 @@
|
||||
# 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
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# 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-trace
|
||||
brokerId=0
|
||||
deleteWhen=04
|
||||
fileReservedTime=48
|
||||
brokerRole=ASYNC_MASTER
|
||||
flushDiskType=ASYNC_FLUSH
|
22
base/Resources/rocketmq/conf/broker.conf
Normal file
22
base/Resources/rocketmq/conf/broker.conf
Normal file
@ -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
|
@ -0,0 +1,34 @@
|
||||
# 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.
|
||||
|
||||
#Master配置
|
||||
brokerClusterName=DefaultCluster
|
||||
brokerName=broker-a
|
||||
brokerId=0
|
||||
brokerRole=SYNC_MASTER
|
||||
flushDiskType=ASYNC_FLUSH
|
||||
storePathRootDir=/root/broker-a/store
|
||||
storePathCommitLog=/root/broker-a/store/commitlog
|
||||
listenPort=10911
|
||||
haListenPort=10912
|
||||
totalReplicas=2
|
||||
inSyncReplicas=2
|
||||
minInSyncReplicas=1
|
||||
enableAutoInSyncReplicas=true
|
||||
slaveReadEnable=true
|
||||
brokerHeartbeatInterval=1000
|
||||
brokerNotActiveTimeoutMillis=5000
|
||||
sendHeartbeatTimeoutMillis=1000
|
||||
enableSlaveActingMaster=true
|
@ -0,0 +1,34 @@
|
||||
# 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.
|
||||
|
||||
#Master配置
|
||||
brokerClusterName=DefaultCluster
|
||||
brokerName=broker-a
|
||||
brokerId=1
|
||||
brokerRole=SLAVE
|
||||
flushDiskType=ASYNC_FLUSH
|
||||
storePathRootDir=/root/broker-a/store
|
||||
storePathCommitLog=/root/broker-a/store/commitlog
|
||||
listenPort=10911
|
||||
haListenPort=10912
|
||||
totalReplicas=2
|
||||
inSyncReplicas=2
|
||||
minInSyncReplicas=1
|
||||
enableAutoInSyncReplicas=true
|
||||
slaveReadEnable=true
|
||||
brokerHeartbeatInterval=1000
|
||||
brokerNotActiveTimeoutMillis=5000
|
||||
sendHeartbeatTimeoutMillis=1000
|
||||
enableSlaveActingMaster=true
|
@ -0,0 +1,34 @@
|
||||
# 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.
|
||||
|
||||
#Slave配置
|
||||
brokerClusterName=DefaultCluster
|
||||
brokerName=broker-b
|
||||
brokerId=1
|
||||
brokerRole=SLAVE
|
||||
flushDiskType=ASYNC_FLUSH
|
||||
storePathRootDir=/root/broker-b/store
|
||||
storePathCommitLog=/root/broker-b/store/commitlog
|
||||
listenPort=20911
|
||||
haListenPort=20912
|
||||
totalReplicas=2
|
||||
inSyncReplicas=2
|
||||
minInSyncReplicas=1
|
||||
enableAutoInSyncReplicas=true
|
||||
slaveReadEnable=true
|
||||
brokerHeartbeatInterval=1000
|
||||
brokerNotActiveTimeoutMillis=5000
|
||||
sendHeartbeatTimeoutMillis=1000
|
||||
enableSlaveActingMaster=true
|
@ -0,0 +1,34 @@
|
||||
# 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.
|
||||
|
||||
#Slave配置
|
||||
brokerClusterName=DefaultCluster
|
||||
brokerName=broker-b
|
||||
brokerId=0
|
||||
brokerRole=SYNC_MASTER
|
||||
flushDiskType=ASYNC_FLUSH
|
||||
storePathRootDir=/root/broker-b/store
|
||||
storePathCommitLog=/root/broker-b/store/commitlog
|
||||
listenPort=20911
|
||||
haListenPort=20912
|
||||
totalReplicas=2
|
||||
inSyncReplicas=2
|
||||
minInSyncReplicas=1
|
||||
enableAutoInSyncReplicas=true
|
||||
slaveReadEnable=true
|
||||
brokerHeartbeatInterval=1000
|
||||
brokerNotActiveTimeoutMillis=5000
|
||||
sendHeartbeatTimeoutMillis=1000
|
||||
enableSlaveActingMaster=true
|
@ -0,0 +1,24 @@
|
||||
# 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.
|
||||
|
||||
#配置端口,用于接收mqadmin命令
|
||||
listenPort=10811
|
||||
#指定namesrv
|
||||
namesrvAddr=172.22.144.49:9876
|
||||
#或指定自动获取namesrv
|
||||
fetchNamesrvAddrByAddressServer=false
|
||||
#指定要向BrokerContainer内添加的brokerConfig路径,多个config间用“:”分隔;
|
||||
#不指定则只启动BrokerConainer,具体broker可通过mqadmin工具添加
|
||||
brokerConfigPaths=/root/2container-2m-2s/broker-a-in-container1.conf:/root/2container-2m-2s/broker-b-in-container1.conf
|
@ -0,0 +1,24 @@
|
||||
# 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.
|
||||
|
||||
#配置端口,用于接收mqadmin命令
|
||||
listenPort=10811
|
||||
#指定namesrv
|
||||
namesrvAddr=172.22.144.49:9876
|
||||
#或指定自动获取namesrv
|
||||
fetchNamesrvAddrByAddressServer=false
|
||||
#指定要向BrokerContainer内添加的brokerConfig路径,多个config间用“:”分隔;
|
||||
#不指定则只启动BrokerConainer,具体broker可通过mqadmin工具添加
|
||||
brokerConfigPaths=/root/2container-2m-2s/broker-a-in-container2.conf:/root/2container-2m-2s/broker-b-in-container2.conf
|
@ -0,0 +1,16 @@
|
||||
# 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.
|
||||
|
||||
supportActingMaster=true
|
@ -0,0 +1,19 @@
|
||||
# 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.
|
||||
|
||||
controllerDLegerGroup = group1
|
||||
controllerDLegerPeers = n0-127.0.0.1:9878;n1-127.0.0.1:9868;n2-127.0.0.1:9858
|
||||
controllerDLegerSelfId = n0
|
||||
|
@ -0,0 +1,19 @@
|
||||
# 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.
|
||||
|
||||
controllerDLegerGroup = group1
|
||||
controllerDLegerPeers = n0-127.0.0.1:9878;n1-127.0.0.1:9868;n2-127.0.0.1:9858
|
||||
controllerDLegerSelfId = n1
|
||||
|
@ -0,0 +1,19 @@
|
||||
# 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.
|
||||
|
||||
controllerDLegerGroup = group1
|
||||
controllerDLegerPeers = n0-127.0.0.1:9878;n1-127.0.0.1:9868;n2-127.0.0.1:9858
|
||||
controllerDLegerSelfId = n2
|
||||
|
@ -0,0 +1,25 @@
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
|
||||
#Namesrv config
|
||||
listenPort = 9876
|
||||
enableControllerInNamesrv = true
|
||||
|
||||
#controller config
|
||||
controllerDLegerGroup = group1
|
||||
controllerDLegerPeers = n0-127.0.0.1:9878;n1-127.0.0.1:9868;n2-127.0.0.1:9858
|
||||
controllerDLegerSelfId = n0
|
@ -0,0 +1,25 @@
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
|
||||
#Namesrv config
|
||||
listenPort = 9886
|
||||
enableControllerInNamesrv = true
|
||||
|
||||
#controller config
|
||||
controllerDLegerGroup = group1
|
||||
controllerDLegerPeers = n0-127.0.0.1:9878;n1-127.0.0.1:9868;n2-127.0.0.1:9858
|
||||
controllerDLegerSelfId = n1
|
@ -0,0 +1,25 @@
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
|
||||
#Namesrv config
|
||||
listenPort = 9896
|
||||
enableControllerInNamesrv = true
|
||||
|
||||
#controller config
|
||||
controllerDLegerGroup = group1
|
||||
controllerDLegerPeers = n0-127.0.0.1:9878;n1-127.0.0.1:9868;n2-127.0.0.1:9858
|
||||
controllerDLegerSelfId = n2
|
@ -0,0 +1,19 @@
|
||||
# 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.
|
||||
|
||||
controllerDLegerGroup = group1
|
||||
controllerDLegerPeers = n0-127.0.0.1:9878
|
||||
controllerDLegerSelfId = n0
|
||||
|
@ -0,0 +1,28 @@
|
||||
# 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
|
||||
brokerRole = SLAVE
|
||||
deleteWhen = 04
|
||||
fileReservedTime = 48
|
||||
enableControllerMode = true
|
||||
controllerAddr = 127.0.0.1:9878
|
||||
namesrvAddr = 127.0.0.1:9876
|
||||
allAckInSyncStateSet=true
|
||||
listenPort=30911
|
||||
storePathRootDir=/tmp/rmqstore/node00
|
||||
storePathCommitLog=/tmp/rmqstore/node00/commitlog
|
@ -0,0 +1,28 @@
|
||||
# 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
|
||||
brokerRole = SLAVE
|
||||
deleteWhen = 04
|
||||
fileReservedTime = 48
|
||||
enableControllerMode = true
|
||||
controllerAddr = 127.0.0.1:9878
|
||||
namesrvAddr = 127.0.0.1:9876
|
||||
allAckInSyncStateSet=true
|
||||
listenPort=30921
|
||||
storePathRootDir=/tmp/rmqstore/node01
|
||||
storePathCommitLog=/tmp/rmqstore/node01/commitlog
|
@ -0,0 +1,19 @@
|
||||
# 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.
|
||||
|
||||
enableControllerInNamesrv = true
|
||||
controllerDLegerGroup = group1
|
||||
controllerDLegerPeers = n0-127.0.0.1:9878
|
||||
controllerDLegerSelfId = n0
|
27
base/Resources/rocketmq/conf/dledger/broker-n0.conf
Normal file
27
base/Resources/rocketmq/conf/dledger/broker-n0.conf
Normal file
@ -0,0 +1,27 @@
|
||||
# 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 = RaftCluster
|
||||
brokerName=RaftNode00
|
||||
listenPort=30911
|
||||
namesrvAddr=127.0.0.1:9876
|
||||
storePathRootDir=/tmp/rmqstore/node00
|
||||
storePathCommitLog=/tmp/rmqstore/node00/commitlog
|
||||
enableDLegerCommitLog=true
|
||||
dLegerGroup=RaftNode00
|
||||
dLegerPeers=n0-127.0.0.1:40911;n1-127.0.0.1:40912;n2-127.0.0.1:40913
|
||||
## must be unique
|
||||
dLegerSelfId=n0
|
||||
sendMessageThreadPoolNums=16
|
27
base/Resources/rocketmq/conf/dledger/broker-n1.conf
Normal file
27
base/Resources/rocketmq/conf/dledger/broker-n1.conf
Normal file
@ -0,0 +1,27 @@
|
||||
# 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 = RaftCluster
|
||||
brokerName=RaftNode00
|
||||
listenPort=30921
|
||||
namesrvAddr=127.0.0.1:9876
|
||||
storePathRootDir=/tmp/rmqstore/node01
|
||||
storePathCommitLog=/tmp/rmqstore/node01/commitlog
|
||||
enableDLegerCommitLog=true
|
||||
dLegerGroup=RaftNode00
|
||||
dLegerPeers=n0-127.0.0.1:40911;n1-127.0.0.1:40912;n2-127.0.0.1:40913
|
||||
## must be unique
|
||||
dLegerSelfId=n1
|
||||
sendMessageThreadPoolNums=16
|
27
base/Resources/rocketmq/conf/dledger/broker-n2.conf
Normal file
27
base/Resources/rocketmq/conf/dledger/broker-n2.conf
Normal file
@ -0,0 +1,27 @@
|
||||
# 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 = RaftCluster
|
||||
brokerName=RaftNode00
|
||||
listenPort=30931
|
||||
namesrvAddr=127.0.0.1:9876
|
||||
storePathRootDir=/tmp/rmqstore/node02
|
||||
storePathCommitLog=/tmp/rmqstore/node02/commitlog
|
||||
enableDLegerCommitLog=true
|
||||
dLegerGroup=RaftNode00
|
||||
dLegerPeers=n0-127.0.0.1:40911;n1-127.0.0.1:40912;n2-127.0.0.1:40913
|
||||
## must be unique
|
||||
dLegerSelfId=n2
|
||||
sendMessageThreadPoolNums=16
|
42
base/Resources/rocketmq/conf/plain_acl.yml
Normal file
42
base/Resources/rocketmq/conf/plain_acl.yml
Normal file
@ -0,0 +1,42 @@
|
||||
# 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.
|
||||
|
||||
globalWhiteRemoteAddresses:
|
||||
- 10.10.103.*
|
||||
- 192.168.0.*
|
||||
|
||||
accounts:
|
||||
- accessKey: RocketMQ
|
||||
secretKey: 12345678
|
||||
whiteRemoteAddress:
|
||||
admin: false
|
||||
defaultTopicPerm: DENY
|
||||
defaultGroupPerm: SUB
|
||||
topicPerms:
|
||||
- topicA=DENY
|
||||
- topicB=PUB|SUB
|
||||
- topicC=SUB
|
||||
groupPerms:
|
||||
# the group should convert to retry topic
|
||||
- groupA=DENY
|
||||
- groupB=PUB|SUB
|
||||
- groupC=SUB
|
||||
|
||||
- accessKey: rocketmq2
|
||||
secretKey: 12345678
|
||||
whiteRemoteAddress: 192.168.1.*
|
||||
# if it is admin, it could access all resources
|
||||
admin: true
|
||||
|
3
base/Resources/rocketmq/conf/rmq-proxy.json
Normal file
3
base/Resources/rocketmq/conf/rmq-proxy.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"rocketMQClusterName": "DefaultCluster"
|
||||
}
|
724
base/Resources/rocketmq/conf/rmq.broker.logback.xml
Normal file
724
base/Resources/rocketmq/conf/rmq.broker.logback.xml
Normal file
@ -0,0 +1,724 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
|
||||
<configuration scan="true" scanPeriod="30 seconds">
|
||||
|
||||
<appender name="DefaultSiftingAppender_inner" class="ch.qos.logback.classic.sift.SiftingAppender">
|
||||
<discriminator>
|
||||
<key>brokerContainerLogDir</key>
|
||||
<defaultValue>${file.separator}</defaultValue>
|
||||
</discriminator>
|
||||
<sift>
|
||||
<appender name="DefaultAppender"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}broker_default.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}otherdays${file.separator}broker_default.%i.log.gz
|
||||
</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>10</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
</sift>
|
||||
</appender>
|
||||
<appender name="DefaultSiftingAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="DefaultSiftingAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqBrokerSiftingAppender_inner" class="ch.qos.logback.classic.sift.SiftingAppender">
|
||||
<discriminator>
|
||||
<key>brokerContainerLogDir</key>
|
||||
<defaultValue>${file.separator}</defaultValue>
|
||||
</discriminator>
|
||||
<sift>
|
||||
<appender name="RocketmqBrokerAppender"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}broker.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}otherdays${file.separator}broker.%i.log.gz
|
||||
</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>20</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>128MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
</sift>
|
||||
</appender>
|
||||
<appender name="RocketmqBrokerSiftingAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqBrokerSiftingAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqProtectionSiftingAppender_inner" class="ch.qos.logback.classic.sift.SiftingAppender">
|
||||
<discriminator>
|
||||
<key>brokerContainerLogDir</key>
|
||||
<defaultValue>${file.separator}</defaultValue>
|
||||
</discriminator>
|
||||
<sift>
|
||||
<appender name="RocketmqProtectionAppender"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}protection.log
|
||||
</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}otherdays${file.separator}protection.%i.log.gz
|
||||
</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>10</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
</sift>
|
||||
</appender>
|
||||
<appender name="RocketmqProtectionSiftingAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqProtectionSiftingAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqWaterMarkSiftingAppender_inner" class="ch.qos.logback.classic.sift.SiftingAppender">
|
||||
<discriminator>
|
||||
<key>brokerContainerLogDir</key>
|
||||
<defaultValue>${file.separator}</defaultValue>
|
||||
</discriminator>
|
||||
<sift>
|
||||
<appender name="RocketmqWaterMarkAppender"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}watermark.log
|
||||
</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}otherdays${file.separator}watermark.%i.log.gz
|
||||
</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>10</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
</sift>
|
||||
</appender>
|
||||
<appender name="RocketmqWaterMarkSiftingAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqWaterMarkSiftingAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqRocksDBSiftingAppender_inner" class="ch.qos.logback.classic.sift.SiftingAppender">
|
||||
<discriminator>
|
||||
<key>brokerContainerLogDir</key>
|
||||
<defaultValue>${file.separator}</defaultValue>
|
||||
</discriminator>
|
||||
<sift>
|
||||
<appender name="RocketmqStoreAppender"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}rocksdb.log
|
||||
</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}otherdays${file.separator}rocksdb.%i.log.gz
|
||||
</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>10</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>128MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
</sift>
|
||||
</appender>
|
||||
<appender name="RocketmqRocksDBSiftingAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqRocksDBSiftingAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqStoreSiftingAppender_inner" class="ch.qos.logback.classic.sift.SiftingAppender">
|
||||
<discriminator>
|
||||
<key>brokerContainerLogDir</key>
|
||||
<defaultValue>${file.separator}</defaultValue>
|
||||
</discriminator>
|
||||
<sift>
|
||||
<appender name="RocketmqStoreAppender"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}store.log
|
||||
</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}otherdays${file.separator}store.%i.log.gz
|
||||
</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>10</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>128MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
</sift>
|
||||
</appender>
|
||||
<appender name="RocketmqStoreSiftingAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqStoreSiftingAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqTieredStoreSiftingAppender_inner" class="ch.qos.logback.classic.sift.SiftingAppender">
|
||||
<discriminator>
|
||||
<key>brokerContainerLogDir</key>
|
||||
<defaultValue>${file.separator}</defaultValue>
|
||||
</discriminator>
|
||||
<sift>
|
||||
<appender name="RocketmqTieredStoreAppender"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}tiered_store.log
|
||||
</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}otherdays${file.separator}tiered_store.%i.log.gz
|
||||
</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>10</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>128MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
</sift>
|
||||
</appender>
|
||||
<appender name="RocketmqTieredStoreSiftingAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqTieredStoreSiftingAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqTrafficSiftingAppender_inner" class="ch.qos.logback.classic.sift.SiftingAppender">
|
||||
<discriminator>
|
||||
<key>brokerContainerLogDir</key>
|
||||
<defaultValue>${file.separator}</defaultValue>
|
||||
</discriminator>
|
||||
<sift>
|
||||
<appender name="RocketmqTrafficAppender"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}broker_traffic.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}broker_traffic.%i.log.gz</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>10</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
</sift>
|
||||
</appender>
|
||||
<appender name="RocketmqTrafficSiftingAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqTrafficSiftingAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqRemotingSiftingAppender_inner" class="ch.qos.logback.classic.sift.SiftingAppender">
|
||||
<discriminator>
|
||||
<key>brokerContainerLogDir</key>
|
||||
<defaultValue>${file.separator}</defaultValue>
|
||||
</discriminator>
|
||||
<sift>
|
||||
<appender name="RocketmqRemotingAppender"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}remoting.log
|
||||
</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}otherdays${file.separator}remoting.%i.log.gz
|
||||
</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>10</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
</sift>
|
||||
</appender>
|
||||
<appender name="RocketmqRemotingSiftingAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqRemotingSiftingAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqStoreErrorSiftingAppender_inner" class="ch.qos.logback.classic.sift.SiftingAppender">
|
||||
<discriminator>
|
||||
<key>brokerContainerLogDir</key>
|
||||
<defaultValue>${file.separator}</defaultValue>
|
||||
</discriminator>
|
||||
<sift>
|
||||
<appender name="RocketmqStoreErrorAppender"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}storeerror.log
|
||||
</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}otherdays${file.separator}storeerror.%i.log.gz
|
||||
</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>10</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
</sift>
|
||||
</appender>
|
||||
<appender name="RocketmqStoreErrorSiftingAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqStoreErrorSiftingAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqTransactionSiftingAppender_inner" class="ch.qos.logback.classic.sift.SiftingAppender">
|
||||
<discriminator>
|
||||
<key>brokerContainerLogDir</key>
|
||||
<defaultValue>${file.separator}</defaultValue>
|
||||
</discriminator>
|
||||
<sift>
|
||||
<appender name="RocketmqTransactionAppender"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}transaction.log
|
||||
</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}otherdays${file.separator}transaction.%i.log.gz
|
||||
</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>10</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
</sift>
|
||||
</appender>
|
||||
<appender name="RocketmqTransactionSiftingAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqTransactionSiftingAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqRebalanceLockSiftingAppender_inner" class="ch.qos.logback.classic.sift.SiftingAppender">
|
||||
<discriminator>
|
||||
<key>brokerContainerLogDir</key>
|
||||
<defaultValue>${file.separator}</defaultValue>
|
||||
</discriminator>
|
||||
<sift>
|
||||
<appender name="RocketmqRebalanceLockAppender"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}lock.log
|
||||
</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}otherdays${file.separator}lock.%i.log.gz
|
||||
</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>5</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
</sift>
|
||||
</appender>
|
||||
<appender name="RocketmqRebalanceLockSiftingAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqRebalanceLockSiftingAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqFilterSiftingAppender_inner" class="ch.qos.logback.classic.sift.SiftingAppender">
|
||||
<discriminator>
|
||||
<key>brokerContainerLogDir</key>
|
||||
<defaultValue>${file.separator}</defaultValue>
|
||||
</discriminator>
|
||||
<sift>
|
||||
<appender name="RocketmqFilterAppender"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}filter.log
|
||||
</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}otherdays${file.separator}filter.%i.log.gz
|
||||
</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>10</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
</sift>
|
||||
</appender>
|
||||
<appender name="RocketmqRebalanceLockSiftingAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqFilterSiftingAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqStatsSiftingAppender_inner" class="ch.qos.logback.classic.sift.SiftingAppender">
|
||||
<discriminator>
|
||||
<key>brokerContainerLogDir</key>
|
||||
<defaultValue>${file.separator}</defaultValue>
|
||||
</discriminator>
|
||||
<sift>
|
||||
<appender name="RocketmqStatsAppender"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}stats.log
|
||||
</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}otherdays${file.separator}stats.%i.log.gz
|
||||
</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>5</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
</sift>
|
||||
</appender>
|
||||
<appender name="RocketmqStatsSiftingAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqStatsSiftingAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqCommercialSiftingAppender_inner" class="ch.qos.logback.classic.sift.SiftingAppender">
|
||||
<discriminator>
|
||||
<key>brokerContainerLogDir</key>
|
||||
<defaultValue>${file.separator}</defaultValue>
|
||||
</discriminator>
|
||||
<sift>
|
||||
<appender name="RocketmqCommercialAppender"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}commercial.log
|
||||
</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}otherdays${file.separator}commercial.%i.log.gz
|
||||
</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>10</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>500MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
</appender>
|
||||
</sift>
|
||||
</appender>
|
||||
<appender name="RocketmqCommercialSiftingAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqCommercialSiftingAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqPopSiftingAppender_inner" class="ch.qos.logback.classic.sift.SiftingAppender">
|
||||
<discriminator>
|
||||
<key>brokerContainerLogDir</key>
|
||||
<defaultValue>${file.separator}</defaultValue>
|
||||
</discriminator>
|
||||
<sift>
|
||||
<appender name="RocketmqPopAppender"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}pop.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}pop.%i.log
|
||||
</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>20</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy
|
||||
class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>128MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
</sift>
|
||||
</appender>
|
||||
<appender name="RocketmqPopSiftingAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqPopSiftingAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqColdCtrSiftingAppender" class="ch.qos.logback.classic.sift.SiftingAppender">
|
||||
<discriminator>
|
||||
<key>brokerContainerLogDir</key>
|
||||
<defaultValue>${file.separator}</defaultValue>
|
||||
</discriminator>
|
||||
<sift>
|
||||
<appender name="RocketmqColdCtrAppender"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}/logs/rocketmqlogs/coldctr.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>${user.home}/logs/rocketmqlogs/otherdays/coldctr.%i.log
|
||||
</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>10</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy
|
||||
class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
</sift>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqBrokerMetricsSiftingAppender_inner" class="ch.qos.logback.classic.sift.SiftingAppender">
|
||||
<discriminator>
|
||||
<key>brokerContainerLogDir</key>
|
||||
<defaultValue>${file.separator}</defaultValue>
|
||||
</discriminator>
|
||||
<sift>
|
||||
<appender name="RocketmqBrokerMetricsAppender"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}broker_metrics.log
|
||||
</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}otherdays${file.separator}broker_metrics.%i.log.gz
|
||||
</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>3</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>512MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
</sift>
|
||||
</appender>
|
||||
<appender name="RocketmqBrokerMetricsSiftingAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqBrokerMetricsSiftingAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqAuthAuditSiftingAppender_inner" class="ch.qos.logback.classic.sift.SiftingAppender">
|
||||
<discriminator>
|
||||
<key>brokerContainerLogDir</key>
|
||||
<defaultValue>${file.separator}</defaultValue>
|
||||
</discriminator>
|
||||
<sift>
|
||||
<appender name="RocketmqAuthAuditAppender"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}auth_audit.log
|
||||
</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}otherdays${file.separator}auth_audit.%i.log.gz
|
||||
</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>3</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>512MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
</sift>
|
||||
</appender>
|
||||
<appender name="RocketmqAuthAuditSiftingAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqAuthAuditSiftingAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<logger name="RocketmqBroker" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqBrokerSiftingAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqProtection" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqProtectionSiftingAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqWaterMark" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqWaterMarkSiftingAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqCommon" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqBrokerSiftingAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqRocksDB" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqRocksDBSiftingAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqStore" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqStoreSiftingAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqStoreError" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqStoreErrorSiftingAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqTieredStore" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqTieredStoreSiftingAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqTransaction" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqTransactionSiftingAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqRebalanceLock" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqRebalanceLockSiftingAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqRemoting" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqRemotingSiftingAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqStats" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqStatsSiftingAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqCommercial" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqCommercialSiftingAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqFilter" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqFilterSiftingAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqConsole" additivity="false" level="INFO">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqPop" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqPopSiftingAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqColdCtr" additivity="false">
|
||||
<level value="INFO"/>
|
||||
<appender-ref ref="RocketmqColdCtrSiftingAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqTraffic" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqTrafficSiftingAppender"/>
|
||||
</logger>
|
||||
|
||||
<!-- Use json formatter to log metrics -->
|
||||
<logger name="io.opentelemetry.exporter.logging.otlp.OtlpJsonLoggingMetricExporter" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqBrokerMetricsSiftingAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="io.opentelemetry.exporter.logging.LoggingMetricExporter" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqBrokerMetricsSiftingAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqAuthAudit" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqAuthAuditSiftingAppender"/>
|
||||
</logger>
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="DefaultSiftingAppender"/>
|
||||
</root>
|
||||
</configuration>
|
55
base/Resources/rocketmq/conf/rmq.client.logback.xml
Normal file
55
base/Resources/rocketmq/conf/rmq.client.logback.xml
Normal file
@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
|
||||
<configuration>
|
||||
<conversionRule conversionWord="pid" converterClass="io.github.aliyunmq.logback.extensions.ProcessIdConverter"/>
|
||||
<appender name="CustomConsoleAppender" class="io.github.aliyunmq.logback.extensions.CustomConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%yellow(%d{yyy-MM-dd HH:mm:ss.SSS,GMT+8}) %highlight(%-5p) %boldWhite([%pid]) %magenta([%t]) %boldGreen([%logger{12}#%M:%L]) - %m%n
|
||||
</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
<appender name="DefaultAppenderInner" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<append>true</append>
|
||||
<File>
|
||||
${rocketmq.log.root:-${user.home}${file.separator}logs${file.separator}rocketmqlogs}${file.separator}rocketmq_client.log
|
||||
</File>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<FileNamePattern>
|
||||
${rocketmq.log.root:-${user.home}${file.separator}logs${file.separator}rocketmqlogs}${file.separator}other_days${file.separator}rocketmq_client-%i.log.gz
|
||||
</FileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>${rocketmq.log.file.maxIndex:-10}</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>64MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss.SSS,GMT+8} %-5p [%pid] [%t] [%logger{12}#%M:%L] - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
<appender name="DefaultAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="DefaultAppenderInner"/>
|
||||
</appender>
|
||||
<root level="${rocketmq.log.level:-info}">
|
||||
<appender-ref ref="CustomConsoleAppender"/>
|
||||
<appender-ref ref="DefaultAppender" additivity="false"/>
|
||||
</root>
|
||||
<!-- ref: https://github.com/grpc/grpc-java/issues/3033 -->
|
||||
<!-- <logger name="io.grpc" level="warn"/> -->
|
||||
</configuration>
|
186
base/Resources/rocketmq/conf/rmq.controller.logback.xml
Normal file
186
base/Resources/rocketmq/conf/rmq.controller.logback.xml
Normal file
@ -0,0 +1,186 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
|
||||
<configuration scan="true" scanPeriod="30 seconds">
|
||||
<appender name="DefaultAppender"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}controller_default.log
|
||||
</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}controller_default.%i.log.gz
|
||||
</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>5</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy
|
||||
class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<appender name="DLedgerAppender_inner"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}dledger.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}dledger.%i.log.gz
|
||||
</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>5</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy
|
||||
class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<appender name="DLedgerAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="DLedgerAppender_inner"/>
|
||||
<discardingThreshold>0</discardingThreshold>
|
||||
</appender>
|
||||
|
||||
<appender name="JRaftAppender_inner"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}jraft.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}jraft.%i.log.gz
|
||||
</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>5</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy
|
||||
class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<appender name="JRaftAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="JRaftAppender_inner"/>
|
||||
<discardingThreshold>0</discardingThreshold>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqTrafficAppender_inner"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}controller_traffic.log
|
||||
</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}controller_traffic.%i.log.gz
|
||||
</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>10</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqTrafficAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqTrafficAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqControllerAppender_inner"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}controller.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}controller.%i.log.gz
|
||||
</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>5</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy
|
||||
class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
<appender name="RocketmqControllerAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqControllerAppender_inner"/>
|
||||
<discardingThreshold>0</discardingThreshold>
|
||||
</appender>
|
||||
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<logger name="RocketmqController" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqControllerAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqControllerConsole" additivity="false" level="INFO">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqCommon" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqControllerAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqRemoting" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqControllerAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="io.openmessaging.storage.dledger" additivity="false" level="INFO">
|
||||
<appender-ref ref="DLedgerAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="com.alipay.sofa.jraft" additivity="false" level="INFO">
|
||||
<appender-ref ref="JRaftAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqControllerConsole" additivity="false" level="INFO">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqTraffic" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqTrafficAppender"/>
|
||||
</logger>
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="DefaultAppender"/>
|
||||
</root>
|
||||
</configuration>
|
117
base/Resources/rocketmq/conf/rmq.namesrv.logback.xml
Normal file
117
base/Resources/rocketmq/conf/rmq.namesrv.logback.xml
Normal file
@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
|
||||
<configuration scan="true" scanPeriod="30 seconds">
|
||||
<appender name="DefaultAppender"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}namesrv_default.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}namesrv_default.%i.log.gz</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>5</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy
|
||||
class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqNamesrvAppender_inner"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}namesrv.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}namesrv.%i.log.gz</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>5</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy
|
||||
class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
<appender name="RocketmqNamesrvAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqNamesrvAppender_inner"/>
|
||||
<discardingThreshold>0</discardingThreshold>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqTrafficAppender_inner"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}namesrv_traffic.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}namesrv_traffic.%i.log.gz</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>10</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
<appender name="RocketmqTrafficAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqTrafficAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<logger name="RocketmqNamesrv" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqNamesrvAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqCommon" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqNamesrvAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqRemoting" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqNamesrvAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqNamesrvConsole" additivity="false" level="INFO">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqController" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqNamesrvAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqTraffic" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqTrafficAppender" />
|
||||
</logger>
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="DefaultAppender"/>
|
||||
</root>
|
||||
</configuration>
|
462
base/Resources/rocketmq/conf/rmq.proxy.logback.xml
Normal file
462
base/Resources/rocketmq/conf/rmq.proxy.logback.xml
Normal file
@ -0,0 +1,462 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
|
||||
<configuration scan="true" scanPeriod="30 seconds">
|
||||
|
||||
<appender name="RocketmqProxyAppender_inner"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}proxy.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}proxy.%i.log.gz</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>10</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>128MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
<appender name="RocketmqProxyAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqProxyAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqProxyWatermarkAppender_inner"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}proxy_watermark.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}proxy_watermark.%i.log.gz</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>10</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>128MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
<appender name="RocketmqProxyWatermarkAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqProxyWatermarkAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
<!-- Below is the logger configuration for broker-->
|
||||
<appender name="DefaultAppender"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}${brokerLogDir:-${file.separator}}${file.separator}broker_default.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}${brokerLogDir:-${file.separator}}${file.separator}broker_default.%i.log.gz</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>10</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqBrokerAppender_inner"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}${brokerLogDir:-${file.separator}}${file.separator}broker.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}${brokerLogDir:-${file.separator}}${file.separator}broker.%i.log.gz</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>20</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>128MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
<appender name="RocketmqBrokerAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqBrokerAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqProtectionAppender_inner"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}${brokerLogDir:-${file.separator}}${file.separator}protection.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}${brokerLogDir:-${file.separator}}${file.separator}protection.%i.log.gz</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>10</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
<appender name="RocketmqProtectionAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqProtectionAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqWaterMarkAppender_inner"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}${brokerLogDir:-${file.separator}}${file.separator}watermark.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}${brokerLogDir:-${file.separator}}${file.separator}watermark.%i.log.gz</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>10</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
<appender name="RocketmqWaterMarkAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqWaterMarkAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqStoreAppender_inner"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}${brokerLogDir:-${file.separator}}${file.separator}store.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}${brokerLogDir:-${file.separator}}${file.separator}store.%i.log.gz</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>10</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>128MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
<appender name="RocketmqStoreAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqStoreAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqRemotingAppender_inner"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}${brokerLogDir:-${file.separator}}${file.separator}remoting.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}${brokerLogDir:-${file.separator}}${file.separator}remoting.%i.log.gz</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>10</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
<appender name="RocketmqRemotingAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqRemotingAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqStoreErrorAppender_inner"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}${brokerLogDir:-${file.separator}}${file.separator}storeerror.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}${brokerLogDir:-${file.separator}}${file.separator}storeerror.%i.log.gz</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>10</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
<appender name="RocketmqStoreErrorAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqStoreErrorAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
|
||||
<appender name="RocketmqTransactionAppender_inner"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}${brokerLogDir:-${file.separator}}${file.separator}transaction.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}${brokerLogDir:-${file.separator}}${file.separator}transaction.%i.log.gz</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>10</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
<appender name="RocketmqTransactionAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqTransactionAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqRebalanceLockAppender_inner"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}${brokerLogDir:-${file.separator}}${file.separator}lock.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}${brokerLogDir:-${file.separator}}${file.separator}lock.%i.log.gz</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>5</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
<appender name="RocketmqRebalanceLockAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqRebalanceLockAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqFilterAppender_inner"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}${brokerLogDir:-${file.separator}}${file.separator}filter.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}${brokerLogDir:-${file.separator}}${file.separator}filter.%i.log.gz</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>10</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
<appender name="RocketmqFilterAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqFilterAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqStatsAppender"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}${brokerLogDir:-${file.separator}}${file.separator}stats.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}${brokerLogDir:-${file.separator}}${file.separator}stats.%i.log.gz</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>5</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqCommercialAppender"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}${brokerLogDir:-${file.separator}}${file.separator}commercial.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}${brokerLogDir:-${file.separator}}${file.separator}commercial.%i.log.gz</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>10</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>500MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqPopAppender_inner"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}pop.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}pop.%i.log
|
||||
</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>20</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy
|
||||
class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>128MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqProxyMetricsAppender"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}${brokerLogDir:-${file.separator}}${file.separator}proxy_metric.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}${brokerLogDir:-${file.separator}}${file.separator}proxy_metric.%i.log.gz</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>10</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>500MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqAuthAuditAppender_inner"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}${brokerLogDir:-${file.separator}}${file.separator}auth_audit.log
|
||||
</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>
|
||||
${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}${brokerLogDir:-${file.separator}}${file.separator}auth_audit.%i.log.gz
|
||||
</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>10</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
<appender name="RocketmqAuthAuditAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqAuthAuditAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqPopAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqPopAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<logger name="RocketmqBroker" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqBrokerAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqProtection" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqProtectionAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqWaterMark" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqWaterMarkAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqCommon" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqBrokerAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqStore" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqStoreAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqStoreError" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqStoreErrorAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqTransaction" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqTransactionAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqRebalanceLock" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqRebalanceLockAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqRemoting" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqRemotingAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqStats" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqStatsAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqCommercial" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqCommercialAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqFilter" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqFilterAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqConsole" additivity="false" level="INFO">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqPop" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqPopAppender" />
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqProxy" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqProxyAppender" />
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqProxyWatermark" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqProxyWatermarkAppender" />
|
||||
</logger>
|
||||
|
||||
<!-- Use json formatter to log metrics -->
|
||||
<logger name="io.opentelemetry.exporter.logging.otlp.OtlpJsonLoggingMetricExporter" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqProxyMetricsAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="io.opentelemetry.exporter.logging.LoggingMetricExporter" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqProxyMetricsAppender" />
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqAuthAudit" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqAuthAuditAppender"/>
|
||||
</logger>
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="DefaultAppender"/>
|
||||
</root>
|
||||
</configuration>
|
91
base/Resources/rocketmq/conf/rmq.tools.logback.xml
Normal file
91
base/Resources/rocketmq/conf/rmq.tools.logback.xml
Normal file
@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
|
||||
<configuration scan="true" scanPeriod="30 seconds">
|
||||
<appender name="DefaultAppender"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}tools_default.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}tools_default.%i.log.gz</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>5</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<appender name="RocketmqToolsAppender_inner"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}tools.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}tools.%i.log.gz</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>5</maxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy
|
||||
class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
<appender name="RocketmqToolsAppender" class="ch.qos.logback.classic.AsyncAppender">
|
||||
<appender-ref ref="RocketmqToolsAppender_inner"/>
|
||||
</appender>
|
||||
|
||||
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern>
|
||||
<charset class="java.nio.charset.Charset">UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<logger name="STDOUT" additivity="false" level="INFO">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqTools" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqToolsAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqCommon" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqBrokerAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqStore" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqBrokerAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="RocketmqRemoting" additivity="false" level="INFO">
|
||||
<appender-ref ref="RocketmqBrokerAppender"/>
|
||||
</logger>
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="DefaultAppender"/>
|
||||
</root>
|
||||
</configuration>
|
19
base/Resources/rocketmq/conf/tools.yml
Normal file
19
base/Resources/rocketmq/conf/tools.yml
Normal file
@ -0,0 +1,19 @@
|
||||
# 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.
|
||||
|
||||
|
||||
accessKey: rocketmq2
|
||||
secretKey: 12345678
|
||||
|
BIN
base/Resources/rocketmq/lib/animal-sniffer-annotations-1.21.jar
Normal file
BIN
base/Resources/rocketmq/lib/animal-sniffer-annotations-1.21.jar
Normal file
Binary file not shown.
BIN
base/Resources/rocketmq/lib/annotations-13.0.jar
Normal file
BIN
base/Resources/rocketmq/lib/annotations-13.0.jar
Normal file
Binary file not shown.
BIN
base/Resources/rocketmq/lib/annotations-4.1.1.4.jar
Normal file
BIN
base/Resources/rocketmq/lib/annotations-4.1.1.4.jar
Normal file
Binary file not shown.
BIN
base/Resources/rocketmq/lib/annotations-api-6.0.53.jar
Normal file
BIN
base/Resources/rocketmq/lib/annotations-api-6.0.53.jar
Normal file
Binary file not shown.
BIN
base/Resources/rocketmq/lib/awaitility-4.1.0.jar
Normal file
BIN
base/Resources/rocketmq/lib/awaitility-4.1.0.jar
Normal file
Binary file not shown.
BIN
base/Resources/rocketmq/lib/bcpkix-jdk15on-1.69.jar
Normal file
BIN
base/Resources/rocketmq/lib/bcpkix-jdk15on-1.69.jar
Normal file
Binary file not shown.
BIN
base/Resources/rocketmq/lib/bcprov-jdk15on-1.69.jar
Normal file
BIN
base/Resources/rocketmq/lib/bcprov-jdk15on-1.69.jar
Normal file
Binary file not shown.
BIN
base/Resources/rocketmq/lib/bcutil-jdk15on-1.69.jar
Normal file
BIN
base/Resources/rocketmq/lib/bcutil-jdk15on-1.69.jar
Normal file
Binary file not shown.
BIN
base/Resources/rocketmq/lib/bolt-1.6.4.jar
Normal file
BIN
base/Resources/rocketmq/lib/bolt-1.6.4.jar
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user