You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "joeCarf (via GitHub)" <gi...@apache.org> on 2023/08/26 10:21:04 UTC

[GitHub] [rocketmq] joeCarf opened a new pull request, #7266: [ISSUE 7265] Doc: Adding how to debug in Idea document

joeCarf opened a new pull request, #7266:
URL: https://github.com/apache/rocketmq/pull/7266

   <!-- Please make sure the target branch is right. In most case, the target branch should be `develop`. -->
   
   ### Which Issue(s) This PR Fixes
   
   <!-- Please ensure that the related issue has already been created, and [link this pull request to that issue using keywords](<https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword>) to ensure automatic closure. -->
   
   Fixes #7265 
   
   ### Brief Description
   Adding how to debug rocketmq in Idea document
   
   <!-- Write a brief description for your pull request to help the maintainer understand the reasons behind your changes. -->
   
   ### How Did You Test This Change?
   no need to test
   <!-- In order to ensure the code quality of Apache RocketMQ, we expect every pull request to have undergone thorough testing. -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE 7265] Doc: Adding how to debug in Idea document [rocketmq]

Posted by "joeCarf (via GitHub)" <gi...@apache.org>.
joeCarf commented on PR #7266:
URL: https://github.com/apache/rocketmq/pull/7266#issuecomment-1748038258

   > 也来个英语版?
   
   done!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE 7265] Doc: Adding how to debug in Idea document [rocketmq]

Posted by "Diwakar-Gupta (via GitHub)" <gi...@apache.org>.
Diwakar-Gupta commented on code in PR #7266:
URL: https://github.com/apache/rocketmq/pull/7266#discussion_r1347424375


##########
docs/en/Debug_In_Idea.md:
##########
@@ -0,0 +1,55 @@
+## How to Debug RocketMQ in Idea
+
+### Step0: Resolve dependencies
+1. To download the Maven dependencies required for running RocketMQ, you can use the following command:`mvn clean install -Dmaven.test.skip=true`
+2. Ensure successful local compilation.
+
+### Step1: Start NameServer
+1. The startup class for NameServer is located in `org.apache.rocketmq.namesrv.NamesrvStartup`.
+2. Add runtime `ROCKETMQ_HOME=<rocketmq repository directory>` parameters in `Idea-Edit Configurations`.
+![Idea_config_nameserver.png](../cn/image/Idea_config_nameserver.png)
+3. Run NameServer and if the following log output is observed, it indicates successful startup.
+```shell
+The Name Server boot success. serializeType=JSON, address 0.0.0.0:9876
+```
+
+### Step2: Start Broker
+1. The startup class for Broker is located in`org.apache.rocketmq.broker.BrokerStartup`
+2. Create the `/rocketmq/conf/broker.conf` file or simply copy it from the official release package.
+```shell
+# broker.conf
+
+brokerClusterName = DefaultCluster
+brokerName = broker-a
+brokerId = 0
+deleteWhen = 04
+fileReservedTime = 48
+brokerRole = ASYNC_MASTER
+flushDiskType = ASYNC_FLUSH
+namesrvAddr = 127.0.0.1:9876 # name server地址
+```
+3. Add the runtime parameter `ROCKETMQ_HOME=<rocketmq repository directory>` and the environment variable `-c /Users/xxx/rocketmq/conf/broker.conf` in `Idea-Edit Configurations`.
+![Idea_config_broker.png](../cn/image/Idea_config_broker.png)
+4. Run the Broker and if the following log is observed, it indicates successful startup.
+```shell
+The broker[broker-a,192.169.1.2:10911] boot success...
+```
+
+### Step3: Send or Consume Messages
+RocketMQ startup is now complete. You can use the examples provided in `/example` to send and consume messages.
+
+### Additional: Start the Proxy locally.
+1. RocketMQ 5.x introduced the Proxy mode. Using the `LOCAL` mode eliminates the need for `Step2`. The startup class is located at `org.apache.rocketmq.proxy.ProxyStartup`.
+2. Add the runtime parameter `ROCKETMQ_HOME=<rocketmq repository directory>` in `Idea-Edit Configurations`.
+3. Create a new configuration file named `rmq-proxy.json` in the `/conf/` directory.

Review Comment:
   In local mode we are running both proxy and broker so we also need to add `conf/broker.conf` ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] codecov-commenter commented on pull request #7266: [ISSUE 7265] Doc: Adding how to debug in Idea document

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #7266:
URL: https://github.com/apache/rocketmq/pull/7266#issuecomment-1694255088

   ## [Codecov](https://app.codecov.io/gh/apache/rocketmq/pull/7266?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#7266](https://app.codecov.io/gh/apache/rocketmq/pull/7266?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (94bfb48) into [develop](https://app.codecov.io/gh/apache/rocketmq/commit/5f6dc90f9dab35809fcb0407d4d5cc2737d2335e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (5f6dc90) will **increase** coverage by `0.05%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@              Coverage Diff              @@
   ##             develop    #7266      +/-   ##
   =============================================
   + Coverage      42.61%   42.66%   +0.05%     
   - Complexity      9415     9421       +6     
   =============================================
     Files           1152     1152              
     Lines          82355    82355              
     Branches       10723    10723              
   =============================================
   + Hits           35093    35137      +44     
   + Misses         42886    42844      -42     
   + Partials        4376     4374       -2     
   ```
   
   
   [see 13 files with indirect coverage changes](https://app.codecov.io/gh/apache/rocketmq/pull/7266/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE 7265] Doc: Adding how to debug in Idea document [rocketmq]

Posted by "xdkxlk (via GitHub)" <gi...@apache.org>.
xdkxlk merged PR #7266:
URL: https://github.com/apache/rocketmq/pull/7266


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE 7265] Doc: Adding how to debug in Idea document [rocketmq]

Posted by "joeCarf (via GitHub)" <gi...@apache.org>.
joeCarf commented on code in PR #7266:
URL: https://github.com/apache/rocketmq/pull/7266#discussion_r1349461720


##########
docs/en/Debug_In_Idea.md:
##########
@@ -0,0 +1,55 @@
+## How to Debug RocketMQ in Idea
+
+### Step0: Resolve dependencies
+1. To download the Maven dependencies required for running RocketMQ, you can use the following command:`mvn clean install -Dmaven.test.skip=true`
+2. Ensure successful local compilation.
+
+### Step1: Start NameServer
+1. The startup class for NameServer is located in `org.apache.rocketmq.namesrv.NamesrvStartup`.
+2. Add runtime `ROCKETMQ_HOME=<rocketmq repository directory>` parameters in `Idea-Edit Configurations`.
+![Idea_config_nameserver.png](../cn/image/Idea_config_nameserver.png)
+3. Run NameServer and if the following log output is observed, it indicates successful startup.
+```shell
+The Name Server boot success. serializeType=JSON, address 0.0.0.0:9876
+```
+
+### Step2: Start Broker
+1. The startup class for Broker is located in`org.apache.rocketmq.broker.BrokerStartup`
+2. Create the `/rocketmq/conf/broker.conf` file or simply copy it from the official release package.
+```shell
+# broker.conf
+
+brokerClusterName = DefaultCluster
+brokerName = broker-a
+brokerId = 0
+deleteWhen = 04
+fileReservedTime = 48
+brokerRole = ASYNC_MASTER
+flushDiskType = ASYNC_FLUSH
+namesrvAddr = 127.0.0.1:9876 # name server地址
+```
+3. Add the runtime parameter `ROCKETMQ_HOME=<rocketmq repository directory>` and the environment variable `-c /Users/xxx/rocketmq/conf/broker.conf` in `Idea-Edit Configurations`.
+![Idea_config_broker.png](../cn/image/Idea_config_broker.png)
+4. Run the Broker and if the following log is observed, it indicates successful startup.
+```shell
+The broker[broker-a,192.169.1.2:10911] boot success...
+```
+
+### Step3: Send or Consume Messages
+RocketMQ startup is now complete. You can use the examples provided in `/example` to send and consume messages.
+
+### Additional: Start the Proxy locally.
+1. RocketMQ 5.x introduced the Proxy mode. Using the `LOCAL` mode eliminates the need for `Step2`. The startup class is located at `org.apache.rocketmq.proxy.ProxyStartup`.
+2. Add the runtime parameter `ROCKETMQ_HOME=<rocketmq repository directory>` in `Idea-Edit Configurations`.
+3. Create a new configuration file named `rmq-proxy.json` in the `/conf/` directory.

Review Comment:
   <img width="879" alt="截屏2023-10-07 12 54 37" src="https://github.com/apache/rocketmq/assets/52153761/73ea49fb-0a1b-4ea0-bde0-9431a25224a7">
   in proxy mode, if not set, the broker conf path will be set as default



##########
docs/en/Debug_In_Idea.md:
##########
@@ -0,0 +1,55 @@
+## How to Debug RocketMQ in Idea
+
+### Step0: Resolve dependencies
+1. To download the Maven dependencies required for running RocketMQ, you can use the following command:`mvn clean install -Dmaven.test.skip=true`
+2. Ensure successful local compilation.
+
+### Step1: Start NameServer
+1. The startup class for NameServer is located in `org.apache.rocketmq.namesrv.NamesrvStartup`.
+2. Add runtime `ROCKETMQ_HOME=<rocketmq repository directory>` parameters in `Idea-Edit Configurations`.
+![Idea_config_nameserver.png](../cn/image/Idea_config_nameserver.png)
+3. Run NameServer and if the following log output is observed, it indicates successful startup.
+```shell
+The Name Server boot success. serializeType=JSON, address 0.0.0.0:9876
+```
+
+### Step2: Start Broker
+1. The startup class for Broker is located in`org.apache.rocketmq.broker.BrokerStartup`
+2. Create the `/rocketmq/conf/broker.conf` file or simply copy it from the official release package.
+```shell
+# broker.conf
+
+brokerClusterName = DefaultCluster
+brokerName = broker-a
+brokerId = 0
+deleteWhen = 04
+fileReservedTime = 48
+brokerRole = ASYNC_MASTER
+flushDiskType = ASYNC_FLUSH
+namesrvAddr = 127.0.0.1:9876 # name server地址
+```
+3. Add the runtime parameter `ROCKETMQ_HOME=<rocketmq repository directory>` and the environment variable `-c /Users/xxx/rocketmq/conf/broker.conf` in `Idea-Edit Configurations`.
+![Idea_config_broker.png](../cn/image/Idea_config_broker.png)
+4. Run the Broker and if the following log is observed, it indicates successful startup.
+```shell
+The broker[broker-a,192.169.1.2:10911] boot success...
+```
+
+### Step3: Send or Consume Messages
+RocketMQ startup is now complete. You can use the examples provided in `/example` to send and consume messages.
+
+### Additional: Start the Proxy locally.
+1. RocketMQ 5.x introduced the Proxy mode. Using the `LOCAL` mode eliminates the need for `Step2`. The startup class is located at `org.apache.rocketmq.proxy.ProxyStartup`.
+2. Add the runtime parameter `ROCKETMQ_HOME=<rocketmq repository directory>` in `Idea-Edit Configurations`.
+3. Create a new configuration file named `rmq-proxy.json` in the `/conf/` directory.

Review Comment:
   <img width="879" alt="截屏2023-10-07 12 54 37" src="https://github.com/apache/rocketmq/assets/52153761/73ea49fb-0a1b-4ea0-bde0-9431a25224a7">
   in proxy mode, if not set, the broker conf path will be set as default



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE 7265] Doc: Adding how to debug in Idea document [rocketmq]

Posted by "joeCarf (via GitHub)" <gi...@apache.org>.
joeCarf commented on code in PR #7266:
URL: https://github.com/apache/rocketmq/pull/7266#discussion_r1349461768


##########
docs/en/Debug_In_Idea.md:
##########
@@ -0,0 +1,55 @@
+## How to Debug RocketMQ in Idea
+
+### Step0: Resolve dependencies
+1. To download the Maven dependencies required for running RocketMQ, you can use the following command:`mvn clean install -Dmaven.test.skip=true`
+2. Ensure successful local compilation.
+
+### Step1: Start NameServer
+1. The startup class for NameServer is located in `org.apache.rocketmq.namesrv.NamesrvStartup`.
+2. Add runtime `ROCKETMQ_HOME=<rocketmq repository directory>` parameters in `Idea-Edit Configurations`.
+![Idea_config_nameserver.png](../cn/image/Idea_config_nameserver.png)
+3. Run NameServer and if the following log output is observed, it indicates successful startup.
+```shell
+The Name Server boot success. serializeType=JSON, address 0.0.0.0:9876
+```
+
+### Step2: Start Broker
+1. The startup class for Broker is located in`org.apache.rocketmq.broker.BrokerStartup`
+2. Create the `/rocketmq/conf/broker.conf` file or simply copy it from the official release package.
+```shell
+# broker.conf
+
+brokerClusterName = DefaultCluster
+brokerName = broker-a
+brokerId = 0
+deleteWhen = 04
+fileReservedTime = 48
+brokerRole = ASYNC_MASTER
+flushDiskType = ASYNC_FLUSH
+namesrvAddr = 127.0.0.1:9876 # name server地址
+```
+3. Add the runtime parameter `ROCKETMQ_HOME=<rocketmq repository directory>` and the environment variable `-c /Users/xxx/rocketmq/conf/broker.conf` in `Idea-Edit Configurations`.
+![Idea_config_broker.png](../cn/image/Idea_config_broker.png)
+4. Run the Broker and if the following log is observed, it indicates successful startup.
+```shell
+The broker[broker-a,192.169.1.2:10911] boot success...
+```
+
+### Step3: Send or Consume Messages
+RocketMQ startup is now complete. You can use the examples provided in `/example` to send and consume messages.
+
+### Additional: Start the Proxy locally.
+1. RocketMQ 5.x introduced the Proxy mode. Using the `LOCAL` mode eliminates the need for `Step2`. The startup class is located at `org.apache.rocketmq.proxy.ProxyStartup`.
+2. Add the runtime parameter `ROCKETMQ_HOME=<rocketmq repository directory>` in `Idea-Edit Configurations`.
+3. Create a new configuration file named `rmq-proxy.json` in the `/conf/` directory.

Review Comment:
   so we also need it



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] joeCarf commented on pull request #7266: [ISSUE 7265] Doc: Adding how to debug in Idea document

Posted by "joeCarf (via GitHub)" <gi...@apache.org>.
joeCarf commented on PR #7266:
URL: https://github.com/apache/rocketmq/pull/7266#issuecomment-1694656823

   @RongtongJin @ShannonDing Hi, could you please review this pr? Thanks a lot :)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE 7265] Doc: Adding how to debug in Idea document [rocketmq]

Posted by "joeCarf (via GitHub)" <gi...@apache.org>.
joeCarf commented on PR #7266:
URL: https://github.com/apache/rocketmq/pull/7266#issuecomment-1752590690

   @xdkxlk hi, could you please review this pr :)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE 7265] Doc: Adding how to debug in Idea document [rocketmq]

Posted by "joeCarf (via GitHub)" <gi...@apache.org>.
joeCarf commented on PR #7266:
URL: https://github.com/apache/rocketmq/pull/7266#issuecomment-1746240402

   > 也来个英语版?
   
   Good idea! I will work on it these days


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE 7265] Doc: Adding how to debug in Idea document [rocketmq]

Posted by "joeCarf (via GitHub)" <gi...@apache.org>.
joeCarf commented on PR #7266:
URL: https://github.com/apache/rocketmq/pull/7266#issuecomment-1762596423

   ping @lizhimins @RongtongJin 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org