added reconnect capability to pub as well.
retry duration logic added with setperiodic timer.