This usually clears itself up immediately on retry (after 100 ms), as handled by the the kafka.producer.async.DefaultEventHandler (with retries enabled).

However, this is logged to the client as an ERROR, and looks scary, when in fact it should have been a normal operation (since we have auto.create.topics.enable=true).

There should be a better interaction here between the producer client and the server.

Perhaps the server can create the topic in flight before returning the metadata request.

Or, if it needs to be asynchronous, it could return a code which indicates something like: "The topic doesn't exist yet, it is being created, try again shortly".....and have the client automatically retry (even if retries not enabled, since it's not an ERROR condition, really).

The ERROR log level is a problem since apps often have alert systems set up to notify when any ERROR happens, etc.....