help with destination keys needed
I can't figure out how the destination keys work.
I have a MDB with max beans in pool set to 1. I have configured and applied
a destination key for this bean's queue: JMSMessageId - Descending. So I
expect messages to come LIFO.
To test, I initiate (from a web application) several message to be sent to
that queue.
I added some delay into onMessage() method (Thread.sleep) so I manage to
send several messages while the message sent first is still being processed.
But all the other messages comes in order they were sent anyway.
Thanks in advance!
Re: help with destination keys needed
Hi GD,
For asynchronous consumers (this includes MDBs) there is a
backlog pipe-line of messages between server and client, the default
size of 10, and it is configurable on the connection factory via
the MessagesMaximum setting. This pipe-line
is unsorted (FIFO) -- messages higher in the sort order do
not jump ahead of others in the pipe-line.
So: either 1) Send more than a few messages at a time.
or 2) create a custom CF, change the MDB WL descriptor
to refer to it, and configure its MessagesMaximum line to 1.
(If you are using transactions, you will also need to enable
transactions/XA on the CF.)
Tom
GD wrote:
[color=blue]
>I can't figure out how the destination keys work.
>
>I have a MDB with max beans in pool set to 1. I have configured and applied
>a destination key for this bean's queue: JMSMessageId - Descending. So I
>expect messages to come LIFO.
>
>
>To test, I initiate (from a web application) several message to be sent to
>that queue.
>I added some delay into onMessage() method (Thread.sleep) so I manage to
>send several messages while the message sent first is still being processed.
>But all the other messages comes in order they were sent anyway.
>
>Thanks in advance!
>
>
>
>
>[/color]
Re: help with destination keys needed