A set of the types which are considered to be admin session level messages and so do not need to be persisted and stored for replay.
Close the persistent store and record the time the session closed.
Close the persistent store and record the time the session closed. If it is opened tomorrow then sequence numbers reset down to 1
Deals with close from the previous day and the fact this process was not restarted ie will reset the sequence numbers back to 1
Deals with close from the previous day and the fact this process was not restarted ie will reset the sequence numbers back to 1
Called back from the state machine when an action should be taken - either a reply message or close the socket etc.
Called back from the state machine when an action should be taken - either a reply message or close the socket etc.
The action
A fix message has arrived.
A fix message has arrived. Yippee (I guess)
The incoming message
Returns the last sequence number, but internally does a +1.
Returns the last sequence number, but internally does a +1.
When a client connects, and established the socket then we should read in the details from file.
When a client connects, and established the socket then we should read in the details from file. Note that now we have index files as well this could be quite slow - implementation dependency within your store
Try to retrieve all the fix messages from the store, or if there are gaps then send a gap fill instead.
Try to retrieve all the fix messages from the store, or if there are gaps then send a gap fill instead. Note that its generally stupid to resent admin messages....up to you if you stick them in your message store or not.
The first one to send back
The last one to send back
If the first session of the day then reset to 1.
If the first session of the day then reset to 1.
Generates the full SfMessage which can then be sent over the wire Also store the message in the message store - but NOT admin messages.
Generates the full SfMessage which can then be sent over the wire Also store the message in the message store - but NOT admin messages.
The generate SfMessage containing the correct sequence numbers and comp id, and also the fixString which represents the fix message
A set of the types which are considered to be admin session level messages and so do not need to be persisted and stored for replay.
A set of the types which are considered to be admin session level messages and so do not need to be persisted and stored for replay.
Created by Jonathan in 2016.
If you want an easy life, just use the companion object and create the session and a file based message store for the sequence numbers, with a simple session Id. If you want a more complicated life then copy the apply function to your own code and set it up yourself.
You should set the PersistentStore asap, and, from your implementation, as you read initial values call back into the session to set the values.