Using Java Messagingjng
Using Java Messagingjng
com
Financial Trading Systems Using JMS
and Message-Oriented Middleware
by Yako Fain
www.weekendwithexperts.com
!hilly JU"# October $%# $&&%
www.weekendwithexperts.com
'bo(t Mysel)
M(ltithreading
!otential iss(es
www.weekendwithexperts.com
' Trading System
www.weekendwithexperts.com
-all Street
Stock *xchanges
21YS*# 1'S/'7#
'merican Stock
*xchange83
4rokerage ho(ses#
trading )loor#
specialists
www.weekendwithexperts.com
Stock !(rchase Order
"U59-eb inter)ace
=o(nd-trip metrics
?igh 'ailability
Scalability
MSM7# Microso)t
Messaging bridges come handy in cases like mergers of two companies,
i.e.: A trading system that uses WebSphere MQ can arrange money
transfer from a banking application that uses Tibco.
Webogic has a concept of foreign !MS ser"ers.
Sonic MQ has a bridge to WebSphere MQ#
www.weekendwithexperts.com
+onnecting 'pplications with MOM
www.weekendwithexperts.com
More MOM bene)its
=eceiers subscribe to a
topic.
JMS 6isteners.
Message
+ontrol threads by (sing thread pools. 's o) Jaa %.& they are part
o) J$S* 2see &ava"util"concurrent"5!readEool:xecutor3.
The address o) the ob>ect that0s bo(nd (nder the node Yako is ;
cnGYako# cnG=iskTechnology# o(Ggro(ps# oGxyA.com
www.weekendwithexperts.com
6/'! Serer )or JMS Ob>ects
Set JNDI properties, connect to the LDAP server, and find the
object called rder!"F# a J$S %ueue connection factor&'
Trading !re-+learance
5nsider Trading
'nti-Money 6a(ndering
Using real-time messaging helps in preenting iolations;
re>ect a trade i) it iolates any reg(lations.
www.weekendwithexperts.com
SO'# */' and Messaging
Serices;
Orders# 'cco(nts
+redit =ating 2+=3. 5nstead o) checking )or eery order# s(bscribe )or
modi)ications o) += 2!(b9S(b3.
!ositions
Market data. S(bscribe )or partic(lar stock in)o and initiate trades when
conditions are met 2!(b9S(b3.
5) yo( know in adance how many slices are being sent# >(st
add a se@(ence n(mber to a the header property.