Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge changes #3

Merged
merged 43 commits into from
Jul 26, 2018
Merged

merge changes #3

merged 43 commits into from
Jul 26, 2018

Conversation

jonfreedman
Copy link
Owner

No description provided.

charlesbr1 and others added 30 commits July 29, 2015 23:40
Set the log session id prefix in the logger appender, instead of building a new string on each message
…tion errors (#172)

* QFJ-940: Event log omits parts of received message in case of validation errors
 - in case of errors: log raw message data instead of incompletely parsed message
 - added method Message.toRawString() which returns the message string as it was passed to the Message class
 - added unit test
 - improved some log messages in Session class
* Overload MessageFactory.create to accept ApplVerID for message creation.
* Add DefaultMessageFactory constructor which accepts defaultApplVerID value.
* Fix DefaultMessageFactory default constructor to pass ApplVerID value instead of BeginString value
* Crack NOS for FIX50SPX in ATMessageCracker
…D. (#174)

Some calls to isSetting() don't specify the sessionID
…o… (#168)

* QFJ-943: optional watermarks-based back pressure propagaion from inbound queue to the socket
 - added logic to unregister Session to Session.close() method
 - changed some tests to use try-with-resources on Session
 - changed Connector implementations to clean up used Sessions on stop
 - changed AbstractSocketInitiator to clean up internal map of initiators on stop
this is not supported anymore on JDK8
to get complete stack trace in case of Exceptions during test run
…a(96) without RawDataLength(95) (#181)

- improved error message
(cherry picked from commit a06f317)
* QFJ-942: Connectors sometimes hanging in call to dispose() when stop() was called
 - introduced SessionConnector.closeManagedSessionsAndDispose() which makes an effort to close all managed sessions and disposes the IoService
 - used new method in Acceptor, Initiator and TestConnection (used for acceptance tests)
* added reset() method

The clear() method is public but its purpose is not explained.
It does not allow to reuse a message because it removes the header & trailers of a message.
This reset() method can be used to reuse a message.
* Update getString signature in SessionSettings
* removed FieldConvertError from javadoc
* Allocations optimization
* Create NumbersCache.java
A cache of strings for frequently used integers

* Allocations optimization
Put the string builder used in toString() method in a thread local in order to reuse it.
Calculate the message length & checksum after the message is built, this is to avoid to compute the message multiple time and to iterate over each field.
If the charset used to send message is not string equivalent to the jvm one, this optimization is not active.

* changed logic to work also with incomplete messages, i.e. where BeginString etc have not been added yet
* updated MessageTest
* changed NumbersCache to only hold numbers up to 99999 since it should be sufficient for normal use cases
* minor renaming
* Create NumbersCache.java
A cache for strings of frequently used integers

* Optimized message checksum and length calculation
Avoided some temporary IntField creation to compute length.
In fact, the "isStringEquivalent" branch that I added is useless with previous commit on Message class, which directly compute length & checksum if possible.
Change some 'for each' list iteration by old loop over index to avoid iterator allocations, as the jvm will not always do it for us.

* - minor renaming
- changed NumbersCache to only hold numbers up to 99999 since it should be sufficient for normal use cases
…#187)

* updated target repository

* update order of code generation to ensure that correct field is generated, qfj only generates field once

* update tests for FIX50SP2

* moving workaround for default msg factory to quickfixj

* reverted change to test data that was only needed for IG OTC customisations

* simplification of DefaultMessageFactoryFix50sp2

* minimising deviations on IG specific branch

* clean up for pull request
* removed no longer supported boolean flag blockInThread
* made method SingleThreadedEventHandlingStrategy.block() private since its external usage is not supported anymore
- minor corrections
…top() (#192)

- implemented interrupt() when DedicatedThreadExecutor is used
 - this should fix failing SocketInitiatorTests as observed in https://travis-ci.org/quickfix-j/quickfixj/builds/384335297
andyflury and others added 13 commits June 6, 2018 11:21
* create dynamic initiator session
* update documentation
* Added dynamic initiator sessions Test
- some unit tests did not reset it which lead to errors depending on test order
 - e.g. ResynchTest and AcceptanceTests were failing constantly on my machine because LogUtilTest did not reset
   the SystemTimeSource and as a result the Session did not send out any heartbeats
* [Tom/Andrey] remove duplicate field definitions in fix44 xml spec

 AllocationInstruction and SettlementInstructions had duplicate fields
 declared in their FIX schemas (AccruedInterestAmt and SettlInstSource)
 respectively. We have removed those declarations that
 were incorrect according to the FIX protocol
* Remove unneeded methods.
* Cleanup sessions in any case on stop().
** eventHandlingStrategy.stopHandlingMessages() might throw RuntimeException from onMessage()
** minor change: aligned initialize method to be in same position as in SocketAcceptor
* Move isStarted flag to end of initialization.
** eventHandlingStrategy.blockInThread() returns immediately (as opposed to block() which could formerly be used)
* Remove ConfigError on stopAcceptingConnections().
** that Exception is never thrown
* Minor reformatting.
* Introduce default stop() method.
* Minor improvements in ResynchTest.
* Fix race condition in SocketAcceptorTest
** sometimes the shutdown was done without waiting for the Logout message
* Cleanup sessions and stop session timer.
* Removed deprecated methods.
* Minor cleanups.
* Handle InterruptedException on ATServer stop.
Make sure QF_SESSION attribute gets removed in any case. SingleThreadedEventHandlingStrategy.onMessage might throw an Exception.
…itiator (#201)

* Corrections to SingleThreadedEventHandlingStrategy and SocketAcceptor/Initiator.
** Reverted changes from #192 since we actually want to process all messages on stop().
* Return from block() when stopped.
** It does not make sense to call getMessage() in that case.
* minor cleanup in ThreadPerSessionEventHandlingStrategy
* Added javadoc and unit test...
** to ensure that the session timer is not stopped by Message Processor thread when using stopHandlingMessages(true)
* Changed SocketAcceptor and SocketInitiator to use SingleThreadedEventHandlingStrategy.stopHandlingMessages(true).
** Otherwise it could happen on quick restarts that the Message Processor thread stopped the SessionTimer concurrently which lead to an unresponsive FIX session, i.e. no Logon sent, no Heartbeats.
@jonfreedman jonfreedman merged commit 6686879 into jonfreedman:master Jul 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.