Questo contenuto non è disponibile nella lingua selezionata.
35.2. Configuring the Duplicate ID Cache
The server maintains caches of received values of the
org.hornetq.core.message.impl.HDR_DUPLICATE_DETECTION_ID property sent to each address. Each address has its own distinct cache.
The cache is a circular fixed size cache. If the cache has a maximum size of
n elements, then the n + 1th id stored will overwrite the 0th element in the cache.
The maximum size of the cache is configured by the parameter
id-cache-size in <JBOSS_HOME>/jboss-as/server/<PROFILE>/deploy/hornetq/hornetq-configuration.xml. The default value is 2000 (elements).
The caches can also be configured to persist to disk or not. This is configured by the parameter
persist-id-cache, also in <JBOSS_HOME>/jboss-as/server/<PROFILE>/deploy/hornetq/hornetq-configuration.xml. If this is set to true then each id will be persisted to permanent storage as it is received. The default value for this parameter is true.
Note
When choosing a size for the duplicate id cache, be sure to set it to a size large enough to prevent the previously sent messages from being overwritten.