Topic
  • 4 replies
  • Latest Post - ‏2013-01-18T09:02:04Z by SystemAdmin
NealWalters
NealWalters
29 Posts

Pinned topic Delete all messages in a queue via scheduled job

‏2012-12-10T16:05:35Z |
I have a queue where an external vendor sends us messages. We don't want to ask that vendor to turn off that "feed", but for the next month or two, we want to delete that queue on a daily basis. I'm running MQ 7 on Windows. I found CSQUTIL, but it is under the hierarchy of Z/OS. Is there some utility I can run from Windows? Or can I download a Windows version of CSQUTIL?

Thanks,
Neal Walters
Updated on 2013-01-18T09:02:04Z at 2013-01-18T09:02:04Z by SystemAdmin
  • NealWalters
    NealWalters
    29 Posts

    Re: Delete all messages in a queue via scheduled job

    ‏2012-12-10T16:10:30Z  
    I'm currently using the "Clear Message" then "Queue will be cleared using MQGET API Calls" - but when a million messages pile up, it takes quite a while, and I have to keep clicking the "time out - do you want to continue".

    Neal
  • arun_08
    arun_08
    2 Posts

    Re: Delete all messages in a queue via scheduled job

    ‏2012-12-12T14:05:06Z  
    I'm currently using the "Clear Message" then "Queue will be cleared using MQGET API Calls" - but when a million messages pile up, it takes quite a while, and I have to keep clicking the "time out - do you want to continue".

    Neal
    Please use Task schedule and Qload (Support pack) which has the option to purge the job.
  • arun_08
    arun_08
    2 Posts

    Re: Delete all messages in a queue via scheduled job

    ‏2012-12-12T14:05:49Z  
    • arun_08
    • ‏2012-12-12T14:05:06Z
    Please use Task schedule and Qload (Support pack) which has the option to purge the job.
    I meant to say Qload has the option to purge the messages from queue.
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: Delete all messages in a queue via scheduled job

    ‏2013-01-18T09:02:04Z  
    • arun_08
    • ‏2012-12-12T14:05:49Z
    I meant to say Qload has the option to purge the messages from queue.
    You can use below command to clear the queue.
    Set it in crontab to run after some defined interval.

    echo 'clear ql(<<queue name>>)' |runmqsc QueueManagerName

    Regards,
    Pravin