Need to publish new data but without previously published records
Hello team
I am trying to publish new record but it is getting publish with previously published records, and I not need to publish the previously published records need to publish freshly publishing records.
Please help
Answers
-
Hello @nsharma
Are you using the Interactive Provider (IProvider) or Non-Interactive Provider (NIProvider)? Could you please share the code and the API detail that publishes data?
If you are using the IProvider, you can publish an item Refresh message (Image) with the following code:
Example from EMA Java:
FieldList fieldList = EmaFactory.createFieldList();
// Note: reqMsg.name() is a requested Item Name
fieldList.add(EmaFactory.createFieldEntry().ascii(3, reqMsg.name()));
fieldList.add(EmaFactory.createFieldEntry().enumValue(15, 840));
fieldList.add(EmaFactory.createFieldEntry().real(21, 3900, OmmReal.MagnitudeType.EXPONENT_NEG_2));
fieldList.add(EmaFactory.createFieldEntry().real(22, 3990, OmmReal.MagnitudeType.EXPONENT_NEG_2));
...
event.provider().submit(EmaFactory.createRefreshMsg().serviceName(reqMsg.serviceName()).name(reqMsg.name()).
state(OmmState.StreamState.OPEN, OmmState.DataState.OK, OmmState.StatusCode.NONE, "Refresh Completed").solicited(true).
payload(fieldList).complete(true), event.handle());Then, the code to publish Update message:
FieldList fieldList = EmaFactory.createFieldList();
UpdateMsg updateMsg = EmaFactory.createUpdateMsg();
provider = EmaFactory.createOmmProvider(EmaFactory.createOmmIProviderConfig(). operationModel(OmmIProviderConfig.OperationModel.USER_DISPATCH), appClient );
...
provider.dispatch(1000);
fieldList.clear();
fieldList.add(EmaFactory.createFieldEntry().real(22, 3991 + i, OmmReal.MagnitudeType.EXPONENT_NEG_2));
fieldList.add(EmaFactory.createFieldEntry().real(25, 3994 + i, OmmReal.MagnitudeType.EXPONENT_NEG_2));
provider.submit(updateMsg.clear().payload(fieldList), appClient.itemHandle );You can find more IProvider and NIProvider examples on GitHub:
0 -
Thank you for the response.
Currently the service is down at our end once it is up will test and let you know if fieldList.clear(); worked.
0 -
Hello @nsharma
Thank for the information. Can you give us more detail about an application, and the issue as follows?
- The API version and edition (Java, C++, C#)
- Are you using the IProvider or NIProvider?
- Do you publish data to consumer app directly or to deployed RTMDS
- You are going to publish a new record (new item) data via Refresh Message, am I correct?
- Can you explain more detail what are you going to do?
- Snippet code that publishes data
- The application log and API XML trace messages (<XmlTraceToStdout value="1"/>) when the problem occur
0 -
Hello @nsharma
If you are using the OmmConsumer to publish (post) data, are you using the On-Stream (post via an opened item stream) or via the Off-Stream (via the Login stream)?
If you are using the On-Stream, the post data must be the item that an application is subscription to only. You cannot publish a new item data via an On-Stream.
0 -
- The API edition is Java
- Using NiProvider
- Directly
- Yes, publishing new records via Refresh Message,
- I am trying to publish for RIC = Trigger_RSU_EOD and servicename = RSU_EOD for field TRDPRC_1 (FID = 5) this need to be published at once only but it is publishing for all other RICs also.
- Attached Snippet code and application log file for reference
- I am using the Off-Stream (via the Login stream)
- Below is the log content as I am unable to attach log file.
Received Refresh. Item Handle: 1 Closure: com.refinitiv.ema.access.OmmConsumerImpl@608399cd
Item Name: rsu_gs_pub_test
Service Name: RSU_EOD
VALUE OF COUNT IS :::: 0
Item State: Open / Ok / None / 'Login accepted by host hcb-vsl05-eqf2.'
Name = AllowSuspectData DataType: UInt Value: 1
Name = ApplicationId DataType: Ascii Value: 256
Name = ApplicationName DataType: Ascii Value: ADS
Name = Position DataType: Ascii Value: 100.65.233.43/rsu0l01mhau0002
Name = ProvidePermissionExpressions DataType: UInt Value: 1
Name = ProvidePermissionProfile DataType: UInt Value: 0
Name = SingleOpen DataType: UInt Value: 1
Name = SupportEnhancedSymbolList DataType: UInt Value: 1
Name = SupportOMMPost DataType: UInt Value: 1
Name = SupportPauseResume DataType: UInt Value: 0
Name = SupportStandby DataType: UInt Value: 1
Name = SupportStandbyMode DataType: UInt Value: 3
Name = SupportBatchRequests DataType: UInt Value: 7
Name = SupportViewRequests DataType: UInt Value: 1
Name = SupportOptimizedPauseResume DataType: UInt Value: 0
========Getting Extra FIDs Published but trying for FID = 6 =============
Received Refresh. Item Handle: 2 Closure: com.refinitiv.ema.access.OmmConsumerImpl@608399cd
Item Name: TRIGGER_RSU_EOD
Service Name: RSU_EOD
VALUE OF COUNT IS :::: 0
Item State: Open / Ok / None / ''
Fid: 6 Name = TRDPRC_1 DataType: Real Value: 2.0
Fid: 17 Name = ACTIV_DATE DataType: Date Value: 10 / 3 / 2025
Fid: 21 Name = HST_CLOSE DataType: Real Value: 0.0
Fid: 22 Name = BID DataType: Real Value: 0.0
Fid: 25 Name = ASK DataType: Real Value: 0.0
Fid: 134 Name = MID_PRICE DataType: Real Value: 0.0
Fid: 393 Name = PRIMACT_1 DataType: Real Value: 0.0
Fid: 8776 Name = PRE_LB001 DataType: Rmtes Value: TRIGGER_RSU_EOD
Fid: 8777 Name = PRE_LB002 DataType: Rmtes Value: USD
Fid: 8778 Name = PRE_LB003 DataType: Rmtes Value: ACTIV_DATE;PRE_LB002;MID_PRICE;PRE_LB010
Fid: 25100 Name = MARKET_DATE DataType: Rmtes Value: blank
Fid: 25123 Name = RECOVERY DataType: Real Value: 0.0
Fid: 25157 Name = ASW_SPREAD DataType: Real Value: 0.0============================Trying to publish for only below record ====================================
Received Refresh. Item Handle: 2 Closure: com.refinitiv.ema.access.OmmConsumerImpl@608399cd
Item Name: TRIGGER_RSU_EOD
Service Name: RSU_EOD
VALUE OF COUNT IS :::: 0
Item State: Open / Ok / None / ''
Fid: 6 Name = TRDPRC_1 DataType: Real Value: 1.0Received AckMsg. Item Handle: 1 Closure: com.refinitiv.ema.access.OmmConsumerImpl@608399cd
Item Name: TRIGGER_RSU_EOD
Service Name: RSU_EOD
Ack Id: 1Received Status. Item Handle: 2 Closure: com.refinitiv.ema.access.OmmConsumerImpl@608399cd
Item Name: TRIGGER_RSU_EOD
Service Name: RSU_EOD
Item State: Closed / Suspect / None / 'Login stream was closed.'=======================================================================================================
Item Name: rsu_gs_pub_test
Service Name: RSU_EOD
VALUE OF COUNT IS :::: 1
Item State: Open / Ok / None / 'Login accepted by host hcb-vsl05-eqf2.'
Name = AllowSuspectData DataType: UInt Value: 1
Name = ApplicationId DataType: Ascii Value: 256
Name = ApplicationName DataType: Ascii Value: ADS
Name = Position DataType: Ascii Value: 100.65.233.43/rsu0l01mhau0002
Name = ProvidePermissionExpressions DataType: UInt Value: 1
Name = ProvidePermissionProfile DataType: UInt Value: 0
Name = SingleOpen DataType: UInt Value: 1
Name = SupportEnhancedSymbolList DataType: UInt Value: 1
Name = SupportOMMPost DataType: UInt Value: 1
Name = SupportPauseResume DataType: UInt Value: 0
Name = SupportStandby DataType: UInt Value: 1
Name = SupportStandbyMode DataType: UInt Value: 3
Name = SupportBatchRequests DataType: UInt Value: 7
Name = SupportViewRequests DataType: UInt Value: 1
Name = SupportOptimizedPauseResume DataType: UInt Value: 0
======================== Value getting published for below FIDs =============================
Item Name: EURCHF=ACTICO
Service Name: RSU_EOD
VALUE OF COUNT IS :::: 1
Item State: Open / Ok / None / ''
Fid: 6 Name = TRDPRC_1 DataType: Real Value: 1.0 ========== This is published for only 1 RIC but it is coming for other too.
Fid: 15 Name = CURRENCY DataType: Enum Value: CHF
Fid: 17 Name = ACTIV_DATE DataType: Date Value: 24 / 4 / 2025
Fid: 21 Name = HST_CLOSE DataType: Real Value: 0.0
Fid: 22 Name = BID DataType: Real Value: 0.9402
Fid: 25 Name = ASK DataType: Real Value: 0.9402
Fid: 134 Name = MID_PRICE DataType: Real Value: 0.9337 ===== Have replaced it with the 25102 but still it is getting publish
Fid: 393 Name = PRIMACT_1 DataType: Real Value: 0.0 ==== Have replaced it with the 25103 but still it is getting publish
Fid: 4402 Name = TENOR DataType: Rmtes Value: blank
Fid: 8776 Name = PRE_LB001 DataType: Rmtes Value: FXSPOT_EUR_CHF
Fid: 8777 Name = PRE_LB002 DataType: Rmtes Value: USD
Fid: 8778 Name = PRE_LB003 DataType: Rmtes Value: TIMACT;ASK;BID;LATEST
Fid: 25100 Name = MARKET_DATE DataType: Rmtes Value: 20250424
Fid: 25101 Name = MARKET_TIME DataType: Rmtes Value: 143008
Fid: 25102 Name = MID DataType: Real Value: 0.94025
Fid: 25103 Name = LATEST DataType: Real Value: 0.0
Fid: 25123 Name = RECOVERY DataType: Real Value: 0.0
Fid: 25157 Name = ASW_SPREAD DataType: Real Value: 0.0
Fid: 25165 Name = PRICING_SOURCE DataType: Rmtes Value: REUTERS
Fid: 25166 Name = PRICING_SOURCE_CODE DataType: Rmtes Value: REUTERS
============================================================== Publishing below things FIDs====================================================
Item Name: EURCHF=ACTICO
Service Name: RSU_EOD
VALUE OF COUNT IS :::: 1
Item State: Open / Ok / None / ''
Fid: 15 Name = CURRENCY DataType: Enum Value: CHF
Fid: 17 Name = ACTIV_DATE DataType: Date Value: 24 / 4 / 2025
Fid: 22 Name = BID DataType: Real Value: 0.9402
Fid: 25 Name = ASK DataType: Real Value: 0.9402
Fid: 25102 Name = MID DataType: Real Value: 0.94025
Fid: 25103 Name = LATEST DataType: Real Value: 0.0
Fid: 21 Name = HST_CLOSE DataType: Real Value: 0.0
Fid: 25100 Name = MARKET_DATE DataType: Rmtes Value: 20250424
Fid: 25101 Name = MARKET_TIME DataType: Rmtes Value: 143008
Fid: 25123 Name = RECOVERY DataType: Real Value: 0.0
Fid: 25157 Name = ASW_SPREAD DataType: Real Value: 0.0
Fid: 25165 Name = PRICING_SOURCE DataType: Rmtes Value: REUTERS
Fid: 25166 Name = PRICING_SOURCE_CODE DataType: Rmtes Value: REUTERS
Fid: 8776 Name = PRE_LB001 DataType: Rmtes Value: FXSPOT_EUR_CHF
Fid: 8777 Name = PRE_LB002 DataType: Rmtes Value: USD
Fid: 8778 Name = PRE_LB003 DataType: Rmtes Value: TIMACT;ASK;BID;LATEST
Fid: 4402 Name = TENOR DataType: Rmtes Value: blankReceived AckMsg. Item Handle: 3 Closure: com.refinitiv.ema.access.OmmConsumerImpl@7eb7aed8
Received Status. Item Handle: 4 Closure: com.refinitiv.ema.access.OmmConsumerImpl@7eb7aed8
Item Name: EURCHF=ACTICO
Service Name: RSU_EOD
Ack Id: 2
Item Name: EURCHF=ACTICO
Service Name: RSU_EOD
Item State: Closed / Suspect / None / 'Login stream was closed.'0 -
Hello
I checked the given log, but I am still not clear about an application behavior.
- An application sends a post message for item TRIGGER_RSU_EOD service RSU_EOD with TRDPRC_1 field only
- An application also subscribes for EURCHF=ACTICO item
- The TRDPRC_1 value 1.0 has been posted for the TRIGGER_RSU_EOD item, but it also comes with EURCHF=ACTICO item too, am I correct?
- The EURCHF=ACTICO item has been posted with MID_PRIC field value 25102 and PRIMACT_1 field value 25103 but comes with other values (0.9337 and 0.0), am I correct?
- Does the TRIGGER_RSU_EOD item and EURCHF=ACTICO item are related?
- Does your application is only instance that publish TRIGGER_RSU_EOD and EURCHF=ACTICO items to your environment?
According to the given code, an application is clearly a consumer application that sends a Post message to the infrastructure. I am assuming that it is posting to ATS or RTDS Cache (A or B diagram below). Which one is your connection scenario?
If it is RTDS Cach scenario (diagram B), an application may need to ask the RTDS to clear cache for the posted item in a refresh message.
nestedRefreshMsg.payload(nestedFieldList ).complete(true).clearCache(true); ((OmmConsumer)event.closure()).submit( …..payload(nestedRefreshMsg), event.handle() );
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
- 684 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 249 ETA
- 554 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 643 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
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 192 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛