diff --git a/pkg/control/control.go b/pkg/control/control.go
index eff14ee..6111c63 100755
--- a/pkg/control/control.go
+++ b/pkg/control/control.go
@@ -231,11 +231,12 @@
 }
 
 func (c *Control) QueryHandler() (models.SubscriptionList, error) {
+	xapp.Logger.Info("QueryHandler() called")
+
 	return c.registry.QueryHandler()
 }
 
 func (c *Control) TestRestHandler(w http.ResponseWriter, r *http.Request) {
-
 	xapp.Logger.Info("TestRestHandler() called")
 
 	pathParams := mux.Vars(r)
@@ -352,7 +353,7 @@
 		return
 	}
 
-	trans := c.tracker.NewXappTransaction(xapp.NewRmrEndpoint(params.Src), params.Xid, subReqMsg.RequestId.InstanceId, params.Meid)
+	trans := c.tracker.NewXappTransaction(xapp.NewRmrEndpoint(params.Src), params.Xid, subReqMsg.RequestId, params.Meid)
 	if trans == nil {
 		xapp.Logger.Error("XAPP-SubReq: %s", idstring(fmt.Errorf("transaction not created"), params))
 		return
@@ -381,6 +382,7 @@
 	if event != nil {
 		switch themsg := event.(type) {
 		case *e2ap.E2APSubscriptionResponse:
+			themsg.RequestId.Id = trans.RequestId.Id
 			trans.Mtype, trans.Payload, err = c.e2ap.PackSubscriptionResponse(themsg)
 			if err == nil {
 				trans.Release()
@@ -389,6 +391,7 @@
 				return
 			}
 		case *e2ap.E2APSubscriptionFailure:
+			themsg.RequestId.Id = trans.RequestId.Id
 			trans.Mtype, trans.Payload, err = c.e2ap.PackSubscriptionFailure(themsg)
 			if err == nil {
 				c.UpdateCounter(cSubFailToXapp)
@@ -415,7 +418,7 @@
 		return
 	}
 
-	trans := c.tracker.NewXappTransaction(xapp.NewRmrEndpoint(params.Src), params.Xid, subDelReqMsg.RequestId.InstanceId, params.Meid)
+	trans := c.tracker.NewXappTransaction(xapp.NewRmrEndpoint(params.Src), params.Xid, subDelReqMsg.RequestId, params.Meid)
 	if trans == nil {
 		xapp.Logger.Error("XAPP-SubDelReq: %s", idstring(fmt.Errorf("transaction not created"), params))
 		return
@@ -449,7 +452,8 @@
 
 	// Whatever is received success, fail or timeout, send successful delete response
 	subDelRespMsg := &e2ap.E2APSubscriptionDeleteResponse{}
-	subDelRespMsg.RequestId = subs.GetReqId().RequestId
+	subDelRespMsg.RequestId.Id = trans.RequestId.Id
+	subDelRespMsg.RequestId.InstanceId = subs.GetReqId().RequestId.InstanceId
 	subDelRespMsg.FunctionId = subs.SubReqMsg.FunctionId
 	trans.Mtype, trans.Payload, err = c.e2ap.PackSubscriptionDeleteResponse(subDelRespMsg)
 	if err == nil {
diff --git a/pkg/control/sdl_test.go b/pkg/control/sdl_test.go
index 9198e5c..9e27ebc 100644
--- a/pkg/control/sdl_test.go
+++ b/pkg/control/sdl_test.go
@@ -91,7 +91,7 @@
 	params.Meid = &meid
 
 	// Create xApp transaction
-	trans := mainCtrl.c.tracker.NewXappTransaction(xapp.NewRmrEndpoint(params.Src), params.Xid, subReqParams.Req.RequestId.InstanceId, params.Meid)
+	trans := mainCtrl.c.tracker.NewXappTransaction(xapp.NewRmrEndpoint(params.Src), params.Xid, subReqParams.Req.RequestId, params.Meid)
 	if trans == nil {
 		t.Errorf("TEST: %s", idstring(fmt.Errorf("transaction not created"), params))
 		return nil
diff --git a/pkg/control/tracker.go b/pkg/control/tracker.go
index 46971d9..d837ac8 100644
--- a/pkg/control/tracker.go
+++ b/pkg/control/tracker.go
@@ -21,6 +21,7 @@
 
 import (
 	"fmt"
+	"gerrit.o-ran-sc.org/r/ric-plt/e2ap/pkg/e2ap"
 	"gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/xapp"
 	"sync"
 )
@@ -58,13 +59,13 @@
 func (t *Tracker) NewXappTransaction(
 	endpoint *xapp.RmrEndpoint,
 	xid string,
-	subid uint32,
+	requestId e2ap.RequestId,
 	meid *xapp.RMRMeid) *TransactionXapp {
 
 	trans := &TransactionXapp{}
 	trans.XappKey = &TransactionXappKey{*endpoint, xid}
 	trans.Meid = meid
-	trans.SubId = subid
+	trans.RequestId = requestId
 	t.initTransaction(&trans.Transaction)
 	xapp.Logger.Debug("CREATE %s", trans.String())
 	return trans
diff --git a/pkg/control/transaction.go b/pkg/control/transaction.go
index f722d11..c7ca812 100644
--- a/pkg/control/transaction.go
+++ b/pkg/control/transaction.go
@@ -142,8 +142,8 @@
 //-----------------------------------------------------------------------------
 type TransactionXapp struct {
 	Transaction
-	XappKey *TransactionXappKey
-	SubId   uint32
+	XappKey   *TransactionXappKey
+	RequestId e2ap.RequestId
 }
 
 func (t *TransactionXapp) String() string {
@@ -151,7 +151,7 @@
 	if t.XappKey != nil {
 		transkey = t.XappKey.String()
 	}
-	return "transxapp(" + t.Transaction.String() + "/" + transkey + "/" + strconv.FormatUint(uint64(t.SubId), 10) + ")"
+	return "transxapp(" + t.Transaction.String() + "/" + transkey + "/" + strconv.FormatUint(uint64(t.RequestId.InstanceId), 10) + ")"
 }
 
 func (t *TransactionXapp) GetEndpoint() *xapp.RmrEndpoint {
@@ -184,7 +184,7 @@
 func (t *TransactionXapp) GetSubId() uint32 {
 	t.mutex.Lock()
 	defer t.mutex.Unlock()
-	return t.SubId
+	return t.RequestId.InstanceId
 }
 
 func (t *TransactionXapp) Release() {
