The queue menu includes two options for removing messages from a queue: Clear All and Delete All.
For information about deleting one or multiple selected individual messages, see Delete one or more selected messages.
Kafka messages cannot be deleted individually. If you try to delete one or more Kafka messages, you will receive a prompt will get prompt asking you to confirm whether you want to clear all messages from the topic or partition.
What is the difference between clearing and deleting messages?
- Clear All: clears an entire queue without reading the messages. This function will not work if the queue is open by another application or if the queue contains uncommitted messages.
- Delete All: allows the user to delete all messages within the selected queue. The system reads then deletes one message at a time. This function does not recognize uncommitted messages, which means that there could still be uncommitted messages on the queue. Also, the command might fail if the queue is exclusively opened by another application. The delete function includes an option to apply message criteria to the delete action. In order to delete all messages, the delete all messages right must be enabled for the user.
To delete or clear messages:
- Select a queue.
- Select Messages from the Action menu (Selected menu in 11.2).
- Choose one of the two options on the sub-menu that are related to purging a queue: Delete All or Clear All. In both cases a confirmation dialog box will be displayed before the action can be completed.
- If you chose Delete All, a Delete By Criteria list is available, which lists available message criteria. To delete only messages that meet specific criteria, select the name of the message criteria from the list. See Filtering messages across viewlets with message criteria configurations for more information.
- Click OK to continue.