I have a FIX application which receives FIX MarketData messages and sends them to inner applications. I disabled MarketData logging since it's generating extremely large logs but we have the same problem for stores. When I look at a heap dump, I see that there's TreeMap groving continously. Most probably the TreeMap is the one in the FileStore.
What do people do in such cases?
Thanks
Asked
Active
Viewed 1,017 times
0

xyzt
- 1,201
- 4
- 18
- 44
-
Do you have PersistMessages set to Y? I wonder if that TreeMap is storing state. – user1717259 Feb 10 '15 at 17:17
1 Answers
0
- Create a class
CustomFileStore
which implements theMessageStore
interface. Make a constructor taking aMessageStore
object and store it as a member. Delegate all methods in theMessageStore
interface to theMessageStore
member, except for theset
method. In your implementation of theset
method filter messages: if it's a MarketData message do nothing, else callset
on theMessageStore
member. - Create a class
CustomFileStoreFactory
deriving fromFileStoreFactory
, and override thecreate
method. In the create method, create a CustomFileStore passing the constructor the return fromsuper.create
(which would be aFileStore
object). - Pass an instance of
CustomFileStoreFactory
to yourSocketInitiator
.
Note that this is rather hacky and I would not do this myself unless there is no other way (I have never done this myself). If MessageStore.get
is called on the CustomFileStore
, it might result in unexpected behaviour (exceptions, or incorrect results). So I would advise against doing this.

TT.
- 15,774
- 6
- 47
- 88