question

Upvotes
Accepted
37 14 15 18

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 512.0 KiB each and 1.0 MiB total.

Hi @josa,

Thank you for your participation in the forum.

Is the reply below satisfactory in resolving your query? If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question.

Thanks,

AHS

Upvotes
Accepted
32.2k 40 11 20

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 512.0 KiB each and 1.0 MiB total.

Upvotes
22.1k 59 14 21

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 512.0 KiB each and 1.0 MiB total.

Upvotes
37 14 15 18

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 512.0 KiB each and 1.0 MiB total.

Upvotes
22.1k 59 14 21

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 512.0 KiB each and 1.0 MiB total.

Upvotes
37 14 15 18

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 512.0 KiB each and 1.0 MiB total.

Upvotes
22.1k 59 14 21

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 512.0 KiB each and 1.0 MiB total.

Upvotes
37 14 15 18

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 512.0 KiB each and 1.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
79.1k 250 52 74

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 512.0 KiB each and 1.0 MiB total.

Upvotes
37 14 15 18

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 512.0 KiB each and 1.0 MiB total.

Upvotes
37 14 15 18

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 512.0 KiB each and 1.0 MiB total.

Upvotes
37 14 15 18

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 512.0 KiB each and 1.0 MiB total.

Upvotes
37 14 15 18

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