[
https://issues.apache.org/jira/browse/ARTEMIS-4159?focusedWorklogId=872931&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-872931
]
ASF GitHub Bot logged work on ARTEMIS-4159:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 25/Jul/23 22:04
Start Date: 25/Jul/23 22:04
Worklog Time Spent: 10m
Work Description: fartzy opened a new pull request, #4569:
URL: https://github.com/apache/activemq-artemis/pull/4569
### **Why were these changes made?**
This pull request introduces support for configuring a specific
id-cache-size per address -
[ARTEMIS-4159](https://issues.apache.org/jira/browse/ARTEMIS-4159). The changes
include modifications to various files:
*
artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
*
artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
*
artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/AddressSettings.java
* artemis-server/src/main/resources/schema/artemis-configuration.xsd
*
artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImplTest.java
*
artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java
* artemis-server/src/test/resources/ConfigurationTest-full-config.xml
*
artemis-server/src/test/resources/ConfigurationTest-xinclude-config-address-settings.xml
*
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/DuplicateDetectionTest.java
**Changes Made:**
* FileConfigurationParser.java
Added a constant ID_CACHE_SIZE to represent the id-cache-size attribute in
the XML configuration.
Updated the FileConfigurationParser to parse the id-cache-size attribute
from the XML and set it on the AddressSettings.
* PostOfficeImpl.java
Introduced a new method resolveIdCacheSize to determine the effective
id-cache-size for an address.
Updated getDuplicateIDCache method to use the resolveIdCacheSize method to
get the proper id-cache-size for the address.
* AddressSettings.java
Added a new attribute idCacheSize to store the id-cache-size configuration
for an address.
Implemented getter and setter methods for idCacheSize.
* artemis-configuration.xsd
Updated the XSD schema to include the id-cache-size attribute for the
address settings.
* ConfigurationImplTest.java
Added a new test method to verify parsing of id-cache-size configuration
from prefixed properties.
* FileConfigurationTest.java
Added a new test method to verify the parsing of the id-cache-size
configuration from the XML configuration file.
* ConfigurationTest-full-config.xml,
ConfigurationTest-xinclude-config-address-settings.xml
Added <id-cache-size> elements to the address settings to test the
configuration.
* DuplicateDetectionTest.java
Added a new test method to verify the functionality of the address-specific
id-cache-size setting.
**User Facing Changes:**
New Configuration Option: id-cache-size for Address Settings
With this pull request, administrators now have the ability to configure a
specific id-cache-size for each address, allowing better customization and
optimization of resources for different addresses.
**Motivation:**
This enhancement provides the ability to configure a specific id-cache-size
for each address, allowing better customization and optimization of resources
for different addresses. Administrators can now specify the cache size for
individual addresses, which will default to the global setting if not
explicitly set for an address. This improvement eliminates the need for
deploying multiple instances of Artemis with different global cache sizes based
on address requirements. The pull request aims to simplify configuration and
reduce resource consumption in scenarios where different addresses have
different caching needs.
Issue Time Tracking
-------------------
Worklog Id: (was: 872931)
Remaining Estimate: 0h
Time Spent: 10m
> Support duplicate cache size configuration per address
> ------------------------------------------------------
>
> Key: ARTEMIS-4159
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4159
> Project: ActiveMQ Artemis
> Issue Type: New Feature
> Reporter: Justin Bertram
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> As an administrator, and since each address already has its own cache-id, I
> would like to be able to have a id-cache-size configured per address (which
> will default to the global setting in case it doesn't exist).
> Motivation: we currently have a quite large number of address, and each
> address has different id-cache-size requirements. Today, to implement that,
> we have to deploy several instances.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)