NCache For Pub/Sub Messaging Cache
NCache provides a Pub/Sub messaging paradigm to publish or subscribe messages. It is responsible for exchanging messages between multiple applications where the Publisher sends the messages without knowing who the subscriber(s) is. The channel used for the exchange of messages is called Topic and the subscriber subscribes to their topic of interest for receiving the relevant messages. NCache provides multiple types of subscriptions between the subscribers and publishers.
Pub/Sub Messaging Cache: NCache Demonstration using Sample Node.js Application
Follow the steps mentioned here to see how NCache is used to perform various operations on your Node.js application's data.
Important
Before getting started with NCache in Java, take the following prerequisites under consideration: JDK 17 is installed. The Environment Variable for Java Home is set.
Step 1: Download Sample from GitHub
Go to the NCache repository on GitHub and download the entire repository or the Pub/Sub messaging sample you are interested in.
Step 2: Launch the Project
Launch your Node.js Pub/Sub messaging sample application in Visual Studio 2022 or above.
Step 3: Configure Settings
After launching the project, locate and open the app-config.json file where you have to change the name of your cache to the one created before.
Step 4: Build and Run Sample
After configuring the cache settings, build the sample application for further use.
See Also
Create Distributed Cache
Create Distributed Cache with Persistence
Use NCache for ASP.NET Core Sessions
Use NCache for .NET Data Caching