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

[PR] Client configuration add namespace [rocketmq-clients]

zhaohai666 opened a new pull request, #750:
URL: https://github.com/apache/rocketmq-clients/pull/750

   <!-- Please make sure the target branch is right. In most case, the target branch should be `master`. -->
   
   ### 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 #issue_id
   
   ### Brief Description
   
   <!-- Write a brief description for your pull request to help the maintainer understand the reasons behind your changes. -->
   
   ### How Did You Test This Change?
   
   <!-- 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] Client configuration add namespace [rocketmq-clients]

Posted by "guyinyou (via GitHub)" <gi...@apache.org>.
guyinyou commented on code in PR #750:
URL: https://github.com/apache/rocketmq-clients/pull/750#discussion_r1601244958


##########
nodejs/src/consumer/SimpleConsumer.ts:
##########
@@ -60,8 +60,11 @@ export class SimpleConsumer extends Consumer {
       }
     }
     this.#awaitDuration = options.awaitDuration ?? 30000;
-    this.#simpleSubscriptionSettings = new SimpleSubscriptionSettings(this.clientId, this.endpoints,
-      this.consumerGroup, this.requestTimeout, this.#awaitDuration, this.#subscriptionExpressions);
+    if (options.namespace) {

Review Comment:
   这里给namespace初始化一个空字符串,就不需要多次判空了,proxy侧会兼容空字符串的情况将其认为是默认值



-- 
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] Client configuration add namespace [rocketmq-clients]

Posted by "fengmk2 (via GitHub)" <gi...@apache.org>.
fengmk2 commented on code in PR #750:
URL: https://github.com/apache/rocketmq-clients/pull/750#discussion_r1597398596


##########
nodejs/src/client/BaseClient.ts:
##########
@@ -76,6 +77,7 @@ export abstract class BaseClient {
   readonly clientType = ClientType.CLIENT_TYPE_UNSPECIFIED;
   readonly sslEnabled: boolean;
   readonly #sessionCredentials?: SessionCredentials;
+  readonly namespace?: string = "";

Review Comment:
   `readonly namespace?: string;` 即可,可选属性不需要设置空值。



-- 
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] Client configuration add namespace [rocketmq-clients]

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

   @zhaohai666 codecov 服务最近无法工作了,可以删除它 https://github.com/apache/rocketmq-clients/blob/master/.github/workflows/nodejs_coverage.yml#L40


-- 
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] Client configuration add namespace [rocketmq-clients]

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


-- 
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] Client configuration add namespace [rocketmq-clients]

Posted by "fengmk2 (via GitHub)" <gi...@apache.org>.
fengmk2 commented on code in PR #750:
URL: https://github.com/apache/rocketmq-clients/pull/750#discussion_r1597398731


##########
nodejs/src/client/Settings.ts:
##########
@@ -20,15 +20,17 @@ import { Endpoints } from '../route/Endpoints';
 import { RetryPolicy } from '../retry';
 
 export abstract class Settings {
+  protected readonly namespace: string | "";

Review Comment:
   `protected readonly namespace: string;`



-- 
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