add configuration for socket timeout and sub batching