Not able to successfully post using example341__MarketPrice__OffStreamPost
We tried to publish using Elektron-SDK1.1.0.java API. We ran the example given in the API, changing some configuration and we are able to connect to the service but it is not able to publish the price, came back with Service Name not set & DeniedBySource error.
The following lines are updated when we ran the example
line no 263:
consumer = EmaFactory.createOmmConsumer(EmaFactory.createOmmConsumerConfig().host("wupra00a0186.wellsfargo.com:14002").username("sami_dev_contribute"));
line no 269:
longhandle = consumer.registerClient(reqMsg.clear().serviceName("UAT_MLIP").name(".WFCBTST1"), appClient, consumer);
line no 54 - 60
//FieldList is a collection in java
/*nestedFieldList.add(EmaFactory.createFieldEntry().real(22, 34, OmmReal.MagnitudeType.EXPONENT_POS_1));
nestedFieldList.add(EmaFactory.createFieldEntry().real(25, 35, OmmReal.MagnitudeType.EXPONENT_POS_1));
nestedFieldList.add(EmaFactory.createFieldEntry().time(18, 11, 29, 30));
nestedFieldList.add(EmaFactory.createFieldEntry().enumValue(37, 3));
*/
nestedFieldList.add(EmaFactory.createFieldEntry().real(6, 11, OmmReal.MagnitudeType.EXPONENT_POS_1));
Response message:
Jul 11, 2017 2:35:12 PM com.thomsonreuters.ema.access.ChannelCallbackClient reactorChannelEventCallback
INFO: loggerMsg
ClientName: ChannelCallbackClient
Severity: Info
Text: Received ChannelUp event on channel Channel
Instance Name EmaConsumer_1
Component Version ads2.6.10.L1.linux.tis.rrg 64-bit
loggerMsgEnd
Received Refresh. Item Handle: 0 Closure: com.thomsonreuters.ema.access.OmmConsumerImpl@1c4a1a27
Item Name: sami_dev_contribute
Service Name: <not set>
Item State: Open / Ok / None / 'Login accepted by host wupra00a0186.'
Name = AllowSuspectData DataType: UInt Value: 1
Name = ApplicationId DataType: Ascii Value: 256
Name = ApplicationName DataType: Ascii Value: ADS
Name = Position DataType: Ascii Value: 10.198.16.72/DTC8C0ADF8DD1E5
Name = ProvidePermissionExpressions DataType: UInt Value: 1
Name = ProvidePermissionProfile DataType: UInt Value: 0
Name = SingleOpen DataType: UInt Value: 1
Name = SupportOMMPost DataType: UInt Value: 1
Name = SupportPauseResume DataType: UInt Value: 0
Name = SupportStandby DataType: UInt Value: 0
Name = SupportBatchRequests DataType: UInt Value: 7
Name = SupportViewRequests DataType: UInt Value: 1
Name = SupportOptimizedPauseResume DataType: UInt Value: 0
Received AckMsg. Item Handle: 1 Closure: com.thomsonreuters.ema.access.OmmConsumerImpl@1c4a1a27
Item Name: .WFCBTST1
Service Name: not set
Ack Id: 1
Nack Code: DeniedBySource
Text: Unable to find service for post message.
Best Answer
-
To submit an OffStream PostMsg you need an OmmConsumer instance and the Login Handle.
So, you can can post from wherever you want in you application as long you have access to the above two.
The above example uses event.handle() because the OnRefresh event is for the MMT_LOGIN. However, you can instead store the return value from when you can registerClient for MMT_LOGIN and use that when calling submit from somewhere other than the onRefresh.
0
Answers
-
A few of things to note
- The line of code below is registering interesting in consuming the item - not posting
long handle = consumer.registerClient(reqMsg.clear().serviceName("UAT_MLIP").name(".WFCBTST1"), appClient, consumer);
2.The actual post is done using the submit() call in the onRefreshMsg() method e.g.
((OmmConsumer)event.closure()).submit( postMsg.postId( 1 ).serviceId( 1501 )
.name( ".WFCBTST1" ).solicitAck( true ).complete(true)
.payload(nestedRefreshMsg), event.handle() );3. There is an outstanding issue with EMA Java in that the serviceName() method is not working. You need to use serviceId() call instead - after obtaining the correct service ID for the service from your Market Data team.
The development team are aware of the above issue and it should be fixed in a future build.
0 -
Hi Umer,
Thanks for the response. We got the service id pertained to our service UAT_MLIP ie 4300 and retried. It did not work, came back with similar error, pasted below. We are not sure if this is successful or not and it is not reflecting in the frontend.
On the other note, We are also trying to enable the logging using logback and even if I set root logger level to debug, we are not getting much logging out of API.
Also is there a any better example which I can use for post.
Received AckMsg. Item Handle: 1 Closure: com.thomsonreuters.ema.access.OmmConsumerImpl@35bfa910
Item Name: .WFCBTST1
Service Name: not set
Ack Id: 1
Nack Code: DeniedBySource
Text: .WFCBTST1
Received Status. Item Handle: 2 Closure: com.thomsonreuters.ema.access.OmmConsumerImpl@35bfa910
Item Name: .WFCBTST1
Service Name: UAT_MLIP
Item State: Open / Suspect / None / 'Request timeout'
Thanks & regards
--Thiru
0 -
A few things.
- Has your Market Data team confirmed that the MLIP_UAT source is able to receive Posts/ contributions for that particular RIC? Have they confirmed this works with some other existing application which posts successfully? Because it could be possible that the source has not been configured correctly. In which case they could raise a ticket with TREP support and get some assistance with the config
- With regards logging please see this post
- It is also possible to enable low level EMA message tracing using the XmlTraceToStdout=1 setting in your EMAConfig.xml file as described here
If your Market Data team are sure that MLIP_UAT is configured correctly, then you can upload some logging and the XmlTrace here for further analysis.
0 -
Pls find the full trace and the log information and let us know if you see any obvious things to be fixed.
0 -
@Thirumal.Ponniahpillai
I have tested it with my contribution server (ATS). I don't have MarketLink. The ATS can accept the post message properly.
<POST domainType="MARKET_PRICE" streamId="1" containerType="MSG" flags="0x66 (HAS_POST_ID|HAS_MSG_KEY|POST_COMPLETE|ACK)" postId="1" postUserId="0" postUserAddr="0.0.0.0" dataSize="24">
<key flags="0x03 (HAS_SERVICE_ID|HAS_NAME)" serviceId="267" name="TEST.BK"/>
<dataBody>
<REFRESH domainType="MARKET_PRICE" streamId="0" containerType="FIELD_LIST" flags="0x40 (REFRESH_COMPLETE)" groupId="0" State: Open/Ok/None - text: "" dataSize="8">
<dataBody>
<fieldList flags="0x08 (HAS_STANDARD_DATA)">
<fieldEntry fieldId="22" data="0F22"/>
</fieldList>
</dataBody>
</REFRESH>
</dataBody>
</POST>
<ACK domainType="MARKET_PRICE" streamId="1" containerType="NO_DATA" flags="0x12 (HAS_TEXT|HAS_MSG_KEY)" ackId="1" text="[1]: Contribution Accepted" dataSize="0">
<key flags="0x03 (HAS_SERVICE_ID|HAS_NAME)" serviceId="267" name="TEST.BK"/>
<dataBody>
</dataBody>
</ACK>In your case, the below AckMsg could be sent from the MarketLink server. You should contact the MarketLink team to verify the MarketLink's log to find the reason of NAK DeniedBySource.
Received AckMsg. Item Handle: 1 Closure: com.thomsonreuters.ema.access.OmmConsumerImpl@35bfa910
Item Name: .WFCBTST1
Service Name: not set
Ack Id: 1
Nack Code: DeniedBySource
Text: .WFCBTST10 -
As far as I know, the MarketLink IP can accept only the Post message which contains Update message as payload. Could you try modifying the example to use nested Update instead of Refresh?
0 -
Veerapath is absolutely correct. Please see the tested update to EMA OffStreamPost example
...
PostMsg postMsg = EmaFactory.createPostMsg();
RefreshMsg nestedRefreshMsg = EmaFactory.createRefreshMsg();
UpdateMsg nestedUpdateMsg = EmaFactory.createUpdateMsg();
FieldList nestedFieldList = EmaFactory.createFieldList();
//FieldList is a collection in java
nestedFieldList.add(EmaFactory.createFieldEntry().real(22, 34, OmmReal.MagnitudeType.EXPONENT_POS_1));
nestedFieldList.add(EmaFactory.createFieldEntry().real(25, 35, OmmReal.MagnitudeType.EXPONENT_POS_1));
nestedUpdateMsg.payload(nestedFieldList );
((OmmConsumer)event.closure()).submit( postMsg.postId( 1 ).serviceId( 338)//1501 )
.name( "YOUR_INSTRUMENT_HERE" ).solicitAck( true ).complete(true)
.payload(nestedUpdateMsg), event.handle() );
...0 -
Thanks for the suggestion. I have changed it to nested update, after that I am not getting ACK, is this mean, it's throwing exception now.
Exception in thread "pool-2-thread-1" Exception Type='OmmInvalidHandleException', Text='loggerMsg
ClientName: ItemCallbackClient
Severity: Error
Text: Attempt to use invalid Handle on submit(PostMsg). Instance name='Consumer_1_1'.
loggerMsgEnd
', Handle='0'
com.thomsonreuters.ema.examples.training.consumer.series300.example341__MarketPrice__OffStreamPost.AppClient.onRefreshMsg(Consumer.java:102)
0 -
@Thirumal.Ponniahpillai
The exception showed that, at line Consumer.java:102, the application passed an invalid handle ('0'), when calling submit() method.
Could you please provide us with the source code (consumer.java)?
0 -
0
-
Thank you for the code.
From my test, the issue happens randomly. Sometimes, event.handle() returns zero which causes the exception. I will investigate the issue.
0 -
Thanks. Another thing we are trying to achieve through the offstream post, is bulk update/multiple updates for price. Do we need to do it through onrefresh callback way or there are other ways to achieve this.
0 -
Hi @Umer Nalla
Thanks for the details and it worked out well. We were able to submit using login handle successfully but the submission happens for every individual updates. Is there a way we can batch it and submit?
0 -
No, unfortunately. Batch posting is not supported by on-stream, nor off-stream.
0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛