Hi Ken,

generally, in a messaging broker you do not want to lose any messages.

A message removal feature could be useful for some testing scenarios
but that is often easier to achieve with an in-memory store.

Now, I concur that in your case "deleteAllMessages..." suggests all,
including the scheduled messages.

  Hope it helps
  Cc.

--

  Mr. Petr Kužel, Software Engineer



________________________________
From: Ken Liao <kenlia...@gmail.com>
Sent: Monday, September 23, 2024 4:27 AM
To: users@activemq.apache.org <users@activemq.apache.org>
Subject: [ActiveMQ Classic][AMQ-9572] Expected behavior of 
"deleteAllMessagesOnStartup"


Hello,

According to
https://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Factivemq.apache.org%2Fcomponents%2Fclassic%2Fdocumentation%2Fbroker-uri&data=05%7C02%7C%7C59dd7bf523b8412f8db108dcdb77592b%7C1a1dce2021b14beaa9d2130e9f1f6e2f%7C0%7C0%7C638626552849048968%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=yo2Hw%2B8w6FVn%2FNzRwu7RXBDBfFf%2B0V1GMNsQ2Cl5zOI%3D&reserved=0<https://activemq.apache.org/components/classic/documentation/broker-uri>,
when "deleteAllMessagesOnStartup" is set to true, all messages in the
persistent store are deleted. If we interpret it literally, that should
include scheduled messages.

However, after testing it locally on 5.18.5 and 6.1.3, that is not true.
Scheduled messages are not deleted even if "deleteAllMessagesOnStartup" is
set to true.

Upon diving deeper, scheduler stores its data in a separate store not
shared with the KahaDB store in the persistent layer (I tested with a
broker on KahaDB).
I am wondering what should be the expected behaviour in this case and would
like input from the community. Should "deleteAllMessagesOnStartup" include
scheduled messages? If not, is there a way to delete all scheduled messages
on startup? (Or is it a good feature to add?)

Thanks,
Ken

Reply via email to