ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General Discussion » [Solved] Some Easy Questions About MQ ?

Post new topic  Reply to topic
 [Solved] Some Easy Questions About MQ ? « View previous topic :: View next topic » 
Author Message
debugme
PostPosted: Tue Jan 27, 2004 4:47 am    Post subject: [Solved] Some Easy Questions About MQ ? Reply with quote

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
View user's profile Send private message
JasonE
PostPosted: Tue Jan 27, 2004 5:08 am    Post subject: Reply with quote

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
View user's profile Send private message
debugme
PostPosted: Wed Jan 28, 2004 8:43 am    Post subject: Thanks again ! Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » [Solved] Some Easy Questions About MQ ?
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.