# Redundancy in module development

**URL:** <https://forum.inductiveautomation.com/t/redundancy-in-module-development/53525>\
**Category:** Module Development\
**Tags:** ignition80, ignition81\
**Created:** [November 29, 2021, 2:33pm UTC](https://forum.inductiveautomation.com/t/redundancy-in-module-development/53525 "2021-11-29T14:33:06Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![brandon1](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@brandon1](https://forum.inductiveautomation.com/u/brandon1)\
**Post date:** [November 29, 2021, 3:29pm UTC](https://forum.inductiveautomation.com/t/redundancy-in-module-development/53525/2 "2021-11-29T15:29:29Z")

</div>

You need to use the Redundancy State Listener:

import com.inductiveautomation.ignition.gateway.redundancy.types.RedundancyState;  
import com.inductiveautomation.ignition.gateway.redundancy.types.RedundancyStateListener;

code snippets:

```auto
   @Override
    public void redundancyStateChanged(RedundancyState redundancyState) {
        logger.debug("Redundancy State Changed to %s",redundancyState.getActivityLevel().toString());
        if(redundancyState.getActivityLevel().equals(ActivityLevel.Active)){
            this.isActive = true;
        }
        else{
            this.isActive = false;
        }
    }

    @Override
    public void redundancyConnStatusChanged(ClusterPeerConnectionStatus clusterPeerConnectionStatus) {

    }

```

EDIT: You have to implement the logic internally but these hooks let you know what state the Gateway is in. This works well for my SNMP Driver that I wrote.

---

_[View the full topic](https://forum.inductiveautomation.com/t/redundancy-in-module-development/53525)._
