-
1. Re: Streamlined delivery of messages to consumer
timfox Dec 23, 2006 3:38 PM (in response to timfox)You may have noticed there are parallels between this and how TCP windowing works.
-
2. Re: Streamlined delivery of messages to consumer
ovidiu.feodorov Dec 24, 2006 7:16 PM (in response to timfox)Tim wrote:
If the buffer becomes full, because the consumer consumption rate cannot keep up with the rate the server is sending, then the client side consumer sends a flow rate change message to the server with an argument of zero.
What happens in the case the client buffer becomes full AND there are in-flight messages still arriving? The client may send its "slow down" asynchronous message back to the server, and after a while, the server may react to it, but what happens with the messages that have been sent during this interval? -
3. Re: Streamlined delivery of messages to consumer
timfox Dec 27, 2006 12:19 PM (in response to timfox)"ovidiu.feodorov@jboss.com" wrote:
What happens in the case the client buffer becomes full AND there are in-flight messages still arriving? The client may send its "slow down" asynchronous message back to the server, and after a while, the server may react to it, but what happens with the messages that have been sent during this interval?
Any messages received from the server side when the consumer is not closed will be accepted. I.e. the max buffer size is not a hard limit. -
4. Re: Streamlined delivery of messages to consumer
jeffdelong Dec 27, 2006 6:55 PM (in response to timfox)How does this work when there are multiple consumers for the same queue?
-
5. Re: Streamlined delivery of messages to consumer
timfox Dec 28, 2006 4:39 AM (in response to timfox)"jeffdelong" wrote:
How does this work when there are multiple consumers for the same queue?
It should work the same for any number of consumers. -
6. Re: Streamlined delivery of messages to consumer
jeffdelong Dec 28, 2006 10:43 AM (in response to timfox)Does this imply that all messages on the queue are sent to all consumers of the queue?
If so, how does the JMS server enforce that the message only get consumed by a single consumer? -
7. Re: Streamlined delivery of messages to consumer
timfox Dec 28, 2006 10:47 AM (in response to timfox)"jeffdelong" wrote:
Does this imply that all messages on the queue are sent to all consumers of the queue?
No. JMS queue semantics demand that a particular message is delivered to only one consumer.
If so, how does the JMS server enforce that the message only get consumed by a single consumer?
Currently, the default policy is to round robin between all available consumers, but this has nothing to do with how we deliver messages to the client side. -
8. Re: Streamlined delivery of messages to consumer
timfox Dec 28, 2006 11:52 AM (in response to timfox)So, basically what happens is this:
The queue may have many consumers. When delivery occurs, the queue will select one of those consumers baside on the implementation of Router that is being used with the queue. The default implementation round robins between the consumers.
Once the server side representation of the consumer has the message, it then needs to send it to client side. This works as described in the first post on this thread. -
9. Re: Streamlined delivery of messages to consumer
jeffdelong Dec 28, 2006 12:27 PM (in response to timfox)The server receives the flow rate change (0) and stops sending messages. The client consumes the backlog and when the number remaining reaches bufferSize / 2 it sends another flow rate change message to the server with a +ve value.
By server in the previous quote is this the router or the server side representation of the consumer?
For example - if I had two consumers, and one is "backed up" and has sent a flow rate change (0). Will the round robin router continue to select the server side representation of this consumer? Or conversely, will the router be told this consumer is unavailable and temporarily stop selecting it?
Is the "server side representation" of the consumer the same as the "channel" in the JBoss Messaging architecture? -
10. Re: Streamlined delivery of messages to consumer
timfox Dec 28, 2006 12:33 PM (in response to timfox)"jeffdelong" wrote:
By server in the previous quote is this the router or the server side representation of the consumer?
The latter. The router is not really pertitent to this discussion which is about how messages get from a ServerConsumerEndpoin to the client side consumer. The router is just the thing that routes the message from the queue to the ServerConsumerEndpoint.
Is the "server side representation" of the consumer the same as the "channel" in the JBoss Messaging architecture?
No, the channel is the queue. The "server side representation" is the ServerConsumerEndpoint.