question

Upvotes
Accepted
129 16 25 31

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 512.0 KiB each and 1.0 MiB total.

This is a seed question.

1 Answer

· Write an Answer
Upvotes
Accepted
78.8k 250 52 74

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 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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