Search code examples
c#jsonpushreal-timepush-diffusion

Updating JSON Topics in Diffusion (Unified .NET Client Api)


I'm trying to update a JSON topic using the .NET client library of Diffusion. I know that currently there is only partial support for JSON topic in .NET but I think it is possible to update topics. So I created a topic using the Javascript client api and then update it using C#. The topic is created fine using:

 var initvalue = diffusion.datatypes.json().from({ "name" : "some transaction example", "price": 2.00 });
 session.topics.add("examples/rmq/testtopic", initvalue);

but updating it in C#:

updateControl.Updater.Update("examples/rmq/testtopic", "{'name': 'some other trans','price':20}", new TopicUpdaterUpdateCallback(st));

turns the initial value void/empty.

I am not able to find any resources with regards to JSON topics and .NET, so I would appreciate your help.


Solution

  • Unfortunately, the Diffusion client library for .NET has no support for JSON topics. However the upcoming version of the client library will include full JSON and binary topic support.

    Update: I am now happy to report that we released Diffusion 5.8 which includes full JSON and binary topic support. You can get the latest client libraries via nuget