question

Upvotes
Accepted
129 6 14 23

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.

treprfarfa-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
38.1k 71 35 53

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.


streamstates.png (136.3 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea