Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the error handling in client.InitProducerID()
err was shadowed in InitProducerID() so it would never return a non-nil error. It now returns ErrOutOfBrokers if there aren't any registered brokers. If there are registered brokers and the broker calls fail then it returns the last encoutered error. This was causing a panic in newTransactionManager() with idempotent production enabled because nil, nil was being returned if the brokers were unavailable.
- Loading branch information