Use NCache for Pub/Sub Messaging in .NET/.NET Core
Note
Before getting started with your application, make sure you configure the following requirements:
- For .NET Framework, minimum required version is 4.8
- For .NET Core, minimum required version is 3.1
Pub/Sub Demonstration of Pub/Sub
Follow the steps mention below to see how NCache acts as a communication medium for a Publisher/Subscribe model.
Step 1: Download Sample From GitHub
Go to NCache repository on GitHub to download the repo containing Pub/Sub sample.
Step 2: Launch the Project
Launch the Pub/Sub sample application in Visual Studio 2019 or above.
Step 3: Configure Settings
In the <appSettings>
section of App.config/Web.config, configure the cache that you created in the previous step. Save the file.
Step 4: Build the Project
Once you have configured the application with your custom cache, build the project.
Step 5: Monitor Cache Stats
To verify that NCache acts as a message broker for the sample publisher/subscriber application, NCache provides various stats counters that let you view the state of your cache. Go to Monitor Pub/Sub Topic Statistics to understand what these counters are and how to monitor them.
See Also
Use NCache for Pub/Sub Messaging in Java
Use NCache for Pub/Sub Messaging in Node.js
Pub/Sub Messaging in NCache
Use NCache for Data Caching