History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: MULE-2396
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Holger Hoffstaette
Reporter: Dirk Olmes
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Mule

Rewrite the VMMessageReceiver to not extend PollingMessageReceiver

Created: 17/Sep/07 04:43 AM   Updated: 17/Jan/08 09:03 AM
Component/s: Transport: VM
Affects Version/s: 2.0.0-M1, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 2.0.0-M2, 2.0.0-RC1, 1.4.4
Fix Version/s: 2.0.0-RC2, 1.4.4

Time Tracking:
Not Specified

Issue Links:
Related

Labels:
User impact: High


 Description  « Hide
Currently the VMMessageReceiver inherits TransactedPollingMessageReceiver. Polling message receivers are really only necessary for transports for which picking up a message is "expensive"; since this transport is local to the same JVM, this condition does not hold; unfortunately this also prevents the VM receiver from being used in configurations where many in-VM events must be received rapidly, since the polling is controlled by the connector's scheduler (which is the right thing to do for all other transports, VM is just the exception to the default rule). Note that this was also true in 1.3.
The emergency fix in MULE-1688 works fine but was only a workaround: similar to JMS XA polling, polling workers are regularly triggered by the scheduler but not if they are already polling/busy, in which case the scheduler thread immediately returns.
The "real" solution would be to make VMMessageReceiver work in a similar fashion to the rewritten non-XA JMS receiver. See my comment on MULE-1688 why I haven't done that yet.

 All   Comments   Work Log   Change History   Transitions   FishEye      Sort Order: Ascending order - Click to sort in descending order
Holger Hoffstaette - 10/Dec/07 01:40 PM
Progress note - results from a very elegant solution to all this:

previously:
msgs/sec: 74
msgs/sec: 93
msgs/sec: 93
msgs/sec: 93
msgs/sec: 93
msgs/sec: 93
msgs/sec: 93
msgs/sec: 93
msgs/sec: 93
msgs/sec: 93

now:
msgs/sec: 3232
msgs/sec: 8000
msgs/sec: 9416
msgs/sec: 8635
msgs/sec: 8000
msgs/sec: 7112
msgs/sec: 8650
msgs/sec: 8896
msgs/sec: 9398
msgs/sec: 9416

This is with queueEvents=true, still polling and transparently integrated into the current code with minimal changes. Also now has much better concurrency (uses the receiver's workManager correctly); throughput is achieved by message batching, though without stalling for single messages or slamming the threadpool too hard in case too many messages are queued.


Holger Hoffstaette - 10/Dec/07 01:53 PM
The last sentence should have read "..in case too many messages are *de*queued at once."



Holger Hoffstaette - 11/Dec/07 11:43 AM
merged into all relevant directions.

Anatoli Kuzmin - 17/Jan/08 09:01 AM