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 Index » IBM MQ API Support » xms transfers whole queue when selecting?

Post new topic  Reply to topic
 xms transfers whole queue when selecting? « View previous topic :: View next topic » 
Author Message
antishok
PostPosted: Mon Aug 06, 2007 11:24 pm    Post subject: xms transfers whole queue when selecting? Reply with quote

Apprentice

Joined: 29 Apr 2007
Posts: 31

Hey,

I'm using XMS (writing in C++),
I have a remote queue on a queue manager on my LAN.
When I put a small (500 byte) message on it (and nothing else in it),
and receive (using a MessageConsumer) it, it works quickly

when there is many data pushed into the queue before this small message,
(say, 20mb worth of messages, and then the small 500b message),
it takes a long while to receive the small message (using a message selector, by exact correlation ID).. the time it takes to receive it is roughly proportional to the amount of data in the queue
seems that my client is receiving the whole bulk of data which it doesn't need..

Is this how it's supposed to work?

It wasn't like this using AMI (we're slowly moving to XMS now..)
nor using JMS... the time it took to receive a message seemed only to be a function of that message's size

thank you,
Uri Gilad
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Aug 07, 2007 2:57 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

You need to check the way you are using the selector...
If not used in the most optimal way the behavior you are describing is standard.

Can you post the definition of the selector ?

And just to refresh my memory if there any differences between the JMS selector and the XMS selector (see manuals) post them too.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
antishok
PostPosted: Tue Aug 07, 2007 3:03 am    Post subject: Reply with quote

Apprentice

Joined: 29 Apr 2007
Posts: 31

I'm using it like this right now:


Code:

receiver = m_sess.createConsumer(d,            "JMSCorrelationID='ID:100000000000000000000000000000000000000000000000'");



and of course, there's only one message with that correlation ID
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Aug 07, 2007 3:11 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Is the time roughly proportional to the amount of data in the queue or to the amount of messages in the queue? (huge difference)

And would it just happen that the message you are looking for is the last one in the queue?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
antishok
PostPosted: Tue Aug 07, 2007 3:46 am    Post subject: Reply with quote

Apprentice

Joined: 29 Apr 2007
Posts: 31

It's proportional to the amount of data, not the amount of messages..
and yeah, the message I'm fetching is usually last,
so it doesn't retrieve the whole queue, but only messages up to the message I want

side question:
I'm trying to retrieve one big (15mb) message from the queue
but get a 2010 error (MQRC_DATA_LENGTH_ERROR)
the channel definition on the queue manager has a larger max message length..

how can I change the receive buffer size in xms (dynamic factory, not using a repository)?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Aug 07, 2007 12:38 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

antishok wrote:
It's proportional to the amount of data, not the amount of messages..
and yeah, the message I'm fetching is usually last,
so it doesn't retrieve the whole queue, but only messages up to the message I want

side question:
I'm trying to retrieve one big (15mb) message from the queue
but get a 2010 error (MQRC_DATA_LENGTH_ERROR)
the channel definition on the queue manager has a larger max message length..

how can I change the receive buffer size in xms (dynamic factory, not using a repository)?


Well if your qcf uses a client connection make sure you use the channel table and the channel's max msg size will allow for such a big message.

Question => design => what transaction do you have that needs 15MB of data in a single UOW? I would look into running one transaction = 1 message.... and remember you should not batch up transactions into one single message...

Main question== have you tried setting the CorrelationId using the setbytes() method. Did you see any difference ?


_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
antishok
PostPosted: Wed Aug 08, 2007 8:46 pm    Post subject: Reply with quote

Apprentice

Joined: 29 Apr 2007
Posts: 31

I was under the impression I don't need a channel table when using xms..
If I create the qcf dynamically, don't I set all the properties (channel name, hostname, port, etc..) at runtime? I suppose I'm missing something here.. excuse my ignorance

The 15MB message was just for testing purposes,
but - we use MQ for distributing content data, could be gigabytes
Right now we seperate it into 1MB chunks per MQ message.

hmm, setbytes() method of what object?

I think I forgot to mention that we're using MQ 5.3, sorry for that
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Aug 09, 2007 3:47 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

antishok wrote:
I was under the impression I don't need a channel table when using xms..
If I create the qcf dynamically, don't I set all the properties (channel name, hostname, port, etc..) at runtime? I suppose I'm missing something here.. excuse my ignorance

The 15MB message was just for testing purposes,
but - we use MQ for distributing content data, could be gigabytes
Right now we seperate it into 1MB chunks per MQ message.

hmm, setbytes() method of what object?

I think I forgot to mention that we're using MQ 5.3, sorry for that

message.setCorrelationIdAsBytes(byte[]) you'll have to look it up as this is from memory and probably not the exact syntax you need...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
antishok
PostPosted: Sun Aug 12, 2007 9:08 pm    Post subject: Reply with quote

Apprentice

Joined: 29 Apr 2007
Posts: 31

no such thing in xms, as far as I'm aware and as far as I can see in the docs
I put the message selector string in a call to create the receiver,
there's no message object involved until after the message is received by the receiver (which returns a message object)
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Aug 13, 2007 3:58 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Then it's probably time to open a PMR about it...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
antishok
PostPosted: Wed Aug 15, 2007 12:36 am    Post subject: Reply with quote

Apprentice

Joined: 29 Apr 2007
Posts: 31

that'll be the second one concering xms in 2 weeks

thank you
Back to top
View user's profile Send private message
smdavies99
PostPosted: Thu Aug 16, 2007 4:22 am    Post subject: WMQ 5.3 eh? Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

V5.3 Is about to go out of service (Sept 2007) so if you raise a PMR, the fisrt thing IBM is likely to say is
"Please upgrade to V6.0.2.1 or similar"
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » xms transfers whole queue when selecting?
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.