How to Clear a JMS Queue

Written by c.d. crowder Google
  • Share
  • Tweet
  • Share
  • Email

When storing Java messages on your WebSphere Application Server, your system must be able to handle the amount of stored messages or your computer will no longer be able to receive new messages. Clear the Java Messaging Service (JMS) queue to gain system memory space on your computer. In order to clear the queue, use the wsadmin scripting client, which deletes messages in a specific JMS queue automatically after the deletion command is run. The command can be run as often as needed to clear JMS queues.

Skill level:

Other People Are Reading

Things you need

  • WebSphere Application Server Version 6 or later

Show MoreHide


  1. 1

    Open a command prompt on your computer. For Windows, go to "Start" and type "cmd.exe" in the search box.

  2. 2

    Type "wsadmin>$AdminTask deleteSIBJSMQueue JMSQueueName" (without quotes) substituting the name of the queue you want to delete for "JMSQueueName." If you already have a wsadmin shell open, omit "wsadmin>."

  3. 3

    Press the "Enter" key to clear the queue.

  4. 4

    Wait for a new prompt to appear.

  5. 5

    Type "Exit" to close the wsadmin shell or command prompt window.

Tips and warnings

  • Depending on your operating system, opening a command prompt will vary. For more on opening the wsadmin scripting tool on different platforms with different options, see the website "Starting the wsadmin scripting client" (see Resources).
  • Deleting a JMS queue is permanent. If you need any information in the queue, do not delete it.

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.