question

Upvotes
Accepted
17 0 0 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?

elektronrefinitiv-realtimeelektron-sdkrrtema-apielektron-message-apimrnconsumer
icon clock
10 |1500

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

Upvote
Accepted
9.7k 49 38 60

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 5.0 MiB each and 10.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 0 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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea