I need the ability to programmatically clear a queue using Apache.NMS (C #). I am looking at the NMS API, but I donβt see this possibility. He exists?
There is no direct way to drop the queue from the NMS API, which is more about the management function. You can specify an instance of IConnection in Apahce.NMS.ActiveMQ.Connection, and then call DeleteDestination. This will work if there are no consumers in the queue, but will throw an exception, if any.
, "" ( ?), , :
ISession consumerSession = = connection.CreateSession(AcknowledgementMode.Transactional);
:
//will remove message from queue on success consumerSession.Commit();
//on failure, back on queue consumerSession.Rollback();
Source: https://habr.com/ru/post/1792313/More articles:MediaElement Not Displaying - .netSelect the lowest price from the database row and ignore zero or 0 - databaseCross-browser clipping masks - cssUnable to incrementally expand WPF window - wpfUnit Testing Synchronization - javaHow to write a file to the response stream and show / hide the "Working" modal window? - jqueryAndroid bluetooth. Determine if the paired device is set to 'on' - androidreturn pdf response from stdout with Django - pythonEntering date ranges in SQL Server 2005 - sql-server-2005iCal - Primer and Docs? - androidAll Articles