Configuration files are provided with channel microservices. If consists of two files:
This is a standard configuration file for native microservices, where some of the parameters have been adjusted to characteristic of their functions in the environment and should be always considered in the process of system design:
- amount of memory (HEAP)
- number of threads
This file contains channels definitions and their parameters.
Each entry in this section is a definition of a channel. The name of the entry is the name of a channel that should be used during channel communication. Each channel has the following set of parameters:
The appropriate part of the configuration file:
garbageThreadAmount: 4 channelTimeOutInMilliseconds: 60000 elementTimeOutInMilliseconds: 30000 waitTimeBetweenCheckingChannelsInMilliseconds: 5000 storageClassName: 'com.jlupin.impl.microservice.partofjlupin.asynchronous.storage.streamchannel.impl.memory.JLupinMemoryStreamChannelStorageImpl'
||The number of threads assigned to channel garbage collection process (cleaning channels).|
||The maximum time (expressed in milliseconds) that a channel can be opened for publishing. After this time the garbage collector closes the channel.|
||The maximum time (expressed in milliseconds) that a message is kept by a channel until it's sent to the subscriber. After this time the garbage collector discard the message.|
||The time period (expressed in milliseconds) at which the garbage collector check and clean a channel.|
||The implementation class of storage, where messages are located (default is in-memory)|
Example configuration (channels.yml)
CHANNELS: SAMPLE: garbageThreadAmount: 4 channelTimeOutInMilliseconds: 60000 elementTimeOutInMilliseconds: 30000 waitTimeBetweenCheckingChannelsInMilliseconds: 5000 storageClassName: 'com.jlupin.impl.microservice.partofjlupin.asynchronous.storage.streamchannel.impl.memory.JLupinMemoryStreamChannelStorageImpl'