Error posting using Ema Consumer
Hi,
I am using example ex340_MP_OnStreamPost of EMA Java API to post data. I have made changes for testing with beta environment setup for our application.
Attached is the code and output which shows that I am able to view the data from custom page. From decoded data the datatype seems to be 'rmtes'.
So we made changes to post rmtes buffer to field Id 339. However it does not seem to posting. Are we using correct posting mechanism?
Thanks.
Best Answer
-
In EMA, you can post those fields (ROW80_??) by using a field list.
For example:
PostMsg postMsg = EmaFactory.createPostMsg();
RefreshMsg nestedRefreshMsg = EmaFactory.createRefreshMsg();
FieldList nestedFieldList = EmaFactory.createFieldList();
//FieldList is a collection in java
nestedFieldList.add(EmaFactory.createFieldEntry().rmtes(316, ByteBuffer.wrap("FHLB DISCOUNT NOTE AUCTION 05/05/25".getBytes())));
nestedFieldList.add(EmaFactory.createFieldEntry().rmtes(317, ByteBuffer.wrap("AMOUNT (MIL) MATURITY MATURITY DATE SETTLEMENT".getBytes())));
… …
nestedRefreshMsg.payload(nestedFieldList ).complete(true);316 is a FID for ROW80_2 and 317 is a FID for ROW80_3.
For more information, please refer to the ex341_MP_OffStreamPost example and Implementing Real-Time API application to work with ATS - Part 1 article.
0
Answers
-
Thank you for reaching out to us.
You can't post messages directly to our real-time service, such as "IDN_RDF". You need to post messages to the Contribution Channel, then the data will be available through the real-time service.
For more information, please refer to this Contributing your data to Refinitiv article.
Would you mind clarifying your goal or objective?
0 -
Jirapongse,
Thanks for quick reply.
I have made slight change to code (see attached OnStreamPost.java_new) but most of it is same as per article.
Objective: We have existing page '1FHLBA1' where we post data using RFA 7.2 libraries. We are upgrading to EMA libraries and want to test posting data to same page. I am able to retrieve data from the page
'1FHLBA1' ' (see lines 45-82 in attached OnStreamPost.log). Next step is to test updating Fid #339 on
1FHLBA1 (refer to line 72 in OnStreamPost.log).
Error: Per lines 84-96 in the log file, I noticed AckMsg(s) with errors.
Please advice if we are using correct values in Service/ Name etc. and if the callbacks/flow we are using are correct for updating target page 1FHLBA1
Thanks!
0 -
You need the Contribution Channel in order to post data to the Real-Time network.
Please let me know if you have the Contribution Channel.
0 -
We don’t have contribution channel. We have been posting to service = DCS_MARKETLINK
0 -
Yes, you need to post to the MarketLink service.
Howerver, MarketLink is being replaced with Contribution Channel as the means of contribution.
0 -
Do you have sample program to test with?
How do we find configuration info required for this specific to our environment, for eg Channel Name?
0 -
Also, can we continue to use MarketLink service? Is there any timeline when Marketlink is going to be obsolete?
0 -
Please contact the product support team directly via MyAccount regarding the MarketLink service.
Regarding the Contribution Channel examples, please refer to the Contributing your data to Refinitiv article.
0 -
We are testing using the example in above link under section: "Contribution through Refinitiv's Real-Time Distribution System"
We are able to receive the RefreshMsg from the target page with existing data.
Received Refresh. Item Handle: 2 Closure: com.refinitiv.ema.access.OmmConsumerImpl@fb445a3
Item Name: 1FHLBA1
Service Name: IDN_RDF
Item State: Open / Ok / None / '*All is well'
Fid: 1 Name = PROD_PERM DataType: UInt Value: 3784
Fid: 2 Name = RDNDISPLAY DataType: UInt Value: 151
Fid: 259 Name = RECORDTYPE DataType: UInt Value: 25However when we are trying to update value of a specific field (say Fid:1) in callback method onRefreshMsg( ) using below code,
PostMsg postMsg = EmaFactory.createPostMsg(); UpdateMsg nestedUpdateMsg = EmaFactory.createUpdateMsg().streamId(refreshMsg.streamId()).name("1FHLBA1"); FieldList nestedFieldList = EmaFactory.createFieldList(); nestedFieldList.add(EmaFactory.createFieldEntry().intValue(1, 3785)); nestedUpdateMsg.payload(nestedFieldList ); ((OmmConsumer)event.closure()).submit( postMsg.postId( ++postId).serviceName("DCS_MARKETLINK")
.name( "1FHLBA1" )
.solicitAck( true ).complete(true)
.payload(nestedUpdateMsg), event.handle() );we get error:
Received AckMsg. Item Handle: 1 Closure: com.refinitiv.ema.access.OmmConsumerImpl@fb445a3
Item Name: 1FHLBA1
Service Name: not set
Ack Id: 2
Nack Code: DeniedBySource
Text: Unable to update fixed area of page or non-contributable fieldIs this because we need to setup the update msg in a different way?
Thanks
-Parik
0 -
-
Thanks for response. Below is the code snippet of current implementation using RFA7.2, where we are sending multiple field records using a byte[ ]
private void publish(String type, byte[] buffer) { MarketDataItemCont itemPub = new MarketDataItemCont();
itemPub.setServiceName(super.getServiceName());
if (IS_DTS_INSERT) {
if (type == "Image")
itemPub.setItemName(DTS_INSERT_TYPE);
else
itemPub.setItemName(super.getItemName());
} else
itemPub.setItemName(super.getItemName());
itemPub.setBuffer(buffer);
// publish the contribution/insert
_contID = MarketDataContributor.contribute(itemPub); }The buffer is created from multiple Field Records. For e.g. actual records to be posted:
Field Name Field Value
[ ROW80_12 ] ' *MINIMUM BID OF $10 MILLION AND INCREMENTS OF $5 MILLION. '
[ ROW80_13 ] ' '
[ ROW80_10 ] ' BIDS DUE BACK AT: 12:10 '
[ ROW80_11 ] ' *ALL-IN BIDS '
[ ROW80_3 ] ' AMOUNT (MIL) MATURITY MATURITY DATE SETTLEMENT '
[ ROW80_4 ] ' $250.000 4WK 06/04/25 05/06/25 '
[ ROW80_2 ] ' FHLB DISCOUNT NOTE AUCTION 05/05/25 '
[ ROW80_7 ] ' CANCELED 17WK 09/03/25 05/06/25 '
[ ROW80_8 ] ' $120.000 26WK 11/05/25 05/06/25 '
[ ROW80_5 ] ' $250.000 8WK 07/02/25 05/06/25 '
[ ROW80_18 ] ' '
[ ROW80_6 ] ' CANCELED 13WK 08/06/25 05/06/25 '
[ ROW80_19 ] ' '
[ ROW80_16 ] ' '
[ ROW80_17 ] ' '
[ ROW80_9 ] ' '
[ ROW80_14 ] ' NO AUCTIONED DISCOUNT NOTES MATURE ON 05/06/25. '
[ ROW80_15 ] ' 'Converted to byte[ ] buffer:
[28, 53, 29, 29, 49, 70, 72, 76, 67, 65, 31, 30, 51, 50, 54, 31, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 42, 77, 73, 78, 73, 77, 85, 77, 32, 66, 73, 68, 32, 79, 70, 32, 36, 49, 48, 32, 77, 73, 76, 76, 73, 79, 78, 32, 65, 78, 68, 32, 73, 78, 67,
………
……..
32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 28]
Now with EMA libraries how do we set these records and post?
Does it have to be one record at a time or multiple records at once? Do you have sample program for it?
I could not find any example with EmaFactory class.
Thanks
-Parik
0 -
@Jirapongse This worked like a charm. Thanks much for support. We will follow these guidelines and test to make sure everything works as expected.
Regards,
-Parik
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 689 Datastream
- 1.4K DSS
- 627 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 559 WebSocket API
- 39 FX Venues
- 15 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 24 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 279 Open PermID
- 45 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2K Refinitiv Data Platform
- 708 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 106 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 96 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛