Use InternalThreadLocal in consumer side (#1825)