def METHOD_NAME(cnt):
    global publish_cnt
    rc = -1
    ph = events_init_publisher(test_source)
    if not ph:
        log_notice("Failed to get publisher handle")
        return rc
    # Sleep ASYNC_CONN_WAIT to ensure async connectivity is complete.
    # Messages published before connection are silently dropped by ZMQ.
    time.sleep(ASYNC_CONN_WAIT)
    pub_params = dict(test_event_params)
    for i in range(cnt):
        pd  = FieldValueMap()
        pub_params["index"] = str(i)
        map_dict_fvm(pub_params, pd)
        rc = event_publish(ph, test_event_tag, pd)
        if (rc != 0):
            log_notice("Failed to publish. {}/{} rc={}".format(i, cnt, rc))
            break
        log_debug("published: {}/{}".format(i+1, cnt))
        publish_cnt += 1
    # Sleep ASYNC_CONN_WAIT to ensure publish complete, before closing channel.
    time.sleep(ASYNC_CONN_WAIT)
    events_deinit_publisher(ph)
    log_debug("publish_events Done. cnt={}".format(cnt))
    return rc