gemmellr commented on code in PR #5363:
URL: https://github.com/apache/activemq-artemis/pull/5363#discussion_r1851948116


##########
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/AutoCreateExpiryResourcesTest.java:
##########
@@ -194,6 +195,8 @@ public void testWithJMSFQQN() throws Exception {
 
       triggerExpiration();
 
+      Thread.sleep(EXPIRY_DELAY);
+

Review Comment:
   Is this actually needed? If so maybe a comment why given the other tests 
dont do it? Given the triggerExpiration method before seems to send an 
already-expired message, and the later receive here already has a timeout.



##########
docs/user-manual/message-expiry.adoc:
##########
@@ -76,6 +76,14 @@ If `min-expiry-delay` is not defined then the message will 
not be changed.
 
 The default for both `min-expiry-delay` and `max-expiry-delay` is `-1` (i.e. 
disabled).
 
+[IMPORTANT]
+.Warning
+====
+**If you set expiry-delay on the target expiration target address beware of 
the following:**
+
+* Messages will get a new expiration when moved, and may disappear after the 
new expiration.
+====

Review Comment:
   Seems weird to use the IMPORTANT admonition and then start it with a 
'Warning heading'. If its a warning, why not just use the WARNING admonition? I 
dont think we need the additional text heading at all, it just distracts from 
getting the actual message across, the shouty icon and bold sentence seem more 
than enough implication already.
   
   The same thing will happen with min-expiry-delay/max-expiry-delay so they 
should be mentioned too, especially as this right is after their documentation.
   
   It could also clarify that the expiration is normally set to 0 when moving 
to the expiry queue.
   
   ```suggestion
   [WARNING]
   ====
   **If you set expiry-delay, or min/max-expiry-delay, on the expiration target 
address beware of the following:**
   
   * Messages will get a new expiration when moved to the expiry queue, rather 
than being set to 0 as usual, and so may disappear after the new expiration.
   ====
   ```



##########
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/AutoCreateExpiryResourcesTest.java:
##########
@@ -59,6 +59,7 @@ public void setUp() throws Exception {
 
       // set common address settings needed for all tests; make sure to use 
getMatch instead of addMatch in invidual tests or these will be overwritten
       server.getAddressSettingsRepository().addMatch("#", new 
AddressSettings().setAutoCreateExpiryResources(true).setExpiryAddress(expiryAddress).setExpiryDelay(EXPIRY_DELAY));
+      
server.getAddressSettingsRepository().addMatch(String.valueOf(expiryAddress), 
new AddressSettings().setExpiryDelay(-1L));

Review Comment:
   I'm actually curious why it is setting expiry delay on the regular address 
settings to begin with, and whether that should instead of adding this? 
   
   Most of the tests look to send messages that have expiration and are 
already-expired, so the setting shouldnt affect them after this change.
   
   The exceptions seem to be testAutoCreatedExpiryFilterAnycast / 
testAutoCreatedExpiryFilterMulticast that seem to send messages without 
expiration. Could it just change to setting one, and then remove the 
ExpiryDelay setting here?



-- 
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.

To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org
For additional commands, e-mail: gitbox-h...@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact


Reply via email to