You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a client sends messages to multiple topics, the statistics information can only output the results of one topic for a single client. After reviewing the code, I found that the problem lies in the break statement on line 305 of the client_v2.go file. Can you explain why this break statement is added?
for topic, count := range c.pubCounts {
if len(topicName) > 0 && topic != topicName {
continue
}
pubCounts = append(pubCounts, PubCount{
Topic: topic,
Count: count,
})
break **// What does this break statement do?**
}
The text was updated successfully, but these errors were encountered:
I think you're correct that it's a bug, we probably never considered that the protocol allowed a single client to publish to multiple topics.
mreiferson
changed the title
There is an error in the statistics information
nsqd: statistics aren't recorded when client publishes to multiple topics
Sep 1, 2024
When a client sends messages to multiple topics, the statistics information can only output the results of one topic for a single client. After reviewing the code, I found that the problem lies in the break statement on line 305 of the client_v2.go file. Can you explain why this break statement is added?
The text was updated successfully, but these errors were encountered: