MQTT Disconnect and Reconnects at very short intervals for Android Client

I’m trying to connect mqtt broker with fixed clientID, it’s working fine but with several reconnect client disconnect and reconnect at very short intervals. Initializing connection from Android service onCreate and cleanup in onDestroy method.

//client builder
MqttClientBuilder builder = MqttClient.builder()
.addDisconnectedListener(new MqttClientDisconnectedListener() {
public void onDisconnected(@NotNull MqttClientDisconnectedContext context) {
Log.e(“hive”,"disconnected " + context.getSource().toString());
.addConnectedListener(new MqttClientConnectedListener() {
public void onConnected(@NotNull MqttClientConnectedContext context) {

client = builder