New posts are disabled while we improve the user experience.

You can browse the site, or for urgent issues, raise a query at MyAccount.

question

Upvotes
Accepted
17 0 1 4

Using one consumer-client for two RICs?

Hi,

We are currently in the test phase of consuming data in the News Text Analytics domain.

And we consume two contents, MRN_STORY and MRN_TRNA.

Currently we have two services receiving each content separately and then joining them afterwards.

1

consumer.registerClient(EmaFactory.createReqMsg().domainType(EmaRdm.MMT_NEWS_TEXT_ANALYTICS).serviceName("ELEKTRON_DD").name("MRN_STORY"), eventHandler);

2

consumer.registerClient(EmaFactory.createReqMsg().domainType(EmaRdm.MMT_NEWS_TEXT_ANALYTICS).serviceName("ELEKTRON_DD").name("MRN_TRNA"), eventHandler);

Is there a possibility to consume both together in one consumer-client, which makes joining easier?

refinitiv-realtimeelektronelektron-sdkema-apirrtelektron-message-apimrnconsumer
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.

Upvote
Accepted
19.2k 86 39 63

Hi @martin.mitry,

Can you elaborate what "one consumer-client" means? In the above code segment, you are opening 2 items which will both be consumed within the same eventHandler. You are requesting from the same consumer.

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.

Hi Nick,

actually we have two different classes each having one of above clients.
Very strange, that I actually didn't try to register two clients, but it seems from your answer that this is possible. I will just try now :-)
Thx
Martin

Upvote
17 0 1 4

Thank You @nick.zincone.1 for pointing out that it is possible that multiple clients can be registered to the same eventHandler can handle multiple clients

OmmConsumerConfig config = EmaFactory.createOmmConsumerConfig();
consumer = EmaFactory.createOmmConsumer(config.host(C_HOST + ":" + C_PORT).username(C_USERNAME));
OmmConsumerClient eventHandler = this;

// register clients
consumer.registerClient(EmaFactory.createReqMsg().domainType(EmaRdm.MMT_NEWS_TEXT_ANALYTICS).serviceName("ELEKTRON_DD").name("MRN_STORY"), eventHandler);
consumer.registerClient(EmaFactory.createReqMsg().domainType(EmaRdm.MMT_NEWS_TEXT_ANALYTICS).serviceName("ELEKTRON_DD").name("MRN_TRNA"), eventHandler);
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.