浏览代码

Actually a topic auth error not group, misread

mschlos2 6 年之前
父节点
当前提交
5e86ab83e7
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      client.go

+ 3 - 2
client.go

@@ -804,8 +804,9 @@ func (client *client) tryRefreshMetadata(topics []string, attemptsRemaining int,
 				return err
 			}
 
-			if err.(KError) == ErrGroupAuthorizationFailed {
-				Logger.Println("client is not authorized to access this group.")
+			if err.(KError) == ErrTopicAuthorizationFailed {
+				Logger.Println("client is not authorized to access this topic. The topics were: ", topics)
+				return err
 			}
 			// else remove that broker and try again
 			Logger.Printf("client/metadata got error from broker %d while fetching metadata: %v\n", broker.ID(), err)