Author |
Message
|
jefflowrey |
Posted: Mon Jul 23, 2007 8:46 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
So your problem is that if you have a queue with a single, committed, message that is larger than 256K in size, and you start up your program for the first time, then hasNext() returns false? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
antishok |
Posted: Mon Jul 23, 2007 8:48 am Post subject: |
|
|
Apprentice
Joined: 29 Apr 2007 Posts: 31
|
To make things clearer -
notice where I wrote *** ,
- in the first case, this number is 260000, the queue is initially empty, and when i run it, the message is written (size on queue is indeed 260000) and then read, works fine
- in the second case (seperate run), i change this number to 262000 (or anything larger), the message is written as before (just its a bit bigger),
but hasNext() returns false this time
the ONLY difference was the message size
The queue is initially empty in both cases, and each case is run seperately
Code: |
xms::InitialContext i;
i.create("file://c:\\Program Files\\IBM\\JMSAdmin Tool\\cds\\.bindings");
d = dynamic_cast<xms::Destination *>(i.lookup("outgoingContentQueue2"));
xms::MessageProducer p = m_sess.createProducer(*d);
xms::TextMessage t = m_sess.createTextMessage();
xmsSBYTE buf[300000];
memset(buf, 'A', 300000);
t.setText(xms::String(buf,***260000***)); // 260000 or 262000
p.send(t);
p.close();
/*xms::QueueBrowser*/ receiver = m_sess.createBrowser(*d);
xms::Iterator i = receiver.getEnumeration();
if ( i.hasNext() == xmsTRUE )
{ // in the first case xmsTRUE was returned, in the second case xmsFALSE...}
|
Hope it's clear now. |
|
Back to top |
|
 |
antishok |
Posted: Mon Jul 23, 2007 8:50 am Post subject: |
|
|
Apprentice
Joined: 29 Apr 2007 Posts: 31
|
jeff, yes, that's the problem,
although, the threshold is not exactly 256k,
it's somewhere between 261754 and 261781 (which are a bit less than 256k),
i'm guessing this adds up to 256k with header overhead or what not
(the code i posted above also writes the message to the queue, just for demonstrating to you. my intention is for another process to write the messages, but that's besides the point here) |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Jul 23, 2007 8:55 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Can you compare the results of amqsbcg between the smaller working message and the larger non-working message? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
antishok |
Posted: Mon Jul 23, 2007 9:08 am Post subject: |
|
|
Apprentice
Joined: 29 Apr 2007 Posts: 31
|
I get a MQRC_TRUNCATED_MSG_FAILED on both sizes (260000 and 262000) with amqsbcg:
MQGET 1, failed with CompCode:1 Reason:2080 |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Jul 23, 2007 9:13 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Interesting!
What happens when your program tries to browse a msg > 256K created by something like RFHUTIL? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
antishok |
Posted: Mon Jul 23, 2007 9:32 am Post subject: |
|
|
Apprentice
Joined: 29 Apr 2007 Posts: 31
|
small message (240000) was read fine,
large message (280000) was not (hasNext returned false)
written by RFHUTIL.. |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Jul 23, 2007 9:42 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You probably should open a PMR. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
antishok |
Posted: Mon Jul 23, 2007 9:50 am Post subject: |
|
|
Apprentice
Joined: 29 Apr 2007 Posts: 31
|
I suppose I will
thank you for your efforts and quick replies  |
|
Back to top |
|
 |
antishok |
Posted: Mon Jul 30, 2007 5:33 am Post subject: |
|
|
Apprentice
Joined: 29 Apr 2007 Posts: 31
|
This was indeed a bug,
IBM are working on a fix. |
|
Back to top |
|
 |
|