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
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: https://github.com/Refinitiv/Real-Time-SDK
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.
It not worked @wasin.w
Thank for the information. Can you give us more detail about an application, and the issue as follows?
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.
============================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.0
Received AckMsg. Item Handle: 1 Closure: com.refinitiv.ema.access.OmmConsumerImpl@608399cd Item Name: TRIGGER_RSU_EOD Service Name: RSU_EOD Ack Id: 1
Received 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: blank
Received AckMsg. Item Handle: 3 Closure: com.refinitiv.ema.access.OmmConsumerImpl@7eb7aed8 Item Name: EURCHF=ACTICO Service Name: RSU_EOD Ack Id: 2
Any updates @wasin.w
Hello
I checked the given log, but I am still not clear about an application behavior.
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() );