Client Configuration

Hazelcast Python Client has a simple configuration. Configuration module config is all we need.

Configuration actually creates a ClientConfig instance to start the client.

Configuration titles:

Credential Setup

GroupConfig is used to set group-name/password.

ClientConfig().group_config.name = "Group name of the Hazelcast cluster"
ClientConfig().group_config.password = "the password"

Network Configuration

In order to connect to the cluster, it’s required to setup the network details. The minimal client configuration requires a list of addresses of the cluster.

config.network_config.addresses.append('127.0.0.1')
config.network_config.addresses.append('192.168.1.99')
config.network_config.addresses.append('the-server:5702')

Another important option is to configure client operation modes as Smart or Dummy.

config.network_config.smart_routing=True #Smart Mode
config.network_config.smart_routing=False #Dummy Mode

Please see API doc for details ClientNetworkConfig

Serialization Configuration

SerializationConfig is used to configure serialization.

Please see Hazelcast Serialization

Near Cache Configuration

Near cache can be configured using NearCacheConfig. For each map there should be a matching near cache configuration with same name

config.add_near_cache_config(NearCacheConfig("map-name"))

Please see API doc for near cache configuration options: NearCacheConfig