Auto-reconnecting Java client