diff --git a/README.md b/README.md index c5fdb2b7..327614d0 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,6 @@ yshop3.0项目采用分模块开发方式 * 1.15 Hutool * 1.16 Mapstruct * 1.17 Redisson - * 1.18 Rocketmq * 前端使用技术 * 2.1 Vue 全家桶 diff --git a/rocketmqService/LICENSE b/rocketmqService/LICENSE deleted file mode 100644 index 37261723..00000000 --- a/rocketmqService/LICENSE +++ /dev/null @@ -1,334 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (properties) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [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. - diff --git a/rocketmqService/NOTICE b/rocketmqService/NOTICE deleted file mode 100644 index c2f511fa..00000000 --- a/rocketmqService/NOTICE +++ /dev/null @@ -1,36 +0,0 @@ -Apache RocketMQ -Copyright 2016-2019 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..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()) diff --git a/rocketmqService/README.md b/rocketmqService/README.md deleted file mode 100644 index 33b42800..00000000 --- a/rocketmqService/README.md +++ /dev/null @@ -1,73 +0,0 @@ -## Apache RocketMQ [![Build Status](https://travis-ci.org/apache/rocketmq.svg?branch=master)](https://travis-ci.org/apache/rocketmq) [![Coverage Status](https://coveralls.io/repos/github/apache/rocketmq/badge.svg?branch=master)](https://coveralls.io/github/apache/rocketmq?branch=master) -[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.rocketmq/rocketmq-all/badge.svg)](http://search.maven.org/#search%7Cga%7C1%7Corg.apache.rocketmq) -[![GitHub release](https://img.shields.io/badge/release-download-orange.svg)](https://rocketmq.apache.org/dowloading/releases) -[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) - -**[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: - -* Pub/Sub messaging model -* Financial grade transactional message -* A variety of cross language clients, such as Java, C/C++, Python, Go -* Pluggable transport protocols, such as TCP, SSL, AIO -* Inbuilt message tracing capability, also support opentracing -* Versatile big-data and streaming ecosytem integration -* Message retroactivity by time or offset -* Reliable FIFO and strict ordered messaging in the same queue -* Efficient pull&push consumption model -* Million-level message accumulation capacity in a single queue -* Multiple messaging protocols like 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 authorisation - ----------- - -## Learn it & Contact us -* Mailing Lists: -* Home: -* Docs: -* Issues: -* Rips: -* Ask: -* Slack: - - ----------- - -## Apache RocketMQ Community -* [RocketMQ Community Projects](https://github.com/apache/rocketmq-externals) ----------- - -## 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 - 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. diff --git a/rocketmqService/benchmark/consumer.sh b/rocketmqService/benchmark/consumer.sh deleted file mode 100644 index 6f9cd3d1..00000000 --- a/rocketmqService/benchmark/consumer.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/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 $@ & diff --git a/rocketmqService/benchmark/producer.sh b/rocketmqService/benchmark/producer.sh deleted file mode 100644 index 3116d116..00000000 --- a/rocketmqService/benchmark/producer.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/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 $@ & diff --git a/rocketmqService/benchmark/runclass.sh b/rocketmqService/benchmark/runclass.sh deleted file mode 100644 index 339e11a2..00000000 --- a/rocketmqService/benchmark/runclass.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/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:${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} -Djava.ext.dirs=${BASE_DIR}/lib" -JAVA_OPT="${JAVA_OPT} -XX:-UseLargePages" -JAVA_OPT="${JAVA_OPT} -XX:+PerfDisableSharedMem" -#JAVA_OPT="${JAVA_OPT} -Xdebug -Xrunjdwp:transport=dt_socket,address=9555,server=y,suspend=n" -JAVA_OPT="${JAVA_OPT} -cp ${CLASSPATH}" - -if [ -z "$JAVA_HOME" ]; then - JAVA_HOME=/usr/java -fi - -JAVA="$JAVA_HOME/bin/java" - -$JAVA ${JAVA_OPT} $@ diff --git a/rocketmqService/benchmark/tproducer.sh b/rocketmqService/benchmark/tproducer.sh deleted file mode 100644 index ac4bbf3e..00000000 --- a/rocketmqService/benchmark/tproducer.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/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 $@ diff --git a/rocketmqService/bin/README.md b/rocketmqService/bin/README.md deleted file mode 100644 index efbb67d9..00000000 --- a/rocketmqService/bin/README.md +++ /dev/null @@ -1,29 +0,0 @@ -### 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 \ No newline at end of file diff --git a/rocketmqService/bin/cachedog.sh b/rocketmqService/bin/cachedog.sh deleted file mode 100644 index 9329fdb7..00000000 --- a/rocketmqService/bin/cachedog.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/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 diff --git a/rocketmqService/bin/cleancache.sh b/rocketmqService/bin/cleancache.sh deleted file mode 100644 index 9c6e9ab8..00000000 --- a/rocketmqService/bin/cleancache.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/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 diff --git a/rocketmqService/bin/cleancache.v1.sh b/rocketmqService/bin/cleancache.v1.sh deleted file mode 100644 index b3348414..00000000 --- a/rocketmqService/bin/cleancache.v1.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/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 diff --git a/rocketmqService/bin/dledger/fast-try.sh b/rocketmqService/bin/dledger/fast-try.sh deleted file mode 100644 index ff8a9603..00000000 --- a/rocketmqService/bin/dledger/fast-try.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/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. - -## Revise the base dir -CURRENT_DIR="$(cd "$(dirname "$0")"; pwd)" -RMQ_DIR=$CURRENT_DIR/../.. -cd $RMQ_DIR - -function startNameserver() { - export JAVA_OPT_EXT=" -Xms512m -Xmx512m " - nohup bin/mqnamesrv & -} - -function startBroker() { - export JAVA_OPT_EXT=" -Xms1g -Xmx1g " - conf_name=$1 - nohup bin/mqbroker -c $conf_name & -} - -function stopNameserver() { - PIDS=$(ps -ef|grep java|grep NamesrvStartup|grep -v grep|awk '{print $2}') - if [ ! -z "$PIDS" ]; then - kill -s TERM $PIDS - fi -} - -function 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=$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 -} - -function 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 -} - -function startAll() { - startNameserver - startBroker ./conf/dledger/broker-n0.conf - startBroker ./conf/dledger/broker-n1.conf - startBroker ./conf/dledger/broker-n2.conf -} - -function 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 - diff --git a/rocketmqService/bin/mqadmin b/rocketmqService/bin/mqadmin deleted file mode 100644 index cd0253bc..00000000 --- a/rocketmqService/bin/mqadmin +++ /dev/null @@ -1,45 +0,0 @@ -#!/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 org.apache.rocketmq.tools.command.MQAdminStartup $@ diff --git a/rocketmqService/bin/mqadmin.cmd b/rocketmqService/bin/mqadmin.cmd deleted file mode 100644 index 4e061f0e..00000000 --- a/rocketmqService/bin/mqadmin.cmd +++ /dev/null @@ -1,18 +0,0 @@ -@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" org.apache.rocketmq.tools.command.MQAdminStartup %* \ No newline at end of file diff --git a/rocketmqService/bin/mqbroker b/rocketmqService/bin/mqbroker deleted file mode 100644 index 6a79c392..00000000 --- a/rocketmqService/bin/mqbroker +++ /dev/null @@ -1,45 +0,0 @@ -#!/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.broker.BrokerStartup $@ diff --git a/rocketmqService/bin/mqbroker.cmd b/rocketmqService/bin/mqbroker.cmd deleted file mode 100644 index 3efb4757..00000000 --- a/rocketmqService/bin/mqbroker.cmd +++ /dev/null @@ -1,23 +0,0 @@ -@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" org.apache.rocketmq.broker.BrokerStartup %* - -IF %ERRORLEVEL% EQU 0 ( - ECHO "Broker starts OK" -) \ No newline at end of file diff --git a/rocketmqService/bin/mqbroker.numanode0 b/rocketmqService/bin/mqbroker.numanode0 deleted file mode 100644 index b7486a7a..00000000 --- a/rocketmqService/bin/mqbroker.numanode0 +++ /dev/null @@ -1,47 +0,0 @@ -#!/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 $@ diff --git a/rocketmqService/bin/mqbroker.numanode1 b/rocketmqService/bin/mqbroker.numanode1 deleted file mode 100644 index c301fedc..00000000 --- a/rocketmqService/bin/mqbroker.numanode1 +++ /dev/null @@ -1,47 +0,0 @@ -#!/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 $@ diff --git a/rocketmqService/bin/mqbroker.numanode2 b/rocketmqService/bin/mqbroker.numanode2 deleted file mode 100644 index ea95304b..00000000 --- a/rocketmqService/bin/mqbroker.numanode2 +++ /dev/null @@ -1,47 +0,0 @@ -#!/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 $@ diff --git a/rocketmqService/bin/mqbroker.numanode3 b/rocketmqService/bin/mqbroker.numanode3 deleted file mode 100644 index 25d3d1d0..00000000 --- a/rocketmqService/bin/mqbroker.numanode3 +++ /dev/null @@ -1,47 +0,0 @@ -#!/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 $@ diff --git a/rocketmqService/bin/mqnamesrv b/rocketmqService/bin/mqnamesrv deleted file mode 100644 index c1e70bde..00000000 --- a/rocketmqService/bin/mqnamesrv +++ /dev/null @@ -1,45 +0,0 @@ -#!/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 org.apache.rocketmq.namesrv.NamesrvStartup $@ diff --git a/rocketmqService/bin/mqnamesrv.cmd b/rocketmqService/bin/mqnamesrv.cmd deleted file mode 100644 index 2828bdc2..00000000 --- a/rocketmqService/bin/mqnamesrv.cmd +++ /dev/null @@ -1,23 +0,0 @@ -@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" org.apache.rocketmq.namesrv.NamesrvStartup %* - -IF %ERRORLEVEL% EQU 0 ( - ECHO "Namesrv starts OK" -) \ No newline at end of file diff --git a/rocketmqService/bin/mqshutdown b/rocketmqService/bin/mqshutdown deleted file mode 100644 index d2d51fc6..00000000 --- a/rocketmqService/bin/mqshutdown +++ /dev/null @@ -1,49 +0,0 @@ -#!/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.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" - ;; - 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" - ;; - *) - echo "Useage: mqshutdown broker | namesrv" -esac diff --git a/rocketmqService/bin/mqshutdown.cmd b/rocketmqService/bin/mqshutdown.cmd deleted file mode 100644 index 50af026f..00000000 --- a/rocketmqService/bin/mqshutdown.cmd +++ /dev/null @@ -1,35 +0,0 @@ -@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 ( - echo Unknown role to kill, please specify broker or namesrv -) \ No newline at end of file diff --git a/rocketmqService/bin/os.sh b/rocketmqService/bin/os.sh deleted file mode 100644 index 1a8a6cdf..00000000 --- a/rocketmqService/bin/os.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/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 diff --git a/rocketmqService/bin/play.cmd b/rocketmqService/bin/play.cmd deleted file mode 100644 index f1737d57..00000000 --- a/rocketmqService/bin/play.cmd +++ /dev/null @@ -1,30 +0,0 @@ -@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." \ No newline at end of file diff --git a/rocketmqService/bin/play.sh b/rocketmqService/bin/play.sh deleted file mode 100644 index 359d18d4..00000000 --- a/rocketmqService/bin/play.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/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}" diff --git a/rocketmqService/bin/runbroker.cmd b/rocketmqService/bin/runbroker.cmd deleted file mode 100644 index eab7e30f..00000000 --- a/rocketmqService/bin/runbroker.cmd +++ /dev/null @@ -1,42 +0,0 @@ -@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;%CLASSPATH% - -rem =========================================================================================== -rem JVM Configuration -rem =========================================================================================== -set "JAVA_OPT=%JAVA_OPT% -server -Xms2g -Xmx2g -Xmn1g" -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% -Djava.ext.dirs=%BASE_DIR%lib" -set "JAVA_OPT=%JAVA_OPT% -cp %CLASSPATH%" - -"%JAVA%" %JAVA_OPT% %* \ No newline at end of file diff --git a/rocketmqService/bin/runbroker.sh b/rocketmqService/bin/runbroker.sh deleted file mode 100644 index 0ccbf772..00000000 --- a/rocketmqService/bin/runbroker.sh +++ /dev/null @@ -1,90 +0,0 @@ -#!/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 -} - -[ ! -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:${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_log_directory - -JAVA_OPT="${JAVA_OPT} -server -Xms8g -Xmx8g -Xmn4g" -JAVA_OPT="${JAVA_OPT} -XX:+UseG1GC -XX:G1HeapRegionSize=16m -XX:G1ReservePercent=25 -XX:InitiatingHeapOccupancyPercent=30 -XX:SoftRefLRUPolicyMSPerMB=0" -JAVA_OPT="${JAVA_OPT} -verbose:gc -Xloggc:${GC_LOG_DIR}/rmq_broker_gc_%p_%t.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationStoppedTime -XX:+PrintAdaptiveSizePolicy" -JAVA_OPT="${JAVA_OPT} -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=30m" -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} -Djava.ext.dirs=${JAVA_HOME}/jre/lib/ext:${BASE_DIR}/lib" -#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 diff --git a/rocketmqService/bin/runserver.cmd b/rocketmqService/bin/runserver.cmd deleted file mode 100644 index 48e32bf2..00000000 --- a/rocketmqService/bin/runserver.cmd +++ /dev/null @@ -1,37 +0,0 @@ -@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;%CLASSPATH% - -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" -set "JAVA_OPT=%JAVA_OPT% -XX:-OmitStackTraceInFastThrow" -set "JAVA_OPT=%JAVA_OPT% -XX:-UseLargePages" -set "JAVA_OPT=%JAVA_OPT% -Djava.ext.dirs=%BASE_DIR%lib" -set "JAVA_OPT=%JAVA_OPT% -cp "%CLASSPATH%"" - -"%JAVA%" %JAVA_OPT% %* \ No newline at end of file diff --git a/rocketmqService/bin/runserver.sh b/rocketmqService/bin/runserver.sh deleted file mode 100644 index d2bbdedb..00000000 --- a/rocketmqService/bin/runserver.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/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 -} - -[ ! -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:${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_log_directory - -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" -JAVA_OPT="${JAVA_OPT} -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=30m" -JAVA_OPT="${JAVA_OPT} -XX:-OmitStackTraceInFastThrow" -JAVA_OPT="${JAVA_OPT} -XX:-UseLargePages" -JAVA_OPT="${JAVA_OPT} -Djava.ext.dirs=${JAVA_HOME}/jre/lib/ext:${BASE_DIR}/lib" -#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} $@ diff --git a/rocketmqService/bin/setcache.sh b/rocketmqService/bin/setcache.sh deleted file mode 100644 index 27633f32..00000000 --- a/rocketmqService/bin/setcache.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/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 diff --git a/rocketmqService/bin/startfsrv.sh b/rocketmqService/bin/startfsrv.sh deleted file mode 100644 index f7ba1883..00000000 --- a/rocketmqService/bin/startfsrv.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/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 $@ & diff --git a/rocketmqService/bin/tools.cmd b/rocketmqService/bin/tools.cmd deleted file mode 100644 index c61fbcf8..00000000 --- a/rocketmqService/bin/tools.cmd +++ /dev/null @@ -1,35 +0,0 @@ -@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;%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% -Djava.ext.dirs="%BASE_DIR%\lib";"%JAVA_HOME%\jre\lib\ext";"%JAVA_HOME%\lib\ext"" -set "JAVA_OPT=%JAVA_OPT% -cp "%CLASSPATH%"" - -"%JAVA%" %JAVA_OPT% %* diff --git a/rocketmqService/bin/tools.sh b/rocketmqService/bin/tools.sh deleted file mode 100644 index 071794c6..00000000 --- a/rocketmqService/bin/tools.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/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 -} - -[ ! -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:${CLASSPATH} - -#=========================================================================================== -# JVM Configuration -#=========================================================================================== -JAVA_OPT="${JAVA_OPT} -server -Xms1g -Xmx1g -Xmn256m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=128m" -JAVA_OPT="${JAVA_OPT} -Djava.ext.dirs=${BASE_DIR}/lib:${JAVA_HOME}/jre/lib/ext:${JAVA_HOME}/lib/ext" -JAVA_OPT="${JAVA_OPT} -cp ${CLASSPATH}" - -$JAVA ${JAVA_OPT} $@ diff --git a/rocketmqService/conf/2m-2s-async/broker-a-s.properties b/rocketmqService/conf/2m-2s-async/broker-a-s.properties deleted file mode 100644 index 0e3388b8..00000000 --- a/rocketmqService/conf/2m-2s-async/broker-a-s.properties +++ /dev/null @@ -1,21 +0,0 @@ -# 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 diff --git a/rocketmqService/conf/2m-2s-async/broker-a.properties b/rocketmqService/conf/2m-2s-async/broker-a.properties deleted file mode 100644 index b704b54c..00000000 --- a/rocketmqService/conf/2m-2s-async/broker-a.properties +++ /dev/null @@ -1,21 +0,0 @@ -# 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 diff --git a/rocketmqService/conf/2m-2s-async/broker-b-s.properties b/rocketmqService/conf/2m-2s-async/broker-b-s.properties deleted file mode 100644 index 6c6beab2..00000000 --- a/rocketmqService/conf/2m-2s-async/broker-b-s.properties +++ /dev/null @@ -1,21 +0,0 @@ -# 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 diff --git a/rocketmqService/conf/2m-2s-async/broker-b.properties b/rocketmqService/conf/2m-2s-async/broker-b.properties deleted file mode 100644 index 130671a7..00000000 --- a/rocketmqService/conf/2m-2s-async/broker-b.properties +++ /dev/null @@ -1,21 +0,0 @@ -# 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 diff --git a/rocketmqService/conf/2m-2s-sync/broker-a-s.properties b/rocketmqService/conf/2m-2s-sync/broker-a-s.properties deleted file mode 100644 index 0e3388b8..00000000 --- a/rocketmqService/conf/2m-2s-sync/broker-a-s.properties +++ /dev/null @@ -1,21 +0,0 @@ -# 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 diff --git a/rocketmqService/conf/2m-2s-sync/broker-a.properties b/rocketmqService/conf/2m-2s-sync/broker-a.properties deleted file mode 100644 index fba30fa1..00000000 --- a/rocketmqService/conf/2m-2s-sync/broker-a.properties +++ /dev/null @@ -1,21 +0,0 @@ -# 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 diff --git a/rocketmqService/conf/2m-2s-sync/broker-b-s.properties b/rocketmqService/conf/2m-2s-sync/broker-b-s.properties deleted file mode 100644 index 6c6beab2..00000000 --- a/rocketmqService/conf/2m-2s-sync/broker-b-s.properties +++ /dev/null @@ -1,21 +0,0 @@ -# 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 diff --git a/rocketmqService/conf/2m-2s-sync/broker-b.properties b/rocketmqService/conf/2m-2s-sync/broker-b.properties deleted file mode 100644 index ab925a81..00000000 --- a/rocketmqService/conf/2m-2s-sync/broker-b.properties +++ /dev/null @@ -1,21 +0,0 @@ -# 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 diff --git a/rocketmqService/conf/2m-noslave/broker-a.properties b/rocketmqService/conf/2m-noslave/broker-a.properties deleted file mode 100644 index b704b54c..00000000 --- a/rocketmqService/conf/2m-noslave/broker-a.properties +++ /dev/null @@ -1,21 +0,0 @@ -# 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 diff --git a/rocketmqService/conf/2m-noslave/broker-b.properties b/rocketmqService/conf/2m-noslave/broker-b.properties deleted file mode 100644 index 130671a7..00000000 --- a/rocketmqService/conf/2m-noslave/broker-b.properties +++ /dev/null @@ -1,21 +0,0 @@ -# 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 diff --git a/rocketmqService/conf/2m-noslave/broker-trace.properties b/rocketmqService/conf/2m-noslave/broker-trace.properties deleted file mode 100644 index 9dd57a73..00000000 --- a/rocketmqService/conf/2m-noslave/broker-trace.properties +++ /dev/null @@ -1,23 +0,0 @@ -# -# 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 diff --git a/rocketmqService/conf/broker.conf b/rocketmqService/conf/broker.conf deleted file mode 100644 index 0c0b28b7..00000000 --- a/rocketmqService/conf/broker.conf +++ /dev/null @@ -1,22 +0,0 @@ -# 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 diff --git a/rocketmqService/conf/dledger/broker-n0.conf b/rocketmqService/conf/dledger/broker-n0.conf deleted file mode 100644 index 5351e497..00000000 --- a/rocketmqService/conf/dledger/broker-n0.conf +++ /dev/null @@ -1,27 +0,0 @@ -# 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 diff --git a/rocketmqService/conf/dledger/broker-n1.conf b/rocketmqService/conf/dledger/broker-n1.conf deleted file mode 100644 index 6aaf8f93..00000000 --- a/rocketmqService/conf/dledger/broker-n1.conf +++ /dev/null @@ -1,27 +0,0 @@ -# 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 diff --git a/rocketmqService/conf/dledger/broker-n2.conf b/rocketmqService/conf/dledger/broker-n2.conf deleted file mode 100644 index c863d89e..00000000 --- a/rocketmqService/conf/dledger/broker-n2.conf +++ /dev/null @@ -1,27 +0,0 @@ -# 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 diff --git a/rocketmqService/conf/logback_broker.xml b/rocketmqService/conf/logback_broker.xml deleted file mode 100644 index 9d1a6b17..00000000 --- a/rocketmqService/conf/logback_broker.xml +++ /dev/null @@ -1,337 +0,0 @@ - - - - - - ${user.home}/logs/rocketmqlogs/broker_default.log - true - - ${user.home}/logs/rocketmqlogs/otherdays/broker_default.%i.log.gz - 1 - 10 - - - 100MB - - - %d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n - UTF-8 - - - - - ${user.home}/logs/rocketmqlogs/broker.log - true - - ${user.home}/logs/rocketmqlogs/otherdays/broker.%i.log.gz - 1 - 20 - - - 128MB - - - %d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n - UTF-8 - - - - - - - - ${user.home}/logs/rocketmqlogs/protection.log - true - - ${user.home}/logs/rocketmqlogs/otherdays/protection.%i.log.gz - 1 - 10 - - - 100MB - - - %d{yyy-MM-dd HH:mm:ss,GMT+8} - %m%n - UTF-8 - - - - - - - - ${user.home}/logs/rocketmqlogs/watermark.log - true - - ${user.home}/logs/rocketmqlogs/otherdays/watermark.%i.log.gz - 1 - 10 - - - 100MB - - - %d{yyy-MM-dd HH:mm:ss,GMT+8} - %m%n - UTF-8 - - - - - - - - ${user.home}/logs/rocketmqlogs/store.log - true - - ${user.home}/logs/rocketmqlogs/otherdays/store.%i.log.gz - 1 - 10 - - - 128MB - - - %d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n - UTF-8 - - - - - - - - ${user.home}/logs/rocketmqlogs/remoting.log - true - - ${user.home}/logs/rocketmqlogs/otherdays/remoting.%i.log.gz - 1 - 10 - - - 100MB - - - %d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n - UTF-8 - - - - - - - - ${user.home}/logs/rocketmqlogs/storeerror.log - true - - ${user.home}/logs/rocketmqlogs/otherdays/storeerror.%i.log.gz - 1 - 10 - - - 100MB - - - %d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n - UTF-8 - - - - - - - - - ${user.home}/logs/rocketmqlogs/transaction.log - true - - ${user.home}/logs/rocketmqlogs/otherdays/transaction.%i.log.gz - 1 - 10 - - - 100MB - - - %d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n - UTF-8 - - - - - - - - ${user.home}/logs/rocketmqlogs/lock.log - true - - ${user.home}/logs/rocketmqlogs/otherdays/lock.%i.log.gz - 1 - 5 - - - 100MB - - - %d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n - UTF-8 - - - - - - - - ${user.home}/logs/rocketmqlogs/filter.log - true - - ${user.home}/logs/rocketmqlogs/otherdays/filter.%i.log.gz - 1 - 10 - - - 100MB - - - %d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n - UTF-8 - - - - - - - - ${user.home}/logs/rocketmqlogs/stats.log - true - - ${user.home}/logs/rocketmqlogs/otherdays/stats.%i.log.gz - 1 - 5 - - - 100MB - - - %d{yyy-MM-dd HH:mm:ss,GMT+8} %p - %m%n - UTF-8 - - - - - ${user.home}/logs/rocketmqlogs/commercial.log - true - - ${user.home}/logs/rocketmqlogs/otherdays/commercial.%i.log.gz - 1 - 10 - - - 500MB - - - - - true - - %d{yyy-MM-dd HH\:mm\:ss,GMT+8} %p %t - %m%n - UTF-8 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rocketmqService/conf/logback_namesrv.xml b/rocketmqService/conf/logback_namesrv.xml deleted file mode 100644 index 36eda680..00000000 --- a/rocketmqService/conf/logback_namesrv.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - ${user.home}/logs/rocketmqlogs/namesrv_default.log - true - - ${user.home}/logs/rocketmqlogs/otherdays/namesrv_default.%i.log.gz - 1 - 5 - - - 100MB - - - %d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n - UTF-8 - - - - - ${user.home}/logs/rocketmqlogs/namesrv.log - true - - ${user.home}/logs/rocketmqlogs/otherdays/namesrv.%i.log.gz - 1 - 5 - - - 100MB - - - %d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n - UTF-8 - - - - - 0 - - - - true - - %d{yyy-MM-dd HH\:mm\:ss,SSS} %p %t - %m%n - UTF-8 - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rocketmqService/conf/logback_tools.xml b/rocketmqService/conf/logback_tools.xml deleted file mode 100644 index 28283ad1..00000000 --- a/rocketmqService/conf/logback_tools.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - ${user.home}/logs/rocketmqlogs/tools_default.log - true - - ${user.home}/logs/rocketmqlogs/otherdays/tools_default.%i.log.gz - 1 - 5 - - - 100MB - - - %d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n - UTF-8 - - - - - ${user.home}/logs/rocketmqlogs/tools.log - true - - ${user.home}/logs/rocketmqlogs/otherdays/tools.%i.log.gz - 1 - 5 - - - 100MB - - - %d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n - UTF-8 - - - - - - - - - true - - %d{yyy-MM-dd HH\:mm\:ss,GMT+8} %p %t - %m%n - UTF-8 - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rocketmqService/conf/plain_acl.yml b/rocketmqService/conf/plain_acl.yml deleted file mode 100644 index 5a44fbe3..00000000 --- a/rocketmqService/conf/plain_acl.yml +++ /dev/null @@ -1,42 +0,0 @@ -# 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 - diff --git a/rocketmqService/conf/tools.yml b/rocketmqService/conf/tools.yml deleted file mode 100644 index 9a372593..00000000 --- a/rocketmqService/conf/tools.yml +++ /dev/null @@ -1,19 +0,0 @@ -# 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 - diff --git a/rocketmqService/lib/commons-beanutils-1.9.2.jar b/rocketmqService/lib/commons-beanutils-1.9.2.jar deleted file mode 100644 index 7d075edf..00000000 Binary files a/rocketmqService/lib/commons-beanutils-1.9.2.jar and /dev/null differ diff --git a/rocketmqService/lib/commons-cli-1.2.jar b/rocketmqService/lib/commons-cli-1.2.jar deleted file mode 100644 index ce4b9fff..00000000 Binary files a/rocketmqService/lib/commons-cli-1.2.jar and /dev/null differ diff --git a/rocketmqService/lib/commons-codec-1.9.jar b/rocketmqService/lib/commons-codec-1.9.jar deleted file mode 100644 index ef35f1c5..00000000 Binary files a/rocketmqService/lib/commons-codec-1.9.jar and /dev/null differ diff --git a/rocketmqService/lib/commons-collections-3.2.2.jar b/rocketmqService/lib/commons-collections-3.2.2.jar deleted file mode 100644 index fa5df82a..00000000 Binary files a/rocketmqService/lib/commons-collections-3.2.2.jar and /dev/null differ diff --git a/rocketmqService/lib/commons-digester-1.8.1.jar b/rocketmqService/lib/commons-digester-1.8.1.jar deleted file mode 100644 index 7abda969..00000000 Binary files a/rocketmqService/lib/commons-digester-1.8.1.jar and /dev/null differ diff --git a/rocketmqService/lib/commons-lang3-3.4.jar b/rocketmqService/lib/commons-lang3-3.4.jar deleted file mode 100644 index 8ec91d45..00000000 Binary files a/rocketmqService/lib/commons-lang3-3.4.jar and /dev/null differ diff --git a/rocketmqService/lib/commons-logging-1.2.jar b/rocketmqService/lib/commons-logging-1.2.jar deleted file mode 100644 index 93a3b9f6..00000000 Binary files a/rocketmqService/lib/commons-logging-1.2.jar and /dev/null differ diff --git a/rocketmqService/lib/commons-validator-1.6.jar b/rocketmqService/lib/commons-validator-1.6.jar deleted file mode 100644 index c5526e93..00000000 Binary files a/rocketmqService/lib/commons-validator-1.6.jar and /dev/null differ diff --git a/rocketmqService/lib/dledger-0.1.jar b/rocketmqService/lib/dledger-0.1.jar deleted file mode 100644 index a963dba8..00000000 Binary files a/rocketmqService/lib/dledger-0.1.jar and /dev/null differ diff --git a/rocketmqService/lib/fastjson-1.2.61.jar b/rocketmqService/lib/fastjson-1.2.61.jar deleted file mode 100644 index 5d1ff664..00000000 Binary files a/rocketmqService/lib/fastjson-1.2.61.jar and /dev/null differ diff --git a/rocketmqService/lib/guava-19.0.jar b/rocketmqService/lib/guava-19.0.jar deleted file mode 100644 index b175ca86..00000000 Binary files a/rocketmqService/lib/guava-19.0.jar and /dev/null differ diff --git a/rocketmqService/lib/javassist-3.20.0-GA.jar b/rocketmqService/lib/javassist-3.20.0-GA.jar deleted file mode 100644 index 0f1ff725..00000000 Binary files a/rocketmqService/lib/javassist-3.20.0-GA.jar and /dev/null differ diff --git a/rocketmqService/lib/jcommander-1.72.jar b/rocketmqService/lib/jcommander-1.72.jar deleted file mode 100644 index acb8e609..00000000 Binary files a/rocketmqService/lib/jcommander-1.72.jar and /dev/null differ diff --git a/rocketmqService/lib/jna-4.2.2.jar b/rocketmqService/lib/jna-4.2.2.jar deleted file mode 100644 index a9436709..00000000 Binary files a/rocketmqService/lib/jna-4.2.2.jar and /dev/null differ diff --git a/rocketmqService/lib/logback-classic-1.0.13.jar b/rocketmqService/lib/logback-classic-1.0.13.jar deleted file mode 100644 index 80bf5d15..00000000 Binary files a/rocketmqService/lib/logback-classic-1.0.13.jar and /dev/null differ diff --git a/rocketmqService/lib/logback-core-1.0.13.jar b/rocketmqService/lib/logback-core-1.0.13.jar deleted file mode 100644 index 568ccfaa..00000000 Binary files a/rocketmqService/lib/logback-core-1.0.13.jar and /dev/null differ diff --git a/rocketmqService/lib/netty-all-4.0.42.Final.jar b/rocketmqService/lib/netty-all-4.0.42.Final.jar deleted file mode 100644 index 53da45fe..00000000 Binary files a/rocketmqService/lib/netty-all-4.0.42.Final.jar and /dev/null differ diff --git a/rocketmqService/lib/netty-tcnative-boringssl-static-1.1.33.Fork26.jar b/rocketmqService/lib/netty-tcnative-boringssl-static-1.1.33.Fork26.jar deleted file mode 100644 index e2f35ce8..00000000 Binary files a/rocketmqService/lib/netty-tcnative-boringssl-static-1.1.33.Fork26.jar and /dev/null differ diff --git a/rocketmqService/lib/openmessaging-api-0.3.1-alpha.jar b/rocketmqService/lib/openmessaging-api-0.3.1-alpha.jar deleted file mode 100644 index 2f7f6896..00000000 Binary files a/rocketmqService/lib/openmessaging-api-0.3.1-alpha.jar and /dev/null differ diff --git a/rocketmqService/lib/rocketmq-acl-4.6.0.jar b/rocketmqService/lib/rocketmq-acl-4.6.0.jar deleted file mode 100644 index 4f23e683..00000000 Binary files a/rocketmqService/lib/rocketmq-acl-4.6.0.jar and /dev/null differ diff --git a/rocketmqService/lib/rocketmq-broker-4.6.0.jar b/rocketmqService/lib/rocketmq-broker-4.6.0.jar deleted file mode 100644 index 0f426f17..00000000 Binary files a/rocketmqService/lib/rocketmq-broker-4.6.0.jar and /dev/null differ diff --git a/rocketmqService/lib/rocketmq-client-4.6.0.jar b/rocketmqService/lib/rocketmq-client-4.6.0.jar deleted file mode 100644 index c0badc5d..00000000 Binary files a/rocketmqService/lib/rocketmq-client-4.6.0.jar and /dev/null differ diff --git a/rocketmqService/lib/rocketmq-common-4.6.0.jar b/rocketmqService/lib/rocketmq-common-4.6.0.jar deleted file mode 100644 index 0d400582..00000000 Binary files a/rocketmqService/lib/rocketmq-common-4.6.0.jar and /dev/null differ diff --git a/rocketmqService/lib/rocketmq-example-4.6.0.jar b/rocketmqService/lib/rocketmq-example-4.6.0.jar deleted file mode 100644 index 318217f5..00000000 Binary files a/rocketmqService/lib/rocketmq-example-4.6.0.jar and /dev/null differ diff --git a/rocketmqService/lib/rocketmq-filter-4.6.0.jar b/rocketmqService/lib/rocketmq-filter-4.6.0.jar deleted file mode 100644 index 1a96545f..00000000 Binary files a/rocketmqService/lib/rocketmq-filter-4.6.0.jar and /dev/null differ diff --git a/rocketmqService/lib/rocketmq-logging-4.6.0.jar b/rocketmqService/lib/rocketmq-logging-4.6.0.jar deleted file mode 100644 index ad403175..00000000 Binary files a/rocketmqService/lib/rocketmq-logging-4.6.0.jar and /dev/null differ diff --git a/rocketmqService/lib/rocketmq-namesrv-4.6.0.jar b/rocketmqService/lib/rocketmq-namesrv-4.6.0.jar deleted file mode 100644 index 28914f66..00000000 Binary files a/rocketmqService/lib/rocketmq-namesrv-4.6.0.jar and /dev/null differ diff --git a/rocketmqService/lib/rocketmq-openmessaging-4.6.0.jar b/rocketmqService/lib/rocketmq-openmessaging-4.6.0.jar deleted file mode 100644 index 7ca3f413..00000000 Binary files a/rocketmqService/lib/rocketmq-openmessaging-4.6.0.jar and /dev/null differ diff --git a/rocketmqService/lib/rocketmq-remoting-4.6.0.jar b/rocketmqService/lib/rocketmq-remoting-4.6.0.jar deleted file mode 100644 index 7be5b657..00000000 Binary files a/rocketmqService/lib/rocketmq-remoting-4.6.0.jar and /dev/null differ diff --git a/rocketmqService/lib/rocketmq-srvutil-4.6.0.jar b/rocketmqService/lib/rocketmq-srvutil-4.6.0.jar deleted file mode 100644 index 9f10fe0f..00000000 Binary files a/rocketmqService/lib/rocketmq-srvutil-4.6.0.jar and /dev/null differ diff --git a/rocketmqService/lib/rocketmq-store-4.6.0.jar b/rocketmqService/lib/rocketmq-store-4.6.0.jar deleted file mode 100644 index 0c581bd6..00000000 Binary files a/rocketmqService/lib/rocketmq-store-4.6.0.jar and /dev/null differ diff --git a/rocketmqService/lib/rocketmq-tools-4.6.0.jar b/rocketmqService/lib/rocketmq-tools-4.6.0.jar deleted file mode 100644 index d06538c6..00000000 Binary files a/rocketmqService/lib/rocketmq-tools-4.6.0.jar and /dev/null differ diff --git a/rocketmqService/lib/slf4j-api-1.7.7.jar b/rocketmqService/lib/slf4j-api-1.7.7.jar deleted file mode 100644 index bebabd96..00000000 Binary files a/rocketmqService/lib/slf4j-api-1.7.7.jar and /dev/null differ diff --git a/rocketmqService/lib/snakeyaml-1.19.jar b/rocketmqService/lib/snakeyaml-1.19.jar deleted file mode 100644 index 7c73a760..00000000 Binary files a/rocketmqService/lib/snakeyaml-1.19.jar and /dev/null differ diff --git a/yshop-app/src/main/java/co/yixiang/modules/shop/rest/IndexController.java b/yshop-app/src/main/java/co/yixiang/modules/shop/rest/IndexController.java index 5d46b02a..356027bd 100644 --- a/yshop-app/src/main/java/co/yixiang/modules/shop/rest/IndexController.java +++ b/yshop-app/src/main/java/co/yixiang/modules/shop/rest/IndexController.java @@ -33,7 +33,6 @@ import co.yixiang.utils.RedisUtil; import co.yixiang.utils.ShopKeyUtils; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; -import io.netty.handler.codec.http.multipart.HttpData; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; diff --git a/yshop-app/src/main/resources/config/application-dev.yml b/yshop-app/src/main/resources/config/application-dev.yml index 13395177..89e2b77b 100644 --- a/yshop-app/src/main/resources/config/application-dev.yml +++ b/yshop-app/src/main/resources/config/application-dev.yml @@ -7,7 +7,7 @@ spring: master: url: jdbc:mysql://localhost:3306/yshopb2c?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8 username: root - password: root + password: 123456 # 从库数据源 slave: # 从数据源开关/默认关闭 diff --git a/yshop-app/src/main/resources/config/application.yml b/yshop-app/src/main/resources/config/application.yml index db82e3ea..f62174fc 100644 --- a/yshop-app/src/main/resources/config/application.yml +++ b/yshop-app/src/main/resources/config/application.yml @@ -29,12 +29,7 @@ spring: # dialect: org.hibernate.dialect.MySQL5InnoDBDialect # open-in-view: true -#配置rocketmq -#rocketmq: -# nameServer: localhost:9876 -# producer: -# group: yshop-group -# sendMessageTimeout: 300000 + diff --git a/yshop-message/pom.xml b/yshop-message/pom.xml index 1dde14cb..71731b9d 100644 --- a/yshop-message/pom.xml +++ b/yshop-message/pom.xml @@ -18,11 +18,6 @@ yshop-mall 3.1 - - org.apache.rocketmq - rocketmq-spring-boot-starter - 2.0.4 - diff --git a/yshop-message/src/main/java/co/yixiang/message/rocketmq/MqConsumer.java b/yshop-message/src/main/java/co/yixiang/message/rocketmq/MqConsumer.java deleted file mode 100644 index d3c90804..00000000 --- a/yshop-message/src/main/java/co/yixiang/message/rocketmq/MqConsumer.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (C) 2018-2020 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制,未经购买不得使用 - * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) - * 一经发现盗用、分享等行为,将追究法律责任,后果自负 - */ -package co.yixiang.message.rocketmq; - -import co.yixiang.enums.OrderInfoEnum; -import co.yixiang.modules.order.domain.YxStoreOrder; -import co.yixiang.modules.order.service.YxStoreOrderService; -import lombok.AllArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.apache.rocketmq.spring.core.RocketMQListener; - -/** - * @ClassName 消费者 - * @Author hupeng <610796224@qq.com> - * @Date 2020/1/1 - **/ -//@Component -//@RocketMQMessageListener( -// topic = "yshop-topic", -// consumerGroup = "yshop-group", -// selectorExpression = "*" -//) -@Slf4j -@AllArgsConstructor -public class MqConsumer implements RocketMQListener { - - private final YxStoreOrderService storeOrderService; - - @Override - public void onMessage(String msg) { - log.info("系统开始处理延时任务---订单超时未付款---订单id:" + msg); - - Long id = Long.valueOf(msg); - - YxStoreOrder order = storeOrderService.lambdaQuery() - .eq(YxStoreOrder::getId, id) - .eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_0.getValue()) - .one(); - - //只有待支付的订单能取消 - if(order != null){ - storeOrderService.cancelOrder(order.getOrderId(),null); - log.info("订单id:{},未在规定时间支付取消成功",id); - } - - log.info("=====处理成功======"); - - } -} diff --git a/yshop-message/src/main/java/co/yixiang/message/rocketmq/MqProducer.java b/yshop-message/src/main/java/co/yixiang/message/rocketmq/MqProducer.java deleted file mode 100644 index 681ea173..00000000 --- a/yshop-message/src/main/java/co/yixiang/message/rocketmq/MqProducer.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Copyright (C) 2018-2020 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制,未经购买不得使用 - * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) - * 一经发现盗用、分享等行为,将追究法律责任,后果自负 - */ -package co.yixiang.message.rocketmq; - -import co.yixiang.exception.ErrorRequestException; -import lombok.AllArgsConstructor; -import org.apache.rocketmq.client.exception.MQBrokerException; -import org.apache.rocketmq.client.exception.MQClientException; -import org.apache.rocketmq.client.producer.DefaultMQProducer; -import org.apache.rocketmq.common.message.Message; -import org.apache.rocketmq.remoting.exception.RemotingException; -import org.apache.rocketmq.spring.core.RocketMQTemplate; - -/** - * @ClassName 生成者 - * @Author hupeng <610796224@qq.com> - * @Date 2020/1/1 - **/ -//@Component -@AllArgsConstructor -public class MqProducer { - //注入rocketMQ的模板 - private final RocketMQTemplate rocketMQTemplate; - - - /** - * 发送延时消息10分钟 - * - * @param topic 主题 - * @param msg 消息 - */ - public void sendMsg(String topic, String msg) { - DefaultMQProducer defaultMQProducer = rocketMQTemplate.getProducer(); - - Message message = new Message(topic,msg.getBytes()); - message.setDelayTimeLevel(14); - - try { - defaultMQProducer.send(message); - } catch (MQClientException e) { - throw new ErrorRequestException("RocketMQ服务没启动哦"); - } catch (RemotingException e) { - e.printStackTrace(); - } catch (MQBrokerException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - -} diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/listener/TemplateListener.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/listener/TemplateListener.java index 333d5064..cffbca74 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/listener/TemplateListener.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/listener/TemplateListener.java @@ -18,7 +18,6 @@ import co.yixiang.enums.PayTypeEnum; import co.yixiang.event.TemplateBean; import co.yixiang.event.TemplateEvent; import co.yixiang.event.TemplateListenEnum; -import co.yixiang.message.rocketmq.MqProducer; import co.yixiang.modules.activity.domain.YxUserExtract; import co.yixiang.modules.activity.service.YxUserExtractService; import co.yixiang.modules.customer.domain.YxStoreCustomer;