flume-ng-rabbitmq
flume-ng-rabbitmq copied to clipboard
Issues with read performance
I'm not sure if I'm missing something but I'm only able to pull somewhere between 10-50 messages/second from my RMQ source but I'm able to get in the range of several thousand per second by pulling directly from RMQ or using other RMQ plugins. Any thoughts? Thanks.
I'm finding the same issue. Is there any effort underway to consider batchSize parameter?
@eoglethorpe and @samlane
The issue is that the source is synchronous, polling and does not take advantage of prefetching. Right when I looked at the code I knew it was going to be a problem and it was.
I fixed it in my own fork. The reason I haven't pushed a pull request @jcustenborder is that the code is rather sloppy albeit we are using it in production.
https://github.com/agentgt/flume-ng-rabbitmq
Particularly you want to look at / copy:
https://github.com/agentgt/flume-ng-rabbitmq/blob/master/src/main/java/org/apache/flume/source/rabbitmq/RabbitMQConsumerSource.java
With my consumer we get about 150 msg/sec with spikes of it easily handling 1500 msg/sec. I don't know if it can go faster because we don't have the load yet and sadly haven't had the time to set up some cloud images to test its max.
We use the file channel. You do not want to use the memory channel and or the spillover channel. I know its shocking but the file channel on a modern SSD is faster than the memory channel when dealing with bursts.
Awesome, thanks for posting - I ended up switching to another RMQ plugin which had much better read performance 'out of the box': https://github.com/stampy88/flume-ng-amqp-plugin
Yeah that plugin should be even faster than mine because it does batching. I didn't implement batching but was going to (this is so that you only have to send one ACK for the entire prefetch).
However it looks like I don't now and I can just use that plugin :)
@eoglethorpe when i use the plugin(https://github.com/stampy88/flume-ng-amqp-plugin) as a test, i found it only can pass the string under 2byte,then i had read the source but got nothing. do you have any idea? thx