Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Apache RocketMQ
Rocketmq
提交
3a8a1bc3
R
Rocketmq
项目概览
Apache RocketMQ
/
Rocketmq
上一次同步 大约 3 年
通知
266
Star
16139
Fork
68
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rocketmq
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
3a8a1bc3
编写于
5月 17, 2019
作者:
D
duhenglucky
提交者:
ShannonDing
5月 21, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add comment for AccessChannel class
上级
47d88147
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
17 addition
and
5 deletion
+17
-5
client/src/main/java/org/apache/rocketmq/client/AccessChannel.java
...c/main/java/org/apache/rocketmq/client/AccessChannel.java
+14
-2
client/src/main/java/org/apache/rocketmq/client/ClientConfig.java
...rc/main/java/org/apache/rocketmq/client/ClientConfig.java
+1
-1
client/src/main/java/org/apache/rocketmq/client/trace/AsyncTraceDispatcher.java
...rg/apache/rocketmq/client/trace/AsyncTraceDispatcher.java
+2
-2
未找到文件。
client/src/main/java/org/apache/rocketmq/client/AccessChannel.java
浏览文件 @
3a8a1bc3
...
...
@@ -15,7 +15,19 @@
* limitations under the License.
*/
package
org.apache.rocketmq.client
;
/**
* Used for set access channel, if need migrate the rocketmq service to cloud, it is We recommend set the value with
* "CLOUD". otherwise set with "LOCAL", especially used the message trace feature.
*/
public
enum
AccessChannel
{
local
,
cloud
,
/**
* Means connect to private IDC cluster.
*/
LOCAL
,
/**
* Means connect to Cloud service.
*/
CLOUD
,
}
client/src/main/java/org/apache/rocketmq/client/ClientConfig.java
浏览文件 @
3a8a1bc3
...
...
@@ -37,7 +37,7 @@ public class ClientConfig {
private
String
instanceName
=
System
.
getProperty
(
"rocketmq.client.name"
,
"DEFAULT"
);
private
int
clientCallbackExecutorThreads
=
Runtime
.
getRuntime
().
availableProcessors
();
protected
String
namespace
;
protected
AccessChannel
accessChannel
=
AccessChannel
.
local
;
protected
AccessChannel
accessChannel
=
AccessChannel
.
LOCAL
;
/**
* Pulling topic information interval from the named server
...
...
client/src/main/java/org/apache/rocketmq/client/trace/AsyncTraceDispatcher.java
浏览文件 @
3a8a1bc3
...
...
@@ -72,7 +72,7 @@ public class AsyncTraceDispatcher implements TraceDispatcher {
private
String
dispatcherId
=
UUID
.
randomUUID
().
toString
();
private
String
traceTopicName
;
private
AtomicBoolean
isStarted
=
new
AtomicBoolean
(
false
);
private
AccessChannel
accessChannel
=
AccessChannel
.
local
;
private
AccessChannel
accessChannel
=
AccessChannel
.
LOCAL
;
public
AsyncTraceDispatcher
(
String
traceTopicName
,
RPCHook
rpcHook
)
{
// queueSize is greater than or equal to the n power of 2 of value
...
...
@@ -341,7 +341,7 @@ public class AsyncTraceDispatcher implements TraceDispatcher {
*/
private
void
sendTraceDataByMQ
(
Set
<
String
>
keySet
,
final
String
data
,
String
dataTopic
,
String
regionId
)
{
String
traceTopic
=
traceTopicName
;
if
(
AccessChannel
.
cloud
==
accessChannel
)
{
if
(
AccessChannel
.
CLOUD
==
accessChannel
)
{
traceTopic
=
TraceConstants
.
TRACE_TOPIC_PREFIX
+
regionId
;
}
final
Message
message
=
new
Message
(
traceTopic
,
data
.
getBytes
());
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录