Author |
Message
|
kun.leeing |
Posted: Tue May 18, 2010 2:15 am Post subject: About auto-create objects using script |
|
|
 Disciple
Joined: 27 Sep 2008 Posts: 171
|
Hi, experts.
I want every my client has its own subscriber's queue.
As every client connect to mq server , it will use a certain subqueue with its own number.
So I create queues in advance with *.mqsc script.But every define queue must be written to the script file.
How can I run a script to create all of it?
The queue's name like
'SYSTEM.JMS.ND.SUBSCRIBER.1'
'SYSTEM.JMS.ND.SUBSCRIBER.2'
'SYSTEM.JMS.ND.SUBSCRIBER.3'
'SYSTEM.JMS.ND.SUBSCRIBER...'
I hoped I could use the script like 'for((i=1;i<100;i=i+1))'.
And Can I use PCF to create it?
Thanks. |
|
Back to top |
|
 |
Vitor |
Posted: Tue May 18, 2010 5:16 am Post subject: Re: About auto-create objects using script |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kun.leeing wrote: |
I hoped I could use the script like 'for((i=1;i<100;i=i+1))'. |
Well WMQ command script doesn't support that but a small bit of shell script could generate the commands for you which you could then run in. Or with a little additional ingenuity the script could run it for you.
kun.leeing wrote: |
And Can I use PCF to create it?
|
Of course you can. Just write an application (or similar tool) to generate the PCF in the same way you'd generate the commands. PCF = runmqsc commands. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
gbaddeley |
Posted: Tue May 18, 2010 3:22 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
Don't use "SYSTEM" has the high level qualifier on the queue name as this is reserved for internal use by MQ. Use a more meaninful name such as an abbreviation of the client application name.
If you are using sequential numbers, it is better to include leading zeroes, MYQUEUE.SUB.001, MYQUEUE.SUB.002 etc. Think about scalability, how many of these queues will ever be needed. _________________ Glenn |
|
Back to top |
|
 |
kun.leeing |
Posted: Tue May 18, 2010 5:33 pm Post subject: |
|
|
 Disciple
Joined: 27 Sep 2008 Posts: 171
|
Thanks, vitor.
I've decided to write an app using PCF for all of objects.
And thanks,gbaddeley. I'v taken your advice and changed the name of those queues.  |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue May 18, 2010 8:13 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Remember that for topics you will need to create an alias in the SYSTEM.JMS.ND.* in order to work right with V6 style pub/sub.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kun.leeing |
Posted: Tue May 18, 2010 10:21 pm Post subject: |
|
|
 Disciple
Joined: 27 Sep 2008 Posts: 171
|
Yes, thanks.  |
|
Back to top |
|
 |
|