Paul - Thank you for the clarification! I appreciate it!
MQLIST,
Incidentally, I am partly asking these questions because I am finishing up a program that can format a strmqtrc trace. I have found tracing to be extremly helpful with working with the MQ programmers on issues, questions, etc., and this will help speed up the ability to decipher a trace for a programmer or administrator. I am going to submit this tool for consideration as a supporpac. I didn't see any other tools or supportpacs that do this. It will be tested for Unix (Solaris SPARC), Linux (x86_64), and Windows.
Here is what it will expand in the strmqtrc trace. It also includes (except for Compcode and Reason) the constants that values resolve to.
Msgdesc (all fields)
ConnectOpts (Options field only)
Open Options
Getmsgopts (all fields through version 2)
Putmsgopts (all fields through version 1)
Callback Context (all fields)
Callback Descriptor (all fields)
Compcode
Reason
Here is an example of how the trace looks after it has been expanded:
15:04:05.854548 10140.1 CONN:1400006 MQCONN <<
15:04:05.854552 10140.1 CONN:1400006 Name : Input Parm
15:04:05.854555 10140.1 CONN:1400006 Hconn:
15:04:05.854558 10140.1 CONN:1400006 0x0000: 01400006 |***@.. |
15:04:05.854562 10140.1 CONN:1400006 ConnectOpts:
15:04:05.854565 10140.1 CONN:1400006 0x0000: 434e4f20 00000001 00000100 |CNO ........ |
Connect Options 10140.1 expanded:
Options (MQLONG) : 256
x'00000100'
MQCNO_SHARED_BINDING
15:04:05.854568 10140.1 CONN:1400006 Compcode:
15:04:05.854571 10140.1 CONN:1400006 0x0000: 00000000 |.... |
15:04:05.854574 10140.1 CONN:1400006 Reason:
15:04:05.854577 10140.1 CONN:1400006 0x0000: 00000000 |.... |
15:04:05.854583 10140.1 CONN:1400006 MQI:MQCONN HConn=01400006 rc=00000000
.
.
.
15:04:05.854720 10140.1 CONN:1400006 MQOPEN >>
15:04:05.854723 10140.1 CONN:1400006 Hconn:
15:04:05.854726 10140.1 CONN:1400006 0x0000: 01400006 |***@.. |
.
.
.
15:04:05.854736 10140.1 CONN:1400006 Options:
15:04:05.854739 10140.1 CONN:1400006 0x0000: 00002010 |.. . |
Open Options 10140.1 expanded:
Options (MQLONG) : 8208
x'00002010'
MQOO_OUTPUT
MQOO_FAIL_IF_QUIESCING
15:04:05.854742 10140.1 CONN:1400006 Hobj : Output Parm
15:04:05.854746 10140.1 CONN:1400006 Compcode : Output Parm
15:04:05.854749 10140.1 CONN:1400006 Reason : Output Parm
.
.
.
15:04:05.992256 10140.1 CONN:1400006 Msgdesc:
15:04:05.992259 10140.1 CONN:1400006 0x0000: 4d442020 00000001 00000000 00000008 |MD ............|
15:04:05.992259 10140.1 CONN:1400006 0x0010: ffffffff 00000000 00000111 00000000 |................|
15:04:05.992259 10140.1 CONN:1400006 0x0020: 4d515354 52202020 ffffffff 00000002 |MQSTR ........|
15:04:05.992259 10140.1 CONN:1400006 0x0030: 414d5120 xxxxxxxx xxxxxxxx 2e4d5154 |AMQ xxxxxxxx.MQT|
15:04:05.992259 10140.1 CONN:1400006 0x0040: 50fba918 227daf02 00000000 00000000 |P..."}..........|
15:04:05.992259 10140.1 CONN:1400006 0x0050: 00000000 00000000 00000000 00000000 |................|
15:04:05.992259 10140.1 CONN:1400006 0x0060: 00000000 00000000 00000000 00000000 |................|
15:04:05.992259 10140.1 CONN:1400006 0x0070: 00000000 00000000 00000000 00000000 |................|
15:04:05.992259 10140.1 CONN:1400006 0x0080: 00000000 00000000 00000000 00000000 |................|
15:04:05.992259 10140.1 CONN:1400006 0x0090: 00000000 00000000 00000000 00000000 |................|
15:04:05.992259 10140.1 CONN:1400006 0x00a0: 00000000 00000000 00000000 00000000 |................|
15:04:05.992259 10140.1 CONN:1400006 0x00b0: 00000000 00000000 00000000 00000000 |................|
15:04:05.992259 10140.1 CONN:1400006 0x00c0: 00000000 6d716d20 20202020 20202020 |....mqm |
15:04:05.992259 10140.1 CONN:1400006 0x00d0: 03323434 00000000 00000000 00000000 |.244............|
15:04:05.992259 10140.1 CONN:1400006 0x00e0: 00000000 00000000 00000000 00000006 |................|
15:04:05.992259 10140.1 CONN:1400006 0x00f0: 20202020 20202020 20202020 20202020 | |
15:04:05.992259 10140.1 CONN:1400006 0x0100: 20202020 20202020 20202020 20202020 | |
15:04:05.992259 10140.1 CONN:1400006 0x0110: 00000006 616d7173 70757420 20202020 |....amqsput |
15:04:05.992259 10140.1 CONN:1400006 0x0120: 20202020 20202020 20202020 20202020 | |
15:04:05.992259 10140.1 CONN:1400006 0x0130: 32303133 30353231 32303034 30353939 |2013052120040599|
15:04:05.992259 10140.1 CONN:1400006 0x0140: 20202020 | |
Msgdesc 10140.1 expanded:
StrucId (CHAR4) : 'MD '
x'4d442020'
Version (MQLONG) : 1
x'00000001'
Report (MQLONG) : 0
x'00000000'
MQRO_NONE
MsgType (MQLONG) : 8
x'00000008'
MQMT_DATAGRAM
Expiry (MQLONG) : -1
x'ffffffff'
MQEI_UNLIMITTED
Feedback (MQLONG) : 0
x'00000000'
MQFB_NONE
Encoding (MQLONG) : 273
x'00000111'
MQENC_INTEGER_NORMAL
MQENC_DECIMAL_NORMAL
MQENC_FLOAT_IEEE_NORMAL
CodedCharSetId (MQLONG) : 0
x'00000000'
MQCCSI_UNDEFINED
MQCCSI_DEFAULT
MQCCSI_Q_MGR
Format (CHAR8) : 'MQSTR '
x'4d51535452202020'
Priority (MQLONG) : -1
x'ffffffff'
MQPRI_PRIORITY_AS_Q_DEF
MQPRI_PRIORITY_AS_TOPIC_DEF
Persistence (MQLONG) : 2
x'00000002'
MQPER_PERSISTENCE_AS_Q_DEF
MQPER_PERSISTENCE_AS_TOPIC_DEF
MsgId (BYTE24) : x'414d5120xxxxxxxxxxxxxxxx2e4d515450fba918227daf02'
CorrelId (BYTE24) : x'000000000000000000000000000000000000000000000000'
BackoutCount (MQLONG) : 0
x'00000000'
ReplyToQ (MQCHAR48) : '................................................'
x'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
ReplyToQMgr (MQCHAR48) : '................................................'
x'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
UserIdentifier (CHAR12) : 'mqm '
x'6d716d202020202020202020'
AccountingToken (BYTE32) : x'0332343400000000000000000000000000000000000000000000000000000006'
ApplIdentityData (MQCHAR32) : ' '
x'2020202020202020202020202020202020202020202020202020202020202020'
PutApplType (MQLONG) : 6
x'00000006'
MQAT_AIX
MQAT_UNIX
PutApplName (MQCHAR28) : 'amqsput '
x'616d7173707574202020202020202020202020202020202020202020'
PutDate (MQCHAR8) : '20130521'
x'3230313330353231'
PutTime (MQCHAR8) : '20040599'
x'3230303430353939'
ApplOriginData (MQCHAR4) : ' '
x'20202020'
.
.
.
15:04:05.992262 10140.1 CONN:1400006 Putmsgopts:
15:04:05.992265 10140.1 CONN:1400006 0x0000: 504d4f20 00000001 00002004 ffffffff |PMO ...... .....|
15:04:05.992265 10140.1 CONN:1400006 0x0010: 00000000 00000001 00000000 00000000 |................|
15:04:05.992265 10140.1 CONN:1400006 0x0020: 54435a2e 54455354 31202020 20202020 |TCZ.TEST1 |
15:04:05.992265 10140.1 CONN:1400006 0x0030: 20202020 20202020 20202020 20202020 | |
15:04:05.992265 10140.1 CONN:1400006 0x0040: 20202020 20202020 20202020 20202020 | |
15:04:05.992265 10140.1 CONN:1400006 0x0050: xxxxxxxx xxxxxxxx 2e4d5154 45535431 |xxxxxxxx.MQTEST1|
15:04:05.992265 10140.1 CONN:1400006 0x0060: 20202020 20202020 20202020 20202020 | |
15:04:05.992265 10140.1 CONN:1400006 0x0070: 20202020 20202020 20202020 20202020 | |
Putmsgopts 10140.1 expanded:
StrucId (CHAR4) : 'PMO '
x'504d4f20'
Version (MQLONG) : 1
x'00000001'
Options (MQLONG) : 8196
x'00002004'
MQPMO_NO_SYNCPOINT
MQPMO_FAIL_IF_QUIESCING
Timeout (MQLONG) : -1
x'ffffffff'
Context (MQLONG) : x'00000000'
KnownDestCount (MQLONG) : 1
x'00000001'
UnknownDestCount (MQLONG) : 0
x'00000000'
InvalidDestCount (MQLONG) : 0
x'00000000'
ResolvedQName (MQCHAR48) : 'TCZ.TEST1
x'54435a2e5445535431202020202020202020202020202020202020202020202020202020202020202020202020202020
ResolvedQMgrName (MQCHAR48) : 'xxxxxxxx.MQTEST1
x'xxxxxxxxxxxxxxxx2e4d5154455354312020202020202020202020202020202020202020202020202020202020202020
Thanks,
Tim
From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Paul Clarke
Sent: Friday, October 04, 2013 3:37 PM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: Java MQ Thread Question
Hi,
Yes, if you have different connections then each connection can issue any MQI call they like. There is no âconnection levelâ serialisation. Clearly at the queue level there will be some serialisation, ie. ultimately only one connection can be adding or removing a message at the same instant but this level of serialisation is very short lived. The exact serialisation performed will depend on the environment, client, local, java or C etc and I certainly canât speak for all environments.
It is quite difficult to see things like serialisation or parallelism in a trace file since tracing has such a dramatic effect on the operation of a program, not least of which to slow it down considerably. If you see a particular pattern with tracing on there is no guarantee that the same pattern will exist with tracing off.
One way to demonstrate the fact that MQ supports parallel operation on different connections is to look at the performance reports. You will see that as you increase the number of applications, all doing the same thing, you get increased throughput. There are, of course, many factors for this but one of them is the ability with multiple connections to drive more syncpointed operations to the logger in any given time. Clearly this would not happen if the entire MQI call was serialised.
Cheers,
P.
Paul Clarke
www.mqgem.com
From: Tim Zielke<mailto:***@AON.COM>
Sent: Friday, October 04, 2013 8:45 PM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: Java MQ Thread Question
Hi Paul,
Yes, I am pretty sure those are 5 different connections there doing the MQGET ends. They all have different connections numbers (i.e. 1400000, 140000c, etc.).
"If you have different connections then there would be no serialisation."
So if I understand you correctly, you are saying that if a multi-threaded application has threads that each have unique connections, then MQ could be processing a GET end on thread 1 with connection 1 and a GET end on thread 2 with connection 2 in parallel?
I guess I am getting hung up on this fact, because I don't see this behavior with other multi-threaded applications that have threads with different connections. I just reviewed another java application that had 3 threads (each thread with its own connection) that were simultaneously doing GETs from a request queue and PUTs to a reply queue. However, when I reviewed the trace you would only ever see one MQI call ever running at one time in the trace. The begin or end of the MQI call for one thread would run to completion and then you would see another thread's MQI call start to run. There was no interleaving of MQI calls whatsoever between the three threads. To me, this behavior is consistent with Andy's comment "Under the covers it's not possible for multiple concurrent MQI requests to actually be processed in parallel".
I've only ever seen this type of MQI call interleaving in a trace like was listed below with this managed callback functionality.
Thanks,
Tim
From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Paul Clarke
Sent: Friday, October 04, 2013 2:22 PM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: Java MQ Thread Question
Iâm not that familiar with the Java trace format but is it possible that there are 5 different connections here ? If you have different connections then there would be no serialisation.
Even if you were using one connection then just showing the MQGET functions calls and the return may not be sufficient to show you the serialisation call itself, it depends entirely on where that serialisation takes place. In other words, you could indeed see 5 threads each entering MQGET for the same connection and calling a number of functions before deciding that they do indeed contend with each other. At which point I would expect you to see only one of the threads proceed.
Cheers,
Paul.
Paul Clarke
www.mqgem.com
From: Tim Zielke<mailto:***@AON.COM>
Sent: Friday, October 04, 2013 7:54 PM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT>
Subject: Re: Java MQ Thread Question
Hello MQLIST,
Here is another example of MQI behavior that is confusing me. This was run on a 7.1.0.2 queue manager on Solaris 10. In this case the application had registered multiple consumer functions. You can see that the MQGET << (GET end) are not being serialized and running in parallel for 5 different threads, at least that is how it looks to me. This seems odd and also seems to contradict the statement previously in this thread "Under the covers it's not possible for multiple concurrent MQI requests to actually be processed in parallel". It looks like these MQGET ends are running in parallel to me.
Am I misunderstanding something here?
Does anyone have any comments to clear up my confusion?
Thanks,
Tim
WebSphere MQ Formatted Trace - Formatter V3
+-----------------------------------------------------------------------+
| |
| WebSphere MQ Formatted Trace V3 |
| =============================== |
| |
| Date/Time :- 09/06/13 07:35:32 CST |
| UTC Time :- 1378470932.076600 |
| UTC Time Offset :- 5 (CST) |
| Host Name :- xxxxxxxx |
| Operating System :- SunOS 5.10 |
| LVLS :- 7.1.0.2 |
| Product Long Name :- WebSphere MQ for Solaris (SPARC platform) |
| CMVC Level :- p710-002-121018 |
| Installation Path :- /opt/mqm |
| Installation Name :- Installation1 (1) |
| Effective UserID :- 101 (wsphere) |
| Real UserID :- 101 (wsphere) |
| Program Name :- java |
| Addressing Mode :- 64-bit |
| Process :- 4822 |
| QueueManager :- |
| Reentrant :- 1 |
| |
+-----------------------------------------------------------------------+
Formatting options: None
Formatter installation path: /opt/mqm
Formatter version: 7.1.0.2
Timestamp Process.Thread Trace Ident Trace Data
===========================================================
*07:47:04.101935 4822.16 CONN:1400010 __________
07:47:04.101935 4822.10 CONN:140000a __________
07:47:04.102778 4822.16 CONN:1400010 MQGET <<
*07:47:04.102302 4822.6 CONN:1400006 __________
*07:47:04.101958 4822.12 CONN:140000c __________
07:47:04.102820 4822.16 CONN:1400010 Hconn : Input Parm
07:47:04.102871 4822.12 CONN:140000c MQGET <<
*07:47:04.102840 4822.6 CONN:1400006 MQGET <<
*07:47:04.102800 4822.10 CONN:140000a MQGET <<
07:47:04.102925 4822.6 CONN:1400006 Hconn : Input Parm
07:47:04.102946 4822.10 CONN:140000a Hconn : Input Parm
*07:47:04.102903 4822.12 CONN:140000c Hconn : Input Parm
07:47:04.102998 4822.8 CONN:1400008 __________
*07:47:04.102884 4822.16 CONN:1400010 Hconn:
07:47:04.102982 4822.10 CONN:140000a Hconn:
07:47:04.103058 4822.16 CONN:1400010 0x0000: 01400010 |***@.. |
*07:47:04.103007 4822.12 CONN:140000c Hconn:
07:47:04.103080 4822.10 CONN:140000a 0x0000: 0140000a |***@. |
*07:47:04.103031 4822.8 CONN:1400008 MQGET <<
07:47:04.103151 4822.10 CONN:140000a CbContext:
*07:47:04.103095 4822.16 CONN:1400010 CbContext:
07:47:04.103207 4822.10 CONN:140000a 0x0000: 43424320 00000002 00000005 00000000 |CBC ............|
07:47:04.103207 4822.10 CONN:140000a 0x0010: 00000001 02f02b70 00000000 00000000 |......+p........|
07:47:04.103207 4822.10 CONN:140000a 0x0020: 00000002 000007f1 00000000 00000000 |................|
07:47:04.103207 4822.10 CONN:140000a 0x0030: 00000000 00000000 00000000 00000000 |................|
*07:47:04.103127 4822.12 CONN:140000c 0x0000: 0140000c |***@. |
*07:47:04.102961 4822.6 CONN:1400006 Hconn:
07:47:04.103224 4822.16 CONN:1400010 0x0000: 43424320 00000002 00000005 00000000 |CBC ............|
07:47:04.103224 4822.16 CONN:1400010 0x0010: 00000001 01263420 00000000 00000000 |.....&4 ........|
07:47:04.103224 4822.16 CONN:1400010 0x0020: 00000002 000007f1 00000000 00000000 |................|
07:47:04.103224 4822.16 CONN:1400010 0x0030: 00000000 00000000 00000000 00000000 |................|
07:47:04.103225 4822.14 CONN:140000e __________
07:47:04.103255 4822.10 CONN:140000a Msgdesc:
07:47:04.103374 4822.14 CONN:140000e MQGET <<
*07:47:04.103348 4822.16 CONN:1400010 Msgdesc:
*07:47:04.103287 4822.12 CONN:140000c CbContext:
07:47:04.103395 4822.10 CONN:140000a 0x0000: 4d442020 00000002 00000000 00000008 |MD ............|
07:47:04.103395 4822.10 CONN:140000a 0x0010: ffffffff 00000000 00000111 00000000 |................|
07:47:04.103395 4822.10 CONN:140000a 0x0020: 20202020 20202020 ffffffff 00000002 | ........|
07:47:04.103395 4822.10 CONN:140000a 0x0030: 00000000 00000000 00000000 00000000 |................|
07:47:04.103395 4822.10 CONN:140000a 0x0040: === Skipping 17 Duplicate Lines === |................|
07:47:04.103395 4822.10 CONN:140000a 0x0150: 00000000 00000000 00000000 00000001 |................|
07:47:04.103395 4822.10 CONN:140000a 0x0160: 00000000 00000000 ffffffff |............ |
*07:47:04.103326 4822.6 CONN:1400006 0x0000: 01400006 |***@.. |
*07:47:04.103176 4822.8 CONN:1400008 Hconn : Input Parm
07:47:04.103513 4822.6 CONN:1400006 CbContext:
07:47:04.103537 4822.8 CONN:1400008 Hconn:
*07:47:04.103469 4822.12 CONN:140000c 0x0000: 43424320 00000002 00000005 00000000 |CBC ............|
07:47:04.103469 4822.12 CONN:140000c 0x0010: 00000001 03808240 00000000 00000000 |***@........|
07:47:04.103469 4822.12 CONN:140000c 0x0020: 00000002 000007f1 00000000 00000000 |................|
07:47:04.103469 4822.12 CONN:140000c 0x0030: 00000000 00000000 00000000 00000000 |................|
*07:47:04.103449 4822.16 CONN:1400010 0x0000: 4d442020 00000002 00000000 00000008 |MD ............|
07:47:04.103449 4822.16 CONN:1400010 0x0010: ffffffff 00000000 00000111 00000000 |................|
07:47:04.103449 4822.16 CONN:1400010 0x0020: 20202020 20202020 ffffffff 00000002 | ........|
07:47:04.103449 4822.16 CONN:1400010 0x0030: 00000000 00000000 00000000 00000000 |................|
07:47:04.103449 4822.16 CONN:1400010 0x0040: === Skipping 17 Duplicate Lines === |................|
07:47:04.103449 4822.16 CONN:1400010 0x0150: 00000000 00000000 00000000 00000001 |................|
07:47:04.103449 4822.16 CONN:1400010 0x0160: 00000000 00000000 ffffffff |............ |
*07:47:04.103424 4822.14 CONN:140000e Hconn : Input Parm
07:47:04.103557 4822.6 CONN:1400006 0x0000: 43424320 00000002 00000005 00000000 |CBC ............|
07:47:04.103557 4822.6 CONN:1400006 0x0010: 00000001 00f58a20 00000000 00000000 |....... ........|
07:47:04.103557 4822.6 CONN:1400006 0x0020: 00000002 000007f1 00000000 00000000 |................|
07:47:04.103557 4822.6 CONN:1400006 0x0030: 00000000 00000000 00000000 00000000 |................|
*07:47:04.103490 4822.10 CONN:140000a Bufferlength:
07:47:04.103584 4822.8 CONN:1400008 0x0000: 01400008 |***@.. |
07:47:04.103652 4822.16 CONN:1400010 Bufferlength:
07:47:04.103762 4822.8 CONN:1400008 CbContext:
*07:47:04.103711 4822.6 CONN:1400006 Msgdesc:
07:47:04.103817 4822.8 CONN:1400008 0x0000: 43424320 00000002 00000005 00000000 |CBC ............|
07:47:04.103817 4822.8 CONN:1400008 0x0010: 00000001 01511c60 00000000 00000000 |.....Q.`........|
07:47:04.103817 4822.8 CONN:1400008 0x0020: 00000002 000007f1 00000000 00000000 |................|
07:47:04.103817 4822.8 CONN:1400008 0x0030: 00000000 00000000 00000000 00000000 |................|
07:47:04.103838 4822.6 CONN:1400006 0x0000: 4d442020 00000002 00000000 00000008 |MD ............|
07:47:04.103838 4822.6 CONN:1400006 0x0010: ffffffff 00000000 00000111 00000000 |................|
07:47:04.103838 4822.6 CONN:1400006 0x0020: 20202020 20202020 ffffffff 00000002 | ........|
07:47:04.103838 4822.6 CONN:1400006 0x0030: 00000000 00000000 00000000 00000000 |................|
07:47:04.103838 4822.6 CONN:1400006 0x0040: === Skipping 17 Duplicate Lines === |................|
07:47:04.103838 4822.6 CONN:1400006 0x0150: 00000000 00000000 00000000 00000001 |................|
07:47:04.103838 4822.6 CONN:1400006 0x0160: 00000000 00000000 ffffffff |............ |
*07:47:04.103731 4822.10 CONN:140000a 0x0000: 00002000 |.. . |
*07:47:04.103619 4822.12 CONN:140000c Msgdesc:
07:47:04.103901 4822.6 CONN:1400006 Bufferlength:
*07:47:04.103685 4822.14 CONN:140000e Hconn:
07:47:04.103986 4822.6 CONN:1400006 0x0000: 00002000 |.. . |
*07:47:04.103859 4822.8 CONN:1400008 Msgdesc:
07:47:04.104040 4822.6 CONN:1400006 Datalength:
*07:47:04.103929 4822.10 CONN:140000a Datalength:
07:47:04.104008 4822.14 CONN:140000e 0x0000: 0140000e |***@.. |
07:47:04.104078 4822.8 CONN:1400008 0x0000: 4d442020 00000002 00000000 00000008 |MD ............|
07:47:04.104078 4822.8 CONN:1400008 0x0010: ffffffff 00000000 00000111 00000000 |................|
07:47:04.104078 4822.8 CONN:1400008 0x0020: 20202020 20202020 ffffffff 00000002 | ........|
07:47:04.104078 4822.8 CONN:1400008 0x0030: 00000000 00000000 00000000 00000000 |................|
07:47:04.104078 4822.8 CONN:1400008 0x0040: === Skipping 17 Duplicate Lines === |................|
07:47:04.104078 4822.8 CONN:1400008 0x0150: 00000000 00000000 00000000 00000001 |................|
07:47:04.104078 4822.8 CONN:1400008 0x0160: 00000000 00000000 ffffffff |............ |
07:47:04.104135 4822.10 CONN:140000a 0x0000: 00000000 |.... |
07:47:04.104192 4822.8 CONN:1400008 Bufferlength:
*07:47:04.104103 4822.6 CONN:1400006 0x0000: 00000000 |.... |
07:47:04.104156 4822.14 CONN:140000e CbContext:
*07:47:04.103783 4822.16 CONN:1400010 0x0000: 00002000 |.. . |
07:47:04.104274 4822.6 CONN:1400006 Compcode:
07:47:04.104372 4822.16 CONN:1400010 Datalength:
*07:47:04.104210 4822.10 CONN:140000a Compcode:
*07:47:04.103966 4822.12 CONN:140000c 0x0000: 4d442020 00000002 00000000 00000008 |MD ............|
07:47:04.103966 4822.12 CONN:140000c 0x0010: ffffffff 00000000 00000111 00000000 |................|
07:47:04.103966 4822.12 CONN:140000c 0x0020: 20202020 20202020 ffffffff 00000002 | ........|
07:47:04.103966 4822.12 CONN:140000c 0x0030: 00000000 00000000 00000000 00000000 |................|
07:47:04.103966 4822.12 CONN:140000c 0x0040: === Skipping 17 Duplicate Lines === |................|
07:47:04.103966 4822.12 CONN:140000c 0x0150: 00000000 00000000 00000000 00000001 |................|
07:47:04.103966 4822.12 CONN:140000c 0x0160: 00000000 00000000 ffffffff |............ |
07:47:04.104397 4822.6 CONN:1400006 0x0000: 00000002 |.... |
07:47:04.104486 4822.12 CONN:140000c Bufferlength:
*07:47:04.104455 4822.10 CONN:140000a 0x0000: 00000002 |.... |
*07:47:04.104427 4822.16 CONN:1400010 0x0000: 00000000 |.... |
*07:47:04.104251 4822.8 CONN:1400008 0x0000: 00002000 |.. . |
07:47:04.104334 4822.14 CONN:140000e 0x0000: 43424320 00000002 00000005 00000000 |CBC ............|
07:47:04.104334 4822.14 CONN:140000e 0x0010: 00000001 01b19d60 00000000 00000000 |.......`........|
07:47:04.104334 4822.14 CONN:140000e 0x0020: 00000002 000007f1 00000000 00000000 |................|
07:47:04.104334 4822.14 CONN:140000e 0x0030: 00000000 00000000 00000000 00000000 |................|
07:47:04.104636 4822.8 CONN:1400008 Datalength:
*07:47:04.104571 4822.10 CONN:140000a Reason:
07:47:04.104657 4822.14 CONN:140000e Msgdesc:
*07:47:04.104536 4822.12 CONN:140000c 0x0000: 00002000 |.. . |
07:47:04.104605 4822.16 CONN:1400010 Compcode:
07:47:04.104750 4822.14 CONN:140000e 0x0000: 4d442020 00000002 00000000 00000008 |MD ............|
07:47:04.104750 4822.14 CONN:140000e 0x0010: ffffffff 00000000 00000111 00000000 |................|
07:47:04.104750 4822.14 CONN:140000e 0x0020: 20202020 20202020 ffffffff 00000002 | ........|
07:47:04.104750 4822.14 CONN:140000e 0x0030: 00000000 00000000 00000000 00000000 |................|
07:47:04.104750 4822.14 CONN:140000e 0x0040: === Skipping 17 Duplicate Lines === |................|
07:47:04.104750 4822.14 CONN:140000e 0x0150: 00000000 00000000 00000000 00000001 |................|
07:47:04.104750 4822.14 CONN:140000e 0x0160: 00000000 00000000 ffffffff |............ |
*07:47:04.104680 4822.8 CONN:1400008 0x0000: 00000000 |.... |
07:47:04.104769 4822.12 CONN:140000c Datalength:
07:47:04.104832 4822.14 CONN:140000e Bufferlength:
*07:47:04.104714 4822.10 CONN:140000a 0x0000: 00007811 |..x. |
07:47:04.104801 4822.16 CONN:1400010 0x0000: 00000002 |.... |
07:47:04.104854 4822.8 CONN:1400008 Compcode:
07:47:04.104977 4822.16 CONN:1400010 Reason:
*07:47:04.104882 4822.12 CONN:140000c 0x0000: 00000000 |.... |
07:47:04.104914 4822.14 CONN:140000e 0x0000: 00002000 |.. . |
*07:47:04.104508 4822.6 CONN:1400006 Reason:
07:47:04.105042 4822.12 CONN:140000c Compcode:
*07:47:04.104994 4822.8 CONN:1400008 0x0000: 00000002 |.... |
07:47:04.105099 4822.6 CONN:1400006 0x0000: 00007811 |..x. |
*07:47:04.105072 4822.14 CONN:140000e Datalength:
07:47:04.105118 4822.12 CONN:140000c 0x0000: 00000002 |.... |
07:47:04.105147 4822.8 CONN:1400008 Reason:
07:47:04.105201 4822.14 CONN:140000e 0x0000: 00000000 |.... |
07:47:04.105223 4822.12 CONN:140000c Reason:
07:47:04.105248 4822.8 CONN:1400008 0x0000: 00007811 |..x. |
07:47:04.105273 4822.14 CONN:140000e Compcode:
07:47:04.105290 4822.12 CONN:140000c 0x0000: 00007811 |..x. |
07:47:04.105331 4822.14 CONN:140000e 0x0000: 00000002 |.... |
07:47:04.105372 4822.14 CONN:140000e Reason:
07:47:04.105396 4822.14 CONN:140000e 0x0000: 00007811 |..x. |
*07:47:04.105019 4822.16 CONN:1400010 0x0000: 00007811 |..x. |
===========================================================
From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Andrew Hickson
Sent: Wednesday, September 18, 2013 1:08 PM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: Java MQ Thread Question
In order to be useful an MQCTL with MQOP_STOP/MQOP_SUSPEND has to be able to run while the hConn is 'in use' by an async consume thread and so the behavior of MQCTL is slightly different than for other MQI calls.
The snippet of trace provided here is too short for me to be able to see exactly what is going on. I don't believe MQCTL is intended to interact directly with MQGET (as opposed to an 'MQGET' issued on behalf of callback) and the trace is too short for me to see the context of either the MQGET oir the MQCTL calls.
sorry
Andy.
From: Tim Zielke <***@AON.COM>
To: ***@listserv.meduniwien.ac.at
Date: 18/09/2013 14:58
Subject: Re: Java MQ Thread Question
Sent by: MQSeries List <***@listserv.meduniwien.ac.at>
________________________________
Hi Andy,
I had one follow up on this thread.
For the most part in an API trace of a multi-threaded application, I see the behavior you mentioned below where the API (begins and ends) are serialized and only one API begin or end is running in the trace. However, for the case listed below where managed call backs are being used, I see an MQCTL end and MQGET begin running in what looks like a parallel fashion. I also see this behavior happening consistently in the trace.
Would the MQCTL end and MQGET begin (the MQGET that would run asynchronously on the MQ managed call back thread) be a case where two API calls could run in parallel?
I have listed an example of what I am seeing in the trace below. You can see the MQCTL end running on thread 2 and the MQGET begin running on thread 5 running in what appears to be parallel fashion.
This managed call back was set up so that an MQGET of 2033 would be issued immediately to the consumer function once the managed call back was activated and if no message was available on the queue.
This trace was run on a 7.1.0.2 Solaris 10 queue manager.
08:02:21.402789 554.2 CONN:1400006 __________
08:02:21.402832 554.2 CONN:1400006 MQCTL <<
*08:02:21.402797 554.5 CONN:1400006 __________
08:02:21.402856 554.2 CONN:1400006 Hconn : Input Parm
08:02:21.402882 554.5 CONN:1400006 MQGET >>
08:02:21.402905 554.2 CONN:1400006 Operation : Input Parm
08:02:21.402929 554.5 CONN:1400006 Hconn:
08:02:21.402952 554.2 CONN:1400006 CtlOpts:
08:02:21.402978 554.5 CONN:1400006 0x0000: 01400006 |***@.. |
08:02:21.403025 554.5 CONN:1400006 Msgdesc:
*08:02:21.402999 554.2 CONN:1400006 0x0000: 43544c4f 00000001 00000000 ffffffff |CTLO............|
08:02:21.402999 554.2 CONN:1400006 0x0010: 00000000 00000000 |........ |
08:02:21.403049 554.5 CONN:1400006 0x0000: 4d442020 00000002 00000000 00000008 |MD ............|
08:02:21.403049 554.5 CONN:1400006 0x0010: ffffffff 00000000 00000111 00000000 |................|
08:02:21.403049 554.5 CONN:1400006 0x0020: 20202020 20202020 ffffffff 00000002 | ........|
08:02:21.403049 554.5 CONN:1400006 0x0030: 00000000 00000000 00000000 00000000 |................|
08:02:21.403049 554.5 CONN:1400006 0x0040: === Skipping 17 Duplicate Lines === |................|
08:02:21.403049 554.5 CONN:1400006 0x0150: 00000000 00000000 00000000 00000001 |................|
08:02:21.403049 554.5 CONN:1400006 0x0160: 00000000 00000000 ffffffff |............ |
08:02:21.403071 554.2 CONN:1400006 Compcode:
08:02:21.403093 554.5 CONN:1400006 Bufferlength:
08:02:21.403115 554.2 CONN:1400006 0x0000: 00000000 |.... |
08:02:21.403166 554.2 CONN:1400006 Reason:
*08:02:21.403140 554.5 CONN:1400006 0x0000: 00002000 |.. . |
08:02:21.403191 554.2 CONN:1400006 0x0000: 00000000 |.... |
08:02:21.403212 554.5 CONN:1400006 Buffer : Output Parm
08:02:21.403259 554.5 CONN:1400006 Datalength : Output Parm
08:02:21.403277 554.5 CONN:1400006 Compcode : Output Parm
08:02:21.403293 554.5 CONN:1400006 Reason : Output Parm
08:02:21.403615 554.5 CONN:1400006 __________
08:02:21.403639 554.5 CONN:1400006 MQGET <<
08:02:21.403656 554.5 CONN:1400006 Hconn : Input Parm
08:02:21.403674 554.5 CONN:1400006 Hconn:
08:02:21.403692 554.5 CONN:1400006 0x0000: 01400006 |***@.. |
08:02:21.403709 554.5 CONN:1400006 CbContext:
08:02:21.403726 554.5 CONN:1400006 0x0000: ffffffff 26c3f221 ffffffff 00000002 |....&..!........|
08:02:21.403726 554.5 CONN:1400006 0x0010: 00000000 00000000 00000000 00000000 |................|
08:02:21.403726 554.5 CONN:1400006 0x0020: 00000001 02b42d50 00000000 00000000 |......-P........|
08:02:21.403726 554.5 CONN:1400006 0x0030: 00000000 00000000 00000000 00000000 |................|
08:02:21.403743 554.5 CONN:1400006 Msgdesc:
08:02:21.403762 554.5 CONN:1400006 0x0000: 4d442020 00000002 00000000 00000008 |MD ............|
08:02:21.403762 554.5 CONN:1400006 0x0010: ffffffff 00000000 00000111 00000000 |................|
08:02:21.403762 554.5 CONN:1400006 0x0020: 20202020 20202020 ffffffff 00000002 | ........|
08:02:21.403762 554.5 CONN:1400006 0x0030: 00000000 00000000 00000000 00000000 |................|
08:02:21.403762 554.5 CONN:1400006 0x0040: === Skipping 17 Duplicate Lines === |................|
08:02:21.403762 554.5 CONN:1400006 0x0150: 00000000 00000000 00000000 00000001 |................|
08:02:21.403762 554.5 CONN:1400006 0x0160: 00000000 00000000 ffffffff |............ |
08:02:21.403782 554.5 CONN:1400006 Bufferlength:
08:02:21.403799 554.5 CONN:1400006 0x0000: 00002000 |.. . |
08:02:21.403816 554.5 CONN:1400006 Datalength:
08:02:21.403834 554.5 CONN:1400006 0x0000: 00000000 |.... |
08:02:21.403850 554.5 CONN:1400006 Compcode:
08:02:21.403865 554.5 CONN:1400006 0x0000: 00000002 |.... |
08:02:21.403880 554.5 CONN:1400006 Reason:
08:02:21.403897 554.5 CONN:1400006 0x0000: 000007f1 |.... |
08:02:21.426780 554.5 CONN:1400006 __________
Thanks,
Tim
From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Andrew Hickson
Sent: Monday, August 05, 2013 1:22 PM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: Java MQ Thread Question
At the MQI level, the MQCONNX verb allows a connect request to create an hConn that can be used under multiple threads.
The MQCNO_HANDLE_SHARE_BLOCK/MQCNO_HANDLE_SHARE_NO_BLOCK/MQCNO_HANDLE_SHARE_NONE options control what type of connection is created, whether the hConn is only valid under the thread that created it, and the behavior when multiple concurrent MQI requests are made on the same hConn. Under the covers it's not possible for multiple concurrent MQI requests to actually be processed in parallel, however the queue manager can serialize multiple concurrent request when MQCNO_HANDLE_SHARE_BLOCK is specified.
From: Brumbaugh Glen <***@YAHOO.COM>
To: ***@listserv.meduniwien.ac.at
Date: 05/08/2013 19:07
Subject: Re: Java MQ Thread Question
Sent by: MQSeries List <***@listserv.meduniwien.ac.at>
________________________________
Tim,
The MQI calls are "Single Threaded" through the one MQConn handle. Thus, there may only be one current API call at a time. There is no requirement, other than common sense and/or good design, that a single WMQ handle cannot be shared between multiple threads. If this were to be done, however, the individual threads would have to implement some kind of locking mechanism to serialize their parallel access of a serial resource. A singleton Java class, for instance, could provide the necessary serialization. From the description of the developer's input, the implementation does not seem to be this sophisticated, but it could be.
HTH.
Regards,
Glen Brumbaugh
Prolifics
On Aug 5, 2013, at 1:44 PM, Raul Acevedo <***@US.IBM.COM<mailto:***@US.IBM.COM>> wrote:
Tim,
You are correct. Each thread has its own connection.
Raúl L. Acevedo
Senior IT Architect
IBM Global Business Services
Application Innovation Services (AIS)
818 599 6626 mobile
***@us.ibm.com<mailto:***@us.ibm.com> email
<graycol.gif>Tim Zielke ---08/05/2013 01:33:33 PM---Hello, Normally, I would try to research this type of question more, but I am pressed for time this
From: Tim Zielke <***@AON.COM<mailto:***@AON.COM>>
To: ***@listserv.meduniwien.ac.at<mailto:***@listserv.meduniwien.ac.at>,
Date: 08/05/2013 01:33 PM
Subject: Java MQ Thread Question
Sent by: MQSeries List <***@listserv.meduniwien.ac.at<mailto:***@listserv.meduniwien.ac.at>>
________________________________
Hello,
Normally, I would try to research this type of question more, but I am pressed for time this week and hoping someone on the list might know off of the top of their head.
The platform here is MQ 7.1.0.2 running on Linux x86. I have a Java developer who is saying that his multi-threaded java code does a connect and open of a queue under thread 1, and then threads 2-6 come along and do gets from the queue. Threads 2-6 have not done a connect or open on the queue before issuing the get, according to the developer. I was under the impression that each thread would need to separately connect and open the queue, before it could do a get. Am I mistaken?
Thanks,
Tim Zielke
CICS/MQ Systems Programmer
Aon Hewitt
________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>
Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>
________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>
Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>
________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>
Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>
Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>
________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>
Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>
Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>
________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>
Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>
________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>
Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>
________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>
Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>