diff --git a/pkg/control/control.go b/pkg/control/control.go
index 5128458..a5d81fb 100755
--- a/pkg/control/control.go
+++ b/pkg/control/control.go
@@ -54,12 +54,11 @@
 //
 //-----------------------------------------------------------------------------
 
-var e2tSubReqTimeout time.Duration = 5 * time.Second
-var e2tSubDelReqTime time.Duration = 5 * time.Second
-var e2tMaxSubReqTryCount uint64 = 2    // Initial try + retry
-var e2tMaxSubDelReqTryCount uint64 = 2 // Initial try + retry
-
-var e2tRecvMsgTimeout time.Duration = 5 * time.Second
+var e2tSubReqTimeout time.Duration
+var e2tSubDelReqTime time.Duration
+var e2tRecvMsgTimeout time.Duration
+var e2tMaxSubReqTryCount uint64    // Initial try + retry
+var e2tMaxSubDelReqTryCount uint64 // Initial try + retry
 
 type Control struct {
 	*xapp.RMRClient
@@ -85,6 +84,18 @@
 
 func NewControl() *Control {
 
+	// viper.GetDuration returns nanoseconds
+	e2tSubReqTimeout = viper.GetDuration("controls.e2tSubReqTimeout_ms") * 1000000
+	xapp.Logger.Info("e2tSubReqTimeout %v", e2tSubReqTimeout)
+	e2tSubDelReqTime = viper.GetDuration("controls.e2tSubDelReqTime_ms") * 1000000
+	xapp.Logger.Info("e2tSubDelReqTime %v", e2tSubDelReqTime)
+	e2tRecvMsgTimeout = viper.GetDuration("controls.e2tRecvMsgTimeout_ms") * 1000000
+	xapp.Logger.Info("e2tRecvMsgTimeout %v", e2tRecvMsgTimeout)
+	e2tMaxSubReqTryCount = viper.GetUint64("controls.e2tMaxSubReqTryCount")
+	xapp.Logger.Info("e2tMaxSubReqTryCount %v", e2tMaxSubReqTryCount)
+	e2tMaxSubDelReqTryCount = viper.GetUint64("controls.e2tMaxSubDelReqTryCount")
+	xapp.Logger.Info("e2tMaxSubDelReqTryCount %v", e2tMaxSubDelReqTryCount)
+
 	transport := httptransport.New(viper.GetString("rtmgr.HostAddr")+":"+viper.GetString("rtmgr.port"), viper.GetString("rtmgr.baseUrl"), []string{"http"})
 	rtmgrClient := RtmgrClient{rtClient: rtmgrclient.New(transport, strfmt.Default)}
 
diff --git a/pkg/control/registry.go b/pkg/control/registry.go
index 9e4eaaa..7ad54c1 100644
--- a/pkg/control/registry.go
+++ b/pkg/control/registry.go
@@ -87,7 +87,7 @@
 	return nil, fmt.Errorf("Registry: Failed to reserve subscription no free ids")
 }
 
-func (r *Registry) findExistingSubs(trans *TransactionXapp, subReqMsg *e2ap.E2APSubscriptionRequest) *Subscription {
+func (r *Registry) findExistingSubs(trans *TransactionXapp, subReqMsg *e2ap.E2APSubscriptionRequest) (*Subscription, bool) {
 
 	for _, subs := range r.register {
 		if subs.IsMergeable(trans, subReqMsg) {
@@ -106,18 +106,19 @@
 				subs.mutex.Unlock()
 				continue
 			}
-			// try to add to endpointlist.
+			// Try to add to endpointlist. Adding fails if endpoint is already in the list
 			if subs.EpList.AddEndpoint(trans.GetEndpoint()) == false {
 				subs.mutex.Unlock()
-				continue
+				xapp.Logger.Debug("Registry: Subs with requesting endpoint found. %s for %s", subs.String(), trans.String())
+				return subs, true
 			}
 			subs.mutex.Unlock()
 
-			xapp.Logger.Debug("Registry: Mergeable subs found %s for %s", subs.String(), trans.String())
-			return subs
+			xapp.Logger.Debug("Registry: Mergeable subs found. %s for %s", subs.String(), trans.String())
+			return subs, false
 		}
 	}
-	return nil
+	return nil, false
 }
 
 func (r *Registry) AssignToSubscription(trans *TransactionXapp, subReqMsg *e2ap.E2APSubscriptionRequest) (*Subscription, error) {
@@ -140,7 +141,7 @@
 	//
 	if actionType == e2ap.E2AP_ActionTypePolicy {
 		if subs, ok := r.register[trans.GetSubId()]; ok {
-			xapp.Logger.Debug("CREATE %s. Existing subscription for Policy found", subs.String())
+			xapp.Logger.Debug("CREATE %s. Existing subscription for Policy found.", subs.String())
 			// Update message data to subscription
 			subs.SubReqMsg = subReqMsg
 			subs.SetCachedResponse(nil, true)
@@ -148,13 +149,18 @@
 		}
 	}
 
-	subs := r.findExistingSubs(trans, subReqMsg)
+	subs, endPointFound := r.findExistingSubs(trans, subReqMsg)
 	if subs == nil {
 		subs, err = r.allocateSubs(trans, subReqMsg)
 		if err != nil {
 			return nil, err
 		}
 		newAlloc = true
+	} else if endPointFound == true {
+		// Requesting endpoint is already present in existing subscription. This can happen if xApp is restarted.
+		xapp.Logger.Debug("CREATE: subscription already exists. %s", subs.String())
+		xapp.Logger.Debug("Registry: substable=%v", r.register)
+		return subs, nil
 	}
 
 	//
diff --git a/pkg/control/ut_messaging_test.go b/pkg/control/ut_messaging_test.go
index 36e4f29..6068d66 100644
--- a/pkg/control/ut_messaging_test.go
+++ b/pkg/control/ut_messaging_test.go
@@ -1653,3 +1653,71 @@
 	e2termConn1.TestMsgChanEmpty(t)
 	mainCtrl.wait_registry_empty(t, 10)
 }
+
+//-----------------------------------------------------------------------------
+// TestSubReqRetransmissionWithSameSubIdDiffXid
+//
+// This case simulates case where xApp restarts and starts sending same
+// subscription requests which have already subscribed successfully
+
+//   stub                          stub
+// +-------+     +---------+    +---------+
+// | xapp  |     | submgr  |    | e2term  |
+// +-------+     +---------+    +---------+
+//     |              |              |
+//     |  SubReq      |              |
+//     |------------->|              |
+//     |              |              |
+//     |              | SubReq       |
+//     |              |------------->|
+//     |              |              |
+//     |              |      SubResp |
+//     |              |<-------------|
+//     |              |              |
+//     |      SubResp |              |
+//     |<-------------|              |
+//     |              |              |
+//     | xApp restart |              |
+//     |              |              |
+//     |  SubReq      |              |
+//     | (retrans with same xApp generated subid but diff xid)
+//     |------------->|              |
+//     |              |              |
+//     |      SubResp |              |
+//     |<-------------|              |
+//     |              |              |
+//     |         [SUBS DELETE]       |
+//     |              |              |
+//
+//-----------------------------------------------------------------------------
+func TestSubReqRetransmissionWithSameSubIdDiffXid(t *testing.T) {
+	CaseBegin("TestSubReqRetransmissionWithSameSubIdDiffXid")
+
+	//Subs Create
+	cretrans := xappConn1.SendSubsReq(t, nil, nil)
+	crereq, cremsg := e2termConn1.RecvSubsReq(t)
+	e2termConn1.SendSubsResp(t, crereq, cremsg)
+	e2SubsId := xappConn1.RecvSubsResp(t, cretrans)
+
+	// xApp restart here
+	// --> artificial delay
+	<-time.After(1 * time.Second)
+
+	//Subs Create
+	cretrans = xappConn1.SendSubsReq(t, nil, nil) //Retransmitted SubReq
+	e2SubsId = xappConn1.RecvSubsResp(t, cretrans)
+
+	//Subs Delete
+	deltrans := xappConn1.SendSubsDelReq(t, nil, e2SubsId)
+	delreq, delmsg := e2termConn1.RecvSubsDelReq(t)
+	e2termConn1.SendSubsDelResp(t, delreq, delmsg)
+	xappConn1.RecvSubsDelResp(t, deltrans)
+
+	//Wait that subs is cleaned
+	mainCtrl.wait_subs_clean(t, e2SubsId, 10)
+
+	xappConn1.TestMsgChanEmpty(t)
+	xappConn2.TestMsgChanEmpty(t)
+	e2termConn1.TestMsgChanEmpty(t)
+	mainCtrl.wait_registry_empty(t, 10)
+}
