|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
[Solved] Some Easy Questions About MQ ? |
« View previous topic :: View next topic » |
Author |
Message
|
debugme |
Posted: Tue Jan 27, 2004 4:47 am Post subject: [Solved] Some Easy Questions About MQ ? |
|
|
 Apprentice
Joined: 14 Jan 2004 Posts: 27
|
Dear Friends,
I have some general questions which hopefully the more
experienced and knowledgable of you would be able to
help me out with.
1. Is there any naming convention adopted by IBM to
name queues which MQ creates as part of a default
installation. I have noticed that many queues begin
with the prefix "SYSTEM.", but are there any other
conventions of which I am not aware ?
2. Probably a silly question, so don't laugh ! But is it
possible for one machine to have more than one
local queue manager ? I ask because my program
currently connects to a named queue manager which
was defined during installation.
3. Also, in the sample source code, I saw arrays being
defined as both :
Code: |
MQCHAR data[MQ_DATA_SIZE]; |
and also as
Code: |
MQCHAR data[MQ_DATA_SIZE + 1]; |
Since constants are defined to use for sizing the
array, do they take the NUL into account or not ?
The example's source code does not make this
clear.
Thanks in advance to those who have a crack at these questions.
regards, Asad. |
|
Back to top |
|
 |
JasonE |
Posted: Tue Jan 27, 2004 5:08 am Post subject: |
|
|
Grand Master
Joined: 03 Nov 2003 Posts: 1220 Location: Hursley
|
SYSTEM.* queues are the default objects, so when you create a new queue I believe it uses those as a template.
You can run many qmgrs on one machine, until you hit resource shortages! (Theres a heap limit on NT of about 13 qmgrs if started as services). An application on Unix can only connect to one qmgr, on Windows different threads can connect to different qmgrs. EACH THREAD must connect and get a unique qmgr handle.
Arrays - it depends. Some fields, eg. MD.Format, are MQCHAR8, which is 8 characters and needs to be padded to the end with spaces. Generally all the fields in the data structures are padded to full size with spaces. In the other places in the samples, you need to look at them in a case by case basis. Often it is 'easy' to allocate space for the null and use the str* functions to make your life easier, just remember to only copy in the number of bytes for the space you have for a particular item.
In some places, we tollerate a null termination character, in others we dont. eg. MQCONN("QM"...) will work, even though what reaches MQ is 'Q','M','/0' and what it is expecting is 48 chars. |
|
Back to top |
|
 |
debugme |
Posted: Wed Jan 28, 2004 8:43 am Post subject: Thanks again ! |
|
|
 Apprentice
Joined: 14 Jan 2004 Posts: 27
|
Thanks for the responses, Jason.
I think I'm starting to get a clearer idea of what's
going on now
regards, Asad. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|