Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to get some guidance and a sample on this:

I have a subscribe - publish WCF service, the service is hosted in a Windows Service. The data the Windows Service processes is being sent to subscribed clients - by the service it runs computates and automatically pushes to all subscribed clients. Also for some methods I need to use callbacks to Client Requests from Service. However I also need to publish the data the Service is continuously generating through it's tasks (once per second sending updates to the clients - I am using the Callback method to do this and you guessed it when more than one method is sending lots of data I get a crash of the communicationobject. I read this WCF CallBack Blocks other Callbacks (on stackoverflow), My scenario is different in that I have multiple methods pushing data (about 30 rows x 12C) every 1 second. Since my Client hangs and the CommunicationObject goes bust I can not publish. I would like to know if I can just have a DuplexChannel for the subscribing and general functions and then when I need to publish from the service just add a separate Channel maybe create it on the fly in the service and send the data? If there is anyone with any experience or samples of this I would appreciate it.

Or maybe you can tell me I am all wrong in this and WCF will send callbacks at this rate to multiple methods with no problems and here is a sample how to do that. My current settings are: It is a singleton service - running 24/7 subscribers are stored in a dictionary. InstanceContextMode=InstanceContextMode.Single, ConcurrencyMode = Multiple, UseSynchronizationContext=true NetTcpBinding. Any help is appreciated.
Posted
Updated 2-Sep-15 8:12am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900