You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2021/01/22 09:58:20 UTC
[GitHub] [rocketmq-client-go] juyuancai opened a new issue #598: concurrently sync send message sometimes will have error the topic= route info not found
juyuancai opened a new issue #598:
URL: https://github.com/apache/rocketmq-client-go/issues/598
when I start a go client , and conrrently sync send message , it will sometimes show "the topic= route info not found" error ,but not always, can anyone help me what's wrong here? Thank you
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq-client-go] ShannonDing commented on issue #598: concurrently sync send message sometimes will have error the topic= route info not found
Posted by GitBox <gi...@apache.org>.
ShannonDing commented on issue #598:
URL: https://github.com/apache/rocketmq-client-go/issues/598#issuecomment-768870950
could you pls add more logs here and share the client version?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq-client-go] fnquit commented on issue #598: concurrently sync send message sometimes will have error the topic= route info not found
Posted by GitBox <gi...@apache.org>.
fnquit commented on issue #598:
URL: https://github.com/apache/rocketmq-client-go/issues/598#issuecomment-1012118754
code here:
`package main
import (
"context"
"fmt"
"github.com/apache/rocketmq-client-go/v2"
"github.com/apache/rocketmq-client-go/v2/primitive"
"github.com/apache/rocketmq-client-go/v2/producer"
"sync"
"time"
)
func main() {
var wg sync.WaitGroup
for i := 0; i < 2; i ++ {
wg.Add(1)
go func() {
defer func() {
if r := recover(); r!= nil {
fmt.Printf("recover: %v\n", r)
}
}()
defer wg.Done()
produceMsg()
}()
}
wg.Wait()
time.Sleep(time.Second)
}
func produceMsg() {
p, err := rocketmq.NewProducer(
producer.WithNameServer([]string{"localhost:9876"}),
producer.WithRetry(2),
)
if err != nil {
panic(err)
}
err = p.Start()
defer p.Shutdown()
fmt.Println("start Produce.")
topic := "goTestTopic"
msgStr := "testMsg"
ctx := context.Background()
err = p.SendOneWay(ctx, primitive.NewMessage(topic, []byte(msgStr)))
fmt.Printf("SendSync res: %+v, err: %v\n", err)
if err != nil {
fmt.Errorf("err: %v", err)
return
}
}
`
-----------------------------------------
result:
the topic=goTestTopic route info not found, err: %!v(MISSING)
version:github.com/apache/rocketmq-client-go/v2 v2.1.0
--
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org