Author |
Message
|
antishok |
Posted: Mon Aug 06, 2007 11:24 pm Post subject: xms transfers whole queue when selecting? |
|
|
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 |
|
 |
fjb_saper |
Posted: Tue Aug 07, 2007 2:57 am Post subject: |
|
|
 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 |
|
 |
antishok |
Posted: Tue Aug 07, 2007 3:03 am Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Tue Aug 07, 2007 3:11 am Post subject: |
|
|
 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 |
|
 |
antishok |
Posted: Tue Aug 07, 2007 3:46 am Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Tue Aug 07, 2007 12:38 pm Post subject: |
|
|
 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 |
|
 |
antishok |
Posted: Wed Aug 08, 2007 8:46 pm Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Thu Aug 09, 2007 3:47 pm Post subject: |
|
|
 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 |
|
 |
antishok |
Posted: Sun Aug 12, 2007 9:08 pm Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Mon Aug 13, 2007 3:58 am Post subject: |
|
|
 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 |
|
 |
antishok |
Posted: Wed Aug 15, 2007 12:36 am Post subject: |
|
|
Apprentice
Joined: 29 Apr 2007 Posts: 31
|
that'll be the second one concering xms in 2 weeks
thank you |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Aug 16, 2007 4:22 am Post subject: WMQ 5.3 eh? |
|
|
 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 |
|
 |
|