question

Upvotes
Accepted
22 7 9 11

TEST TREP Connection

Hi,

Is there a quick way I can test whether I can connect to TREP. For instance, if am connecting via OpenVPN and I have not made the OpenVPN connection before attempting to connect to TREP, I would like to know so I can exit the application. Basically I need something similar to how I can test OpenDACS daemon.

Regards,

josa

elektronrefinitiv-realtimetrep
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.

12 Answers

Upvotes
Accepted
23k 22 9 14

Hello @josa,

To me, the way to check if OpenVPN connection is successfully established,

programmatically, would be outside of RFA, via OS/shell.

By searching on this topic I can see developers recommending multiple approaches, none very simple.

The way I would prefer, personally, would be this one, via netstat and examining the output.

Another approach is openvpn --show-net

If you are coding in RFA.NET, C#, then this way seems pretty reasonable.

Hope this helps,

-Zoya

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.

Upvotes
13k 32 12 18

Hi @josa,

The ADS endpoint in TREP typically listens on TCP port 14002 for RSSL connections. You can try a telnet to that port to verify that it is connectable.

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.

Upvotes
22 7 9 11

Thanks Gurpreet. I would like to be able to do this programmatically via TREP API and not via telnet. OpenDACS has something similar that I would like to use. Can you help please?

Regards,

josa

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.

Upvotes
13k 32 12 18

You can use a barebone Elektron Message API example to check if the sample can connect and login to TREP. Get the EMA package for Java or C++ here.

Start with 100__MarketPrice__Streaming in the Examples directory.

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.

Upvotes
22 7 9 11

Thanks. Am using RFA and not Elektron. Do you have for RFA please?

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.

Upvotes
13k 32 12 18

RFA has similar examples - look at StarterConsumer in Examples directory.

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.

Upvotes
22 7 9 11

Hi @Gurpreet, I can't find this in RFA. Could help point me to which section of codes in the StarterConsumer that does this?

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.

I presume you are using RFA C++. It is not trivial to point this out in code, if you don't already develop with RFA - in which case follow the RFA tutorials here.

See method StarterConsumer::init(). Everything described in that call like acquiring the session and creating an event queue will have to be done.

Upvotes
38.1k 71 35 53

To test TREP with RFA, you can run the StaterConsumer (RFA C++, RFA .NET) or QuickStartConsumer (RFA Java) example in the RFA package. Otherwise, you can use a tool from our partner as mentioned in this question.

To test DACS Sink Daemon with OpenDACS API, you can run the dacsSubscribeClient example in OpenDACS API package or follow OpenDACS tutorials.

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.

Upvotes
22 7 9 11

Thanks @ jirapongse.phuriphanvichai. This does not answer my question. What I am interesting in programmatically is this. Am connecting to TREP test account via OpenVPN. If I have not initiated the OpenVPN connection and I run this StartConsumer examples, the application get stucked and I wont know what is going on.

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.

Upvotes
22 7 9 11

It appears you guys don't have something out of box I can use via the API, I have created a workaround, so please close this ticket.

Thanks,

@josa

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.

Upvotes
22 7 9 11

None of the answers resolved my questions.

Regards,

josa

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.

Upvotes
22 7 9 11

Thanks @zoya.farberov. Am using java. Anyway, please close the ticket.

Regards,

josa

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