question

Upvotes
Accepted
1 0 0 2

RFA - Messages not Published to Reuters

I am using RFA.NET(version 8 64 bit) library to Post messages. I am using below method of the dll to submit messages,

OMMHandleItemCmd handleCmd = new OMMHandleItemCmd();                     
handleCmd.Handle = handle;
handleCmd.Msg = postMsg;
this.ommConsumer.Submit(handleCmd);

Below are my concerns,

1) Is there a way through which i can check whether submit is successful or not to ADS server?

I know that return type of above Submit method is uint. But this just gives the sequencial number.

e.g If i call submit metod for first time i get 1 and for second time i get 2 and so on.

2) Is there some queue which RFA maintains internally, where i can check the number of pending items which are not published yet?
3) Before calling Submit method, can i check whether a connection to the ADS server is up and running on the specified port.

We are facing an issue where in our messages are not published on calling Submit method.
(We have windows service where our code is hosted. Once we restarted the service i.e. again register a client with the connection then our publications are posted successfully to reuters)

I want to make sure by doing above validations that once we call submit method our messages are succesfully published to Reuters.

Can someone please help me with this.

treprfarfa-api.net
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.

Upvotes
Accepted
20.3k 73 10 20

Hi, @JayeshC.PATEL

Have you tried testing your posting using the example StarterConsumer_Post to see if it all works OK?

If you examine the above example app source code and the config file (StarterConsumer_Post.cfg) you will note there is an wantAck option. If this is enabled a unique PostId is encoded into the PostMsg along with the WantAck indication flag.

Your app should then receive an Ack Message back upon successful posting with an AckID corresponding to the PostID encoded in the PostMsg.

See sections 7.1.1.4.4 Ack Message and 7.2.1.3 Encoding Post Message in the RFANET_DevelopersGuide.pdf (that comes with the RFA.Net package) for further details.

With regards checking if your connection is up, you should do that at the start of your application, i.e. send a Login request and then wait till you get successful login established before submitting any PostMsgs. If you have coded your app to specify an interest in ConnectionEvents (OMMConnectionIntSpec) then you should also receive any connection related events. You can also register for a Source Directory to ensure the relevant service is up before sending any PostMsg and also receive any service related events if service goes down etc.

Hope this helps.

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.

Upvotes
11.3k 25 8 13

Hi, @JayeshC.PATEL

The value returned from the Submit() method is cmd ID. An application can registers for the OMMErrorIntSpec to receive OMMCmdErrorEvent, once the submit for post message fails to sent with some reason (i.e. incorrect handle). The cmd ID uniquely identifies the Cmd and is used to determine which Cmd an OMMCmdErrorEvent event belongs to.

I have modified the StarterConsumer_Post to display the cmd ID and add incorrect handle in cmd of posting. Below is the log generated for the error. In this case, post message will not be sent to network.

********************** INFO ************************ INFO ********************** 2016/09/21 17:44:59.041 INFO -> Submit Post Msg with Data MarketPrice seq#: -1 post id: 2 cmd id: 1 

2016/09/21 17:44:59.043 TRACE <- Received LoggerNotifyEvent: [Wed Sep 21 17:44:59 2016]: (ComponentName) Static: (Severity) Information: OMMConsumer::submit() was called with an Invalid handle.

********************* ERROR! ********************** ERROR! ********************* 2016/09/21 17:44:59.050 ERROR* <- Received OMMCmdErrorEvent: Cmd ID: 1 State: Failure StatusCode: NoResources StatusText: OMMConsumer::submit() was called with an Invalid handle.
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.

Upvotes
1 0 0 2

Hi @Umer Nalla,

I am setting WantAck indicator for the post message, but still i am not getting any acknowledgement. (i.e ProcessEvent Method is not called).

Below is my chunk of code,

postMsg.IndicationMask = (byte)(postMsg.IndicationMask | PostMsg.IndicationMaskFlag.WantAck);
postMsg.PostID = (uint)postID;
this.SetUserPrincipal(postMsg);
flWiter.Complete();
RespMsg respMsg = new RespMsg();
respMsg.IndicationMask = RespMsg.IndicationMaskFlag.RefreshComplete;
respMsg.MsgModelType = domain;
respMsg.RespType = RespMsg.RespTypeEnum.Refresh;
respMsg.RespTypeNum = RDM.INSTRUMENT_REFRESH_RESPONSE_TYPES.REFRESH_UNSOLICITED;
RespStatus status = new RespStatus();
status.DataState = RespStatus.DataStateEnum.Ok;
status.StreamState = RespStatus.StreamStateEnum.Open;
RFA_String statusText = new RFA_String("Refresh Complete");
status.StatusText = statusText;
respMsg.RespStatus = status;
respMsg.AttribInfo = attribInfo;
respMsg.Payload = fl;
//Set respMsg in postMsg
postMsg.Payload = respMsg;
OMMHandleItemCmd handleCmd = new OMMHandleItemCmd();
handleCmd.Handle = handle;
handleCmd.Msg = postMsg;
this.ommConsumer.Submit(handleCmd);

Is there something else which we need to do?

Thanks

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.

Hi @JayeshC.PATEL, The ack message generally is sent from provider as acknowledge of a post message. The post message might not be sent out. You enable the XML tracing file with this configurations.

\Connections\Connection_RSSL\traceMsgToFile = true
\Connections\Connection_RSSL\traceMsgDomains = "all"
\Connections\Connection_RSSL\traceMsgMaxMsgSize = 10000000
\Connections\Connection_RSSL\traceMsgMultipleFiles = true

If the post msg is not in the file, you should register the OMMErrorIntSpec to receive an error event. Otherwise, if you have the TRDC membership, you should submit a TRDC ticket.

Click below to post an Idea Post Idea