Author |
Message
|
raghuvanshiankur |
Posted: Thu May 10, 2007 6:10 am Post subject: Message is getting truncated.. already resized the buffer. |
|
|
Novice
Joined: 18 Aug 2006 Posts: 23 Location: IN
|
Hello, I've modified the amqsget0.c program. The declared buffer is now
MQBYTE buffer[1024].still I'm gettng truncated message error.
The message which I'm sending is of XML type. and I am using RHF utility to put this message.
I've modified this program on AIX 5.3 server with maintenance level 3.
Please send me some pointers to it. _________________ Ankur ~~ |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Thu May 10, 2007 6:15 am Post subject: Re: Message is getting truncated.. already resized the buffe |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
What is a size of message you are going to read ? _________________ Marcin |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Thu May 10, 2007 6:18 am Post subject: Re: Message is getting truncated.. already resized the buffe |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
You can also read about MQGMO_ACCEPT_TRUNCATED_MSG option. _________________ Marcin |
|
Back to top |
|
 |
raghuvanshiankur |
Posted: Thu May 10, 2007 6:22 am Post subject: |
|
|
Novice
Joined: 18 Aug 2006 Posts: 23 Location: IN
|
the file size of XML is 2KB only...
and my MAXMSGL is 4194304 bytes i.e 4 MB. _________________ Ankur ~~ |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Thu May 10, 2007 6:23 am Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
So... increase buffer or use MQGMO_ACCEPT_TRUNCATED_MSG option. _________________ Marcin |
|
Back to top |
|
 |
raghuvanshiankur |
Posted: Thu May 10, 2007 6:43 am Post subject: |
|
|
Novice
Joined: 18 Aug 2006 Posts: 23 Location: IN
|
I've already changed the buffer size from 101 to 1024 as you can see below.
MQBYTE buffer[1024]; /* message buffer*/
Shall I increase it to some more extent or there can be some other prob too? _________________ Ankur ~~ |
|
Back to top |
|
 |
Vitor |
Posted: Thu May 10, 2007 6:46 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
raghuvanshiankur wrote: |
the file size of XML is 2KB only...
|
So how does a 2KB file fit in a buffer 1024 bytes long? Or am I missing something here?  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
raghuvanshiankur |
Posted: Thu May 10, 2007 7:11 am Post subject: |
|
|
Novice
Joined: 18 Aug 2006 Posts: 23 Location: IN
|
now I've change buffer size to 4096 i.e. 4 MB..
but still the error is same while browsing the queue. _________________ Ankur ~~ |
|
Back to top |
|
 |
Vitor |
Posted: Thu May 10, 2007 7:15 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
raghuvanshiankur wrote: |
now I've change buffer size to 4096 i.e. 4 MB..
. |
I think you'll find 4096 bytes is 4KB not 4MB.
You might want to see if the message is 2Kb or 2Mb......  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
raghuvanshiankur |
Posted: Thu May 10, 2007 7:19 am Post subject: |
|
|
Novice
Joined: 18 Aug 2006 Posts: 23 Location: IN
|
oh.. sorry for it,.
file size if 2 KB..
and now buffer size is 4 KB..
but still facing the same error. _________________ Ankur ~~ |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu May 10, 2007 7:21 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Did you recompile after changing the code?
Are you running the binary produced from recompiling?
Are you *sure* the *message* has a size that is smaller than the buffer you have specified? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
raghuvanshiankur |
Posted: Thu May 10, 2007 7:38 am Post subject: |
|
|
Novice
Joined: 18 Aug 2006 Posts: 23 Location: IN
|
Yeah ! I am sure the file size is 2KB and buffer size is 4 KB.
Yes, I've recompiled after changing the code... _________________ Ankur ~~ |
|
Back to top |
|
 |
Vitor |
Posted: Thu May 10, 2007 7:47 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
raghuvanshiankur wrote: |
Yes, I've recompiled after changing the code... |
And you're certain it's the recompiled version is the one in the path that you're finding when you type it at a command prompt? The original version is not earlier in your path? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
EddieA |
Posted: Thu May 10, 2007 10:33 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Have you changed the value in the BufferLength parameter as well. Just making the Buffer bigger doesn't do anything, except waste space.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
|