Can I delete a message from a queue of ActiveMQ in c# code?
问题 I want to set a unique guid for each message in message head, then if I want, I could delete a specific message if I want to. Is there any api in NMS could help me deleting the message? I am using ActiveMQ 5.9.0 and NMS 1.6.1 回答1: Yes, although only if that destination has no active consumers. You can do something like this: protected static void DeleteDestination() { IConnectionFactory factory = new ConnectionFactory(ReplaceEnvVar(connectionURI)); using (Connection connection = factory