ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexGeneral DiscussionIncorrect Data Length MQ

Post new topicReply to topic
Incorrect Data Length MQ View previous topic :: View next topic
Author Message
oyesiji
PostPosted: Tue Aug 22, 2017 7:41 am Post subject: Incorrect Data Length MQ Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Tue Aug 22, 2017 7:45 am Post subject: Re: Incorrect Data Length MQ Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 24699
Location: Ohio, 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
View user's profile Send private message
oyesiji
PostPosted: Tue Aug 22, 2017 8:01 am Post subject: Reply with quote

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
View user's profile Send private message
JosephGramig
PostPosted: Tue Aug 22, 2017 8:02 am Post subject: Re: Incorrect Data Length MQ Reply with quote

Grand Master

Joined: 09 Feb 2006
Posts: 1184
Location: Derby City, 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
View user's profile Send private message AIM Address
oyesiji
PostPosted: Tue Aug 22, 2017 8:06 am Post subject: Reply with quote

Newbie

Joined: 22 Aug 2017
Posts: 4

Yes Websphere Application Server7
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Aug 22, 2017 8:16 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 24699
Location: Ohio, 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
View user's profile Send private message
oyesiji
PostPosted: Tue Aug 22, 2017 8:26 am Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Tue Aug 22, 2017 8:35 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 24699
Location: Ohio, 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
View user's profile Send private message
fjb_saper
PostPosted: Tue Aug 22, 2017 11:03 am Post subject: Reply with quote

Grand Poobah

Joined: 18 Nov 2003
Posts: 19500
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
View user's profile Send private message Send e-mail
JosephGramig
PostPosted: Tue Aug 22, 2017 11:29 am Post subject: Reply with quote

Grand Master

Joined: 09 Feb 2006
Posts: 1184
Location: Derby City, 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
View user's profile Send private message AIM Address
Vitor
PostPosted: Tue Aug 22, 2017 11:31 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 24699
Location: Ohio, 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
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexGeneral DiscussionIncorrect Data Length MQ
Jump to:



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
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.