question

Upvotes
Accepted
7 1 0 5

EMA Subscription service not up message

I am simply subscribing RIC as : consumerSubscriber.registerClient(reqMsg.serviceName(serviceName) .name(ricString),this);


But there was cases when OnAllMsg receive status as "Service Not Up". May I know scenario when we will get this message and what can we do to fix this.


RFA Dispatch Thread]: Data State : [Suspect], Stream State : [Open] , MDS Status response [Service not up] for problematic RIC : [RIC NAME]


For same RIC, expected message is :

Data State : [Suspect], Stream State : [CLOSED] , MDS Status response [*RIC NOT FOUND] for problematic RIC : [RIC NAME]


Thanks,

Vikas



#technologyema-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
24.4k 53 17 14

Hello @vikas.chaudhary

Thank you for the information. I am checking the API side. The "Service not up" message is generated from the API when it receives the Directory Response message with ServiceState not up and not accepting requests.

directory-state.png

I can replicate the issue by connecting the EMA Java Cons100 to IProvider100 example and setting the Directory's ServiceState/AcceptingRequests to 0.

<StateFilter>
    <ServiceState value="0"/>     <AcceptingRequests value="0"/> </StateFilter>

The Cons100 returns the following message:

StatusMsg
    streamId="5"
    domain="MarketPrice Domain"
    state="Open / Suspect / None / 'Service not up'"
    name="IBM.N"
    serviceName="DIRECT_FEED"
StatusMsgEnd

If you can replicate the issue on demand, I recommend you enable the XML trace file and share it, so we can check the incoming Directory Response message in detail.

However, this issue is related to the Directory Response message from the server, so I recommend you check with the server-side team as well.


directory-state.png (170.5 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

I am not sure I am subscribing to DIRECTORY. May I know how to check that. or it means that when at server end it wont receive any new subscription request then client received "Service Not Up". so in that case how can client reconnect and process request.

Just calling below to subscribe RIC:

long ricSubscriptionHandleLong = consumerSubscriber.registerClient(reqMsg.serviceName(serviceName) .name(ricString),this);


Also, I am comparing response before processing:

msg.domainType() == EmaRdm.MMT_MARKET_PRICE

and I am recieving ric name in response.


Also, can you please help when will I get contributionID as 0 as few ric I am not getting response back when ricSubscriptionHandleLong is 0.


Hello @vikas.chaudhary

When the application creates the OmmConsumer object (EmaFactory.createOmmConsumer), the API automatically sends the Login request message and subscribes to DIRECTORY (service) and DICTIONARY information for the application under the hood.

When the application requests a RIC, the API checks the Directory (service) information. If the Servrice's ServiceState is not up and not accepting requests, it returns a "Service not up" message to the application.

That is the reason I asked you to enable the XML trace message to verify a Directory response message from the backend.

The XML trace message also lets us verify the contribution result too.

Thanks Wasin,

I'll check with our server side team too. But is there any thing can be done at client side to fix at run time.


Show more comments
Upvotes
24.4k 53 17 14

Hello @vikas.chaudhary

Thank you for reaching out to us. Can you give us more detail about the application and issue behavior as follows?

  • Is it EMA C++ or EMA Java API?
  • The version of EMA API that encounters the problem
  • Platform, OS, and Compiler version
  • Do you connect to the local RTDS or RTO (cloud)?

Basically, if the subscription service is not available or down, the API returns a "Service not available" status message to the application.

To let us check this "Service not up" message in detail, please share the XML trace messages when the problem occurs. You can enable the XML trace from the following EMA configuration parameters:

  • EMA Java: XmlTraceToStdOut set to 1
  • EMA C++: XmlTraceToFile or XmlTraceToStdout set to 1

Please see more detail in the Logger Configuration section of the Enterprise Message API (EMA) - Configuration Overview article.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1. Its EMA Java API

2. emaVersion = '3.6.0.0' etaVersion = '3.6.0.0'

3. Linux environment

4. Connect to ATS server


I don't have currently XmlTraceToStdOut set up.


Thanks

Upvotes
24.4k 53 17 14

Hello @vikas.chaudhary

Question 1: Service is Down: How will our application receive the status of any of the services after our initial createOmmConsumer() without registering your interest in MMT_DIRECTORY?

Answer: Unfortunately, the application needs to register the DIRECTORY service to get the backend's service information before requesting RICs.

Question 2: Server not accepting Request: How application know if the server is not accepting any request?

Answer: The application can subscribe to DIRECTORY (service) manually to get the service information as follows:

ReqMsg reqMsg = EmaFactory.createReqMsg();
consumer.registerClient(reqMsg.domainType(EmaRdm.MMT_DIRECTORY).serviceName("<Service Name>"), appClient);

Then the application will receive the Service Information via the callback methods (onRefreshMsg, onUpdateMsg, onStatusMsg, etc.). The application can check the Service's ServiceState and AcceptingRequests from the Directory response message.

Example message:

Received Refresh. Item Handle: 1 Closure: null
Item Name: <not set>
Service Name: <not set>
Item State: Open / Ok / None / ''
ID: 1 Action = Set DataType: ElementList Value: 
 Name = Name DataType: Ascii Value: DIRECT_FEED
 Name = Vendor DataType: Ascii Value: company name
 Name = IsSource DataType: UInt Value: 0
 Name = Capabilities DataType: OmmArray Value: 5, 6, 7, 8, 10, 200
 Name = DictionariesProvided DataType: OmmArray Value: RWFFld, RWFEnum
 Name = DictionariesUsed DataType: OmmArray Value: RWFFld, RWFEnum
 Name = QoS DataType: OmmArray Value: RealTime/TickByTick
 Name = SupportsQoSRange DataType: UInt Value: 0
 Name = ItemList DataType: Ascii Value: #.itemlist
 Name = SupportsOutOfBandSnapshots DataType: UInt Value: 0
 Name = AcceptingConsumerStatus DataType: UInt Value: 1
ID: 4 Action = Set DataType: ElementList Value: 
 Name = OpenLimit DataType: UInt Value: 2400
ID: 2 Action = Set DataType: ElementList Value: 
 Name = ServiceState DataType: UInt Value: 0
 Name = AcceptingRequests DataType: UInt Value: 1

You can see the example code in the Cons331/ex331_Directory_Streaming example

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Do we need to register for Directory service once and callback for Directory will be automatically called if there is any change in Directory state or we need to explicitly register each time for callback method to check.

we are doing pub-sub over RTDS infra where there are multiple layers of resiliencies

Pub -> RTDS Infra -> Sub & Posting

As we are having DirectoryStatus is "Service Not up" while subscribing so we will be subscribing only when Directory status is up.

Upvotes
24.4k 53 17 14

Hi @vikas.chaudhary

I highly recommend you try the ex331_Directory_Streaming example in your environment.

This statement always subscribes to streaming Directory service information by default:

OmmConsumer.registerClient(reqMsg.domainType(EmaRdm.MMT_DIRECTORY).serviceName("<Service Name>"), appClient);

Any changes to the service will come to the APIs via the callback methods.

Example DIRECT_FEED

service-down.png

Step 1: service down, calls registerClient for EmaRdm.MMT_DIRECTORY: Get status information via the onRefreshMsg method.

Received Refresh. Item Handle: 1 Closure: null
Item Name: <not set>
Service Name: <not set>
Item State: Open / Ok / None / ''
ID: 1 Action = Set DataType: ElementList Value: 
 Name = Name DataType: Ascii Value: DIRECT_FEED
....
ID: 2 Action = Set DataType: ElementList Value: 
 Name = ServiceState DataType: UInt Value: 0
 Name = AcceptingRequests DataType: UInt Value: 1

Step 2: Start the service, and get a Directory Update message from the onUpdateMsg method

service-up.png

Received Update. Item Handle: 1 Closure: null
Item Name: <not set>
Service Name: <not set>
ID: 1 Action = Set DataType: ElementList Value: 
 Name = Name DataType: Ascii Value: DIRECT_FEED
....
ID: 2 Action = Set DataType: ElementList Value: 
 Name = ServiceState DataType: UInt Value: 1
 Name = AcceptingRequests DataType: UInt Value: 1




service-down.png (24.6 KiB)
service-up.png (25.0 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
7 1 0 5

I have subscribed the DIRECTORY Service and there was no status received as "Service not up" but still got application issue.


Data State : [Suspect], Stream State : [Open] , MDS Status response [Service not up] for problematic RIC : [RIC NAME : XYZ]

Background :

1. We created emasubscriber at start of application 06:30 GMT.

2. Subscribed RICs (~ number of rics 300 ) and correct response received till 14:55 GMT.

Data State : [Suspect], Stream State : [CLOSED] , MDS Status response [*RIC NOT FOUND^@] for problematic RIC : [RIC NAME : ABC]

3. All RICS (total : 210) subscribed after 15:25 got message "Service Not Up".. Not even a single subscription was successful.

4. Restarted application and it fixes the issue.


I believe its not linked with Server DIRECTORY service. Do we need to re-initiate session? Please advise.



icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
24.4k 53 17 14

Hello @vikas.chaudhary

I am sorry to hear that the issue persists in your environment. This issue needs to be investigated in more detail from the Real-Time APIs support team (RDC). You can submit a support ticket to the RDC team via the "Contact premium support" button on the RTSDK Java page as follows.

rtsdk-contact-support.png


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

I dont have Premium Support enabled for me. Please advise.
Upvotes
7 1 0 5

Hi Wasin,

Debug further and adding more information. Appreciate if you can help.

We have 2 session that shared same consumer name and channel name.

There was connection down event after that subscription start getting response about "service not up" but other session seems working as expected.

2023-05-24 15:25:30,137

statusMessage [StatusMsg

streamId="1"

domain="Login Domain"

state="Open / Suspect / None / 'channel down'"

name="user_id"

nameType="1"

StatusMsgEnd

]

Although, Connection was up after few moments :

2023-05-24 15:25:31,217

statusMessage [StatusMsg

streamId="1"

domain="Login Domain"

state="Open / Ok / None / 'channel up'"

name="user_id"

nameType="1"

StatusMsgEnd

]


Please advise what could be wrong here.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.