Hi
I run the below program which publishes to a service SERVICE on TREP using the latest RFA.net api.
It publishes 2 instruments in /exactly/ the same way but for the instrument anderstest4 the published change does not stick, regardless of the order in which I publish the instruments (or whether I publish both or not).
Furthermore, both publications receive positive acknowledgment from TREP.
There is no issue doing exactly the same using the EMA api, going through the same endpoint.
Why does TREP discard the publications for certain instruments when they come from the RFA.net api but not from EMA?
SERVICE is an internal service with a persistent cache that we update with post messages.
static void Main(string[] args)
{
Random rng = new Random();
stalltest("anderstest4", rng.NextDouble().ToString());
stalltest("anderstest42", rng.NextDouble().ToString());
}
static void stalltest(string instrument, string testvalue)
{
Realtime.TREP.Request request = Realtime.TREP.Request.As(Environment.UserName, "UAT");
var sf = request.MarketAccessTo("SERVICE");
using (var form = sf.CreatePublishingFormStream())
{
form.FillOut(instrument, "QUERY", testvalue);
form.Submit();
System.Threading.Thread.Sleep(100);
}
using (var image = sf.CreateSnapshotSubscription(new[] { instrument }, new[] { "QUERY" }))
{
string test = image.TakeSnapshot()[instrument, "QUERY"].FieldValue;
if (test != testvalue)
{
Console.WriteLine(instrument + " stalled!");
}
else
{
Console.WriteLine(instrument + " works as expected.");
}
}
}
it prints out
anderstest4 stalled!
anderstest42 works as expected.
The PublishingFormStream posts PostMsg objects off-stream with a FieldList as payload.
The FieldList contains the FID for the QUERY field and a RMTES string encoding the random double as a string.
The anderstest4 instrument was created with exactly the same code and has worked fine for some time, until it suddenly got stuck. This happens daily for other instrument that we create and publish to. We currently can't use the RFA.net api for publishing our updates because of this.
We're using ADH version adh3.2.0.L1.linux.tis.rrg 64-bit .
Sincerely
Anders A. Søndergaard