|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
Message Properties |
« View previous topic :: View next topic » |
Author |
Message
|
mqjeff |
Posted: Fri Apr 01, 2016 11:50 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
PaulClarke wrote: |
That's why we are all paid the big bucks to sort it all out |
Except for some of my esteemed colleagues who get paid to answer questions here...  _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
bruce2359 |
Posted: Fri Apr 01, 2016 1:09 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
If only we spoke the same language... _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Mon Apr 04, 2016 3:14 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
PaulClarke wrote: |
So, for me personally, calling it an array would have been misleading. It is a string of bytes which should be treated as a string, not as lots of independently addressable units. It is a string that implies to me an 'ordered arrangement'. |
PaulClarke wrote: |
I guess it is a common problem in Computing generally that the nomenclature is not standard. |
Yup! Different interpretation. When I see 'string', I think of Java String or C++ String. To me, an 'array' is "accessed directly by index". i.e. 'string' makes me think of data type vs how you are accessing the data type.
I too love C because I can do:
Code: |
#define MQTYPE_BYTE_ARRAY MQTYPE_BYTE_STRING |
And then my brain perfectly understands what I'm dealing with.
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
gbaddeley |
Posted: Mon Apr 04, 2016 4:40 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
RogerLacroix wrote: |
I too love C because I can do:
Code: |
#define MQTYPE_BYTE_ARRAY MQTYPE_BYTE_STRING |
And then my brain perfectly understands what I'm dealing with.
|
Hi Roger. Your brain is like the C preprocessor?
I wish that MQMD MsgId, CorrelId, GroupId were printable strings, and all MQCHAR fields could be null terminated strings, but its a couple of decades too late to change this. G. _________________ Glenn |
|
Back to top |
|
 |
PaulClarke |
Posted: Tue Apr 05, 2016 6:36 am Post subject: |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
You can print MsgId, CorrelId and GroupId. You just have to convert them to a hex string first.
Surely you are not advocating that they were actually made string types. This would somewhat needlessly double their size, wasting at least 48 bytes per MQ Message. If a field can contain any value and is not subject to data conversion surely it makes sense to just store them as bytes.
NULL termination of strings is optional but most languages do have a NULL terminated string concept.
Cheers,
Paul. _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
Back to top |
|
 |
gbaddeley |
Posted: Tue Apr 05, 2016 4:26 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
PaulClarke wrote: |
You can print MsgId, CorrelId and GroupId. You just have to convert them to a hex string first.
Surely you are not advocating that they were actually made string types. This would somewhat needlessly double their size, wasting at least 48 bytes per MQ Message. If a field can contain any value and is not subject to data conversion surely it makes sense to just store them as bytes.
NULL termination of strings is optional but most languages do have a NULL terminated string concept.
Cheers,
Paul. |
Hi Paul. Your points are all well justified. I'm not actually challenging the original design, it was correct. The MQMD block structure with fixed length fields was a good choice for multi-platform multi-language support 20 years ago (and all the other exposed MQ structures). These days OOP, classes and properties have largely made the block structure transparent to the programmer in Java, .Net etc, but we still need to be acutely aware of storage data types and how they are represented in MQ structures. G. _________________ Glenn |
|
Back to top |
|
 |
|
|
|
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
|
|
|
|