type Forwarder struct {
}
-func (m Forwarder) Consume(mtype, subId int, payload []byte, meid *xapp.RMRMeid) (err error) {
- xapp.Logger.Debug("Message received - type=%d subId=%d meid=%v", mtype, subId, meid)
+func (m Forwarder) Consume(params *xapp.RMRParams) (err error) {
+ xapp.Logger.Debug("Message received - type=%d txid=%s subId=%d meid=%s",
+ params.Mtype, params.Xid, params.SubId, params.Meid.RanName)
// Store data and reply with the same message payload
if xapp.Config.GetInt("test.store") != 0 {
- xapp.Sdl.Store("myKey", payload)
+ xapp.Sdl.Store("myKey", params.Payload)
}
mid := xapp.Config.GetInt("test.mtype")
if mid != 0 {
- mtype = mid
+ params.Mtype = mid
} else {
- mtype = mtype + 1
+ params.Mtype = params.Mtype + 1
}
sid := xapp.Config.GetInt("test.subId")
if sid != 0 {
- subId = sid
+ params.SubId = sid
}
- if ok := xapp.Rmr.Send(mtype, subId, payload, nil); !ok {
+ if ok := xapp.Rmr.SendRts(params); !ok {
xapp.Logger.Info("Rmr.Send failed ...")
}
return