Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable multi threading in Camel quickfixj component

I am using camel quickfix component for consuming market prices for different currency pair. I am subscribing for around G20 currency pair so we are getting lot's of update and our ennd point is not able to handle such load so is start rejecting message and logs error .

Sending time accuracy problem

I am thinking it to make multi threaded so more then one thread can handle prices updated. I tried to search a lot but didn't find any satisfactory answer.

Can you please help me out in this ?

like image 485
user1047873 Avatar asked Oct 26 '25 14:10

user1047873


1 Answers

There is 3 ways to do multi threading with Camel :

  • SEDA route : launch a route in a new thread
  • JMS/ActiveMQ for parallel processing
  • JPA : use database as message broker

An example with an activemq solution :

<route> // quikfix endpoint route
  <from uri="quickfix-server:META-INF/quickfix/server.cfg"/> // QuickFix engine who will receive the message from FIX gateway
  <to uri="uri="activemq:queue:fix"/>"
</route>

<route> // parralize route
  <from uri="activemq:queue:fix"/>
  <bean ref="fixService" method="treatment"/> // do your stuff
</route>
like image 153
Thomas Avatar answered Oct 28 '25 07:10

Thomas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!