Configure the Duplicate ID Cache
37.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 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 hornetq-configuration.xml. If this is set to true then each id will be persisted to permanent storage as they are received. The default value for this parameter is true. Note When choosing a size of the duplicate id cache be sure to set it to a larger enough size so if you resend messages all the previously sent ones are in the cache not having been overwritten.