Error: Attempt to encode rssl msg failed in RFA after submitting OMMSolicitedItemCmd

I found the following OMMCmdErrorEvent in the log file after submitting OMMSolicitedItemCmd.

<- Received OMMCmdErrorEvent:Cmd ID: 3
State: Failure
StatusCode: NoResources
StatusText: Attempt to encode rssl msg failed.

The problem happened when the provider application was
sending the status response for an unsupported item.

status.StreamState = RespStatus.StreamStateEnum.UnspecifiedStreamState;
status.DataState = RespStatus.DataStateEnum.Suspect;
status.StatusCode = RespStatus.StatusCodeEnum.None;
status.StatusText = new RFA_String("Not Support");
respMsg = new RespMsg();
respMsg.RespStatus = status;
respMsg.MsgModelType = RDM.RDM.MESSAGE_MODEL_TYPES.MMT_MARKET_PRICE;
respMsg.RespType = RespMsg.RespTypeEnum.Status;
itemCmd.Msg = respMsg;
itemCmd.RequestToken = TS.requestToken;
reason.Append("status");
SubmitCmd(itemCmd,null, reason);

Please let me know how to fix this problem.

Tagged:

Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    RespStatus.StreamStateEnum.UnspecifiedStreamState is not a
    valid stream state for encoding. If the application submits the command with
    UnspecifiedStreamState stream state, it will receive OMMCmdErrorEvent with “Attempt
    to encode rssl msg failed error”
    .

    The application should set it to RespStatus.StreamStateEnum.Closed
    if the application is unable to provide the data for that request.

    For more
    information regarding stream state, please refer to the following table.

    image