Hi,
I wonder if there is a way to use c.java to make a synchronous subscription to the tickerplant, confirming that subscription was successful?
1.To receive data ticks from tickerplant k() function needs to be called (which blocks on the socket stream).
2.To send a (re)subscription request synchronously k(.u.sub[ ]) is called, which calls w(1 /* sync */, r), and then k under the hood, blocking on k.
3.Because k() in (1) was called first it will receive the response, and k(r) from (2) will block waiting for the next response.
4.Because k(r) called in (2) is synchronized, it is not possible to invoke it to re-subscribe using the same c instance.
5.Note that ks(r) cant be used to do sync subscription because it uses w(0 /* async */, r). When tickerplant receives an async IPC subscription request, the response is not delivered to the client, and there is no way of telling that it was successful.
6.One way to solve it is to call w(0, r) in a derived class (its protected) and call it instead of k(r) in (2). Then k() in (1) becomes the only place where responses from the tickerplant are managed.
How would you recommend to solve this problem?