Skip to content

hazelcast-guides/write-through-cache-mongodb-mapstore

Repository files navigation

Use Hazelcast as a Write-Through Cache with MongoDB

This is an example of how to use MapStore and MongoDB with Hazelcast Cloud.

Tip
For step-by-step instructions of how to run this app, see the tutorial.

Quickstart

  1. Add the required values for Hazelcast Cloud Maven plugin in the POM:

    • clusterId: Id of your Hazelcast cluster

    • apiKey: API key

    • apiSecret: API secret

  2. Deploy the modules.

    mvn clean package hazelcast-cloud:deploy
  3. Configure the following properties for the MapStore in the Hazelcast Cloud console:

Internal Hazelcast Developers

If you want to try this application in the UAT or DEV environment, configure the apiBaseUrl element with your environment’s URL. For DEV, use https://test.dev.hazelcast.cloud, for UAT, use https://uat.hazelcast.cloud.

<plugin>
  ...
  <configuration>
    <apiBaseUrl></apiBaseURL>
    ...
  </configuration>
</plugin>