[
https://issues.apache.org/jira/browse/ARTEMIS-2797?focusedWorklogId=444174&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-444174
]
ASF GitHub Bot logged work on ARTEMIS-2797:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 11/Jun/20 08:20
Start Date: 11/Jun/20 08:20
Worklog Time Spent: 10m
Work Description: michaelpearce-gain commented on a change in pull
request #3172:
URL: https://github.com/apache/activemq-artemis/pull/3172#discussion_r438620908
##########
File path:
artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
##########
@@ -647,66 +649,121 @@ public QueueBinding updateQueue(QueueConfiguration
queueConfiguration) throws Ex
}
}
- //atomic update
- if (queueConfiguration.getMaxConsumers() != null &&
queue.getMaxConsumers() != queueConfiguration.getMaxConsumers().intValue()) {
+ // atomic update, reset to defaults if value == null
+ // maxConsumers
+ final int newMaxConsumers = queueConfiguration.getMaxConsumers()
== null
+ ?
ActiveMQDefaultConfiguration.getDefaultMaxQueueConsumers()
+ : queueConfiguration.getMaxConsumers();
+ if (queue.getMaxConsumers() != newMaxConsumers) {
changed = true;
- queue.setMaxConsumer(queueConfiguration.getMaxConsumers());
+ queue.setMaxConsumer(newMaxConsumers);
}
- if (queueConfiguration.getRoutingType() != null &&
queue.getRoutingType() != queueConfiguration.getRoutingType()) {
+ // routingType
+ final RoutingType newRoutingType =
queueConfiguration.getRoutingType() == null
Review comment:
So to get defaults, should be using the address settings.
Theres actually a common method that does this thats used else where, as its
quite common
QueueConfigurationUtils.applyDynamicQueueDefaults(queueConfiguration,
addressSettingsRepository.getMatch(queueConfiguration.getAddress().toString()));
This then will correctly set defaults on everything in the
queueConfiguration
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 444174)
Time Spent: 3h 20m (was: 3h 10m)
> Allow for removing current queue filter
> ---------------------------------------
>
> Key: ARTEMIS-2797
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2797
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Components: Broker
> Affects Versions: 2.13.0
> Reporter: Jan Å mucr
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.14.0
>
> Time Spent: 3h 20m
> Remaining Estimate: 0h
>
> Currently the queue filter cannot be removed because of a filter ~ null check
> leading to quitting the PostOfficeImpl#updateQueue() instead of setting the
> queue filter to empty.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)