The reason was the max.block.ms config was not set and it defaults to 60000ms.
max.block.ms
https://docs.confluent.io/platform/current/installation/configuration/producer-configs.html#max-block-ms