[
https://issues.apache.org/jira/browse/ARTEMIS-3090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17280221#comment-17280221
]
Erwin Dondorp edited comment on ARTEMIS-3090 at 2/6/21, 3:49 PM:
-----------------------------------------------------------------
[~jbertram]
Note that this sets the expiryqueue name to an empty string.
This will eventually lead to {{[org.apache.activemq.artemis.core.server]
AMQ222146: Message has expired. No bindings for Expiry Address so dropping it}}
(note the gap between {{Address}} and {{so}} where the name should be).
But the worst part is that it does so for every single message.
Maybe the first {{if()}} statement in {{expire()}} needs to be something like:
{{if (expiryAddress != null && expiryAddress.length() != 0) {}}
was (Author: erwindon):
[~jbertram]
Note that this sets the expiryqueue name to an empty string.
This will eventually lead to {{[org.apache.activemq.artemis.core.
server] AMQ222146: Message has expired. No bindings for Expiry Address so
dropping it}} (note the gap between {{Address}} and {{so}} where the name
should be).
But the worst part is that it does so for every single message.
Maybe the first {{if()}} statement in {{expire()}} needs to be something like:
{{if (expiryAddress != null && expiryAddress.length() != 0) {}}
> expiry-queue cannot be unset
> ----------------------------
>
> Key: ARTEMIS-3090
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3090
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: Broker
> Affects Versions: 2.16.0
> Reporter: Erwin Dondorp
> Priority: Major
>
> By default, expiry-queue is set to "ExpiryQueue".
> But it is not possible to replace the value with "xsd:nil" since the
> expiry-queue setting is not nillable as specified in the corresponding XSD.
> However,
> src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
> implements a use-case to drop the message when no expiry-queue is set.
> This use-case is hard to reach as one must then not set the expiry-queue for
> the default address (#) and then set the expiry-queue for all other addresses.
> I have 2 use-cases for which not expiry-queue should be set. the first is for
> destinations that carry low-value data, and second for the ExpiryQueue
> itself, to make sure that messages will eventually be discarded. The default
> ExpiryQueue cannot expire messages since its expiry-queue points to itself.
> I suggest that expiry-queue is made nillable, so that it can simply be
> applied to individual addresses.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)