apache / rocketmq-client-go

Apache RocketMQ go client
https://rocketmq.apache.org/
Apache License 2.0
1.29k stars 415 forks source link

[PanicFix] issue#1062 fix trace init nil pointer panic and clientid add group name at first #1065

Closed iGoogle-ink closed 12 months ago

iGoogle-ink commented 1 year ago

What is the purpose of the change

XXXXX

Brief changelog

XX

Verifying this change

XXXX

Follow this checklist to help us incorporate your contribution quickly and easily. Notice, it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR.

iGoogle-ink commented 1 year ago

fix #1062

cserwen commented 1 year ago

直接修改clientId影响的内容较多,可以参考下java sdk的实现逻辑,为轨迹producer设置不同的groupName来解决 @iGoogle-ink

iGoogle-ink commented 1 year ago

直接修改clientId影响的内容较多,可以参考下java sdk的实现逻辑,为轨迹producer设置不同的groupName来解决 @iGoogle-ink

你说的 producer 和 consumer 没问题,但是当使用 tracer 的时候,tracer 默认初始化的是固定的,没办法改,如果不改 clientid,可以考虑把 tracer 的初始化部分配置开放设置

cserwen commented 1 year ago

直接修改clientId影响的内容较多,可以参考下java sdk的实现逻辑,为轨迹producer设置不同的groupName来解决 @iGoogle-ink

你说的 producer 和 consumer 没问题,但是当使用 tracer 的时候,tracer 默认初始化的是固定的,没办法改,如果不改 clientid,可以考虑把 tracer 的初始化部分配置开放设置

参考 java SDK 的实现 https://github.com/apache/rocketmq/blob/develop/client/src/main/java/org/apache/rocketmq/client/trace/AsyncTraceDispatcher.java#L108