Author |
Message
|
oyesiji |
Posted: Tue Aug 22, 2017 7:41 am Post subject: Incorrect Data Length MQ |
|
|
Newbie
Joined: 22 Aug 2017 Posts: 4
|
I am using JMS deployed on websphere to send an MQ message and a Non JMS client is reading the message at the other end. I am sending 30 characters but the receiving application is receiving 130 characters. Spaces are added to the end of the 30 original characters. Please what can be the cause? |
|
Back to top |
|
 |
Vitor |
Posted: Tue Aug 22, 2017 7:45 am Post subject: Re: Incorrect Data Length MQ |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
oyesiji wrote: |
Please what can be the cause? |
Your code? You're putting 30 characters in a 130 character buffer?
The most likely issue here is the non-JMS consumer getting JMS headers it doesn't expect not spaces at the end of the payload. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
oyesiji |
Posted: Tue Aug 22, 2017 8:01 am Post subject: |
|
|
Newbie
Joined: 22 Aug 2017 Posts: 4
|
yes i am setting some property values but does that affect the message data length
requestMessage.setStringProperty("tested" ,"me"); |
|
Back to top |
|
 |
JosephGramig |
Posted: Tue Aug 22, 2017 8:02 am Post subject: Re: Incorrect Data Length MQ |
|
|
 Grand Master
Joined: 09 Feb 2006 Posts: 1244 Location: Gold Coast of Florida, USA
|
oyesiji wrote: |
I am using JMS deployed on websphere... |
WebSphere what? There are/were many products prefixed with WebSphere. I bet you mean WAS. |
|
Back to top |
|
 |
oyesiji |
Posted: Tue Aug 22, 2017 8:06 am Post subject: |
|
|
Newbie
Joined: 22 Aug 2017 Posts: 4
|
Yes Websphere Application Server7 |
|
Back to top |
|
 |
Vitor |
Posted: Tue Aug 22, 2017 8:16 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
oyesiji wrote: |
yes i am setting some property values but does that affect the message data length |
Yes it does. Depending on the compatibility setting of the queue manager (which you don't mention) and the level of the queue manager (which you don't mention) the properties are transported within message headers.
But as I said, that would be on the front of the message not the end. The most likely explanation remains that your code is padding the message with 100 spaces you don't think it is. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
oyesiji |
Posted: Tue Aug 22, 2017 8:26 am Post subject: |
|
|
Newbie
Joined: 22 Aug 2017 Posts: 4
|
No i am not padding with 100 spaces . But when i browse using the MQ Explorer i see the right data length |
|
Back to top |
|
 |
Vitor |
Posted: Tue Aug 22, 2017 8:35 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
oyesiji wrote: |
No i am not padding with 100 spaces . But when i browse using the MQ Explorer i see the right data length |
So what you're saying is that you send a message of 30 characters, you browse the message on the queue and the message on the queue has 30 characters but the receiving application is getting 130 characters.
Ok, while I take a deep breath, post your evidence that the receiving application is receiving 130 characters from the queue and the receiving application is not (for example) loading the 30 characters into a 130 character buffer. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Aug 22, 2017 11:03 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Vitor wrote: |
oyesiji wrote: |
No i am not padding with 100 spaces . But when i browse using the MQ Explorer i see the right data length |
So what you're saying is that you send a message of 30 characters, you browse the message on the queue and the message on the queue has 30 characters but the receiving application is getting 130 characters.
Ok, while I take a deep breath, post your evidence that the receiving application is receiving 130 characters from the queue and the receiving application is not (for example) loading the 30 characters into a 130 character buffer. |
And remember the 130 char could be 100 char for the RFH header and 30 char app data...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
JosephGramig |
Posted: Tue Aug 22, 2017 11:29 am Post subject: |
|
|
 Grand Master
Joined: 09 Feb 2006 Posts: 1244 Location: Gold Coast of Florida, USA
|
So if you use support pack IH03 RfhUtilC.exe program to view the msg, it will also show the RFH headers on a tab.
dspmqmsg can also dump the msg.
The msg is probably in code page 1208. Is the consuming program expecting that? |
|
Back to top |
|
 |
Vitor |
Posted: Tue Aug 22, 2017 11:31 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
fjb_saper wrote: |
And remember the 130 char could be 100 char for the RFH header and 30 char app data...  |
I was making the assumption that all of the extra 100 characters were the right fill spaces the OP mentioned. This is of course an assumption.
I was making the assumption that the OP would have said "I put 30 characters on the queue but there's 100 characters of junk in front of it" if that's what's being seen, but that too is an assumption.
I was also making the assumption that as I described JMS headers above, the OP might have said something like "is that the junk in front of the message before it's space filled to the right", but that's possibly a big assumption.
The OP reading.
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|