|
hi, i tried asyncDispatch=false and optimizeDispatch=true and it did not help.
the real issue we face is when we setup 4 brokers we don't know which broker will be slower. The reason the consumer on broker2 got stuck might be because the resource it needs to access is not accessible at the moment. This is a decoupled environment. Applications only know: talk to a broker and get its task. All of this is not predictable beforehand. That is why we think PrefetchSize on a networkConnector shall come to rescue but it does not have any effect at all so far. When we found out broker2's consumers are stuck, it is already late because 5000 msg are already dispatched to the broker. ok, I think you need to reduce the memory available to the queues on all brokers and disable producerFlowControl. The prefetch value is applied to network subscriptions but if the remote broker can accept a message it will take it. Even with straight through processing, not having a consumer available to consume is not a problem unless the queue is memory constrained to block a send if there is no space.
So to ensure that 5000 messages don't build up in a slow broker, constrain the memory allocated to a queue such that it will only accept 10 or twenty messages and disableFlowControll so that a send will block. When that queue is full, because the consumers are slow, this will eventually push back to the network consumer with its small prefetch. changing priority to major as I don't think this issue should block a 5.3 release.
The prefetch is in effect for a network consumer but the consumer dispatches immediately to a broker through a message producer that does not block unless the send blocks through a memory utilization limit. Thus my previous comments. Constraining the queue's memory usage should block message producers for slow brokers. Have you had any success with memory usage or disk usage constraints that will cause a send to block pending space?
Gary Tully made changes - 22/Jul/09 08:57 AM
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
I wonder if you enable straight through processing, asyncDispatch=false and optimizeDispatch=true for broker2, will the dispatch block the network consumer.
An alternative solution may be to restrict the memory available to broker2 and have it use producer flow control such that it can only have a small number of messages outstanding.