Comments (4)
Hi @viktartse , apologies for getting back to you only now. That does in fact work. And thank you very much.
A note or just FYI - the .Clone function seems to be a relatively expensive operation in terms of memory, and somewhat in terms of memory and also latency to some degree. In the world of high frequency trading. (To my limited knowledge and expertise on those matters.)
from fix-antenna-net-core.
Definitely losing data integrity from before OnNewMessage() writes to a Channel and when a new thread reads from the Channel
from fix-antenna-net-core.
Hi @derMaaster, one thing that is definitely should be done if there is a need to process the received message later is cloning the message. The engine re-uses the same chunk of memory for every FixMessage that is passed to the OnNewMessage handler.
To clone the message you can do something like this:
var messageCopy = (FixMessage)message.Clone();
from fix-antenna-net-core.
I agree a call to .Clone is not very cheap but an alternative would be the engine constructing a new FixMessage object for every new message from scratch instead of reusing the same object. That would also have a cost.
from fix-antenna-net-core.
Related Issues (15)
- Reject message (35=3) does not include tag 371 for troubleshooting HOT 5
- Disconnect / losing fix connection not in logs HOT 5
- FieldNotFoundException - tag 271 not in message (35=x) where 269 = q HOT 26
- Make IExtendedFixSessionListener public
- Support FixMessage.Parse HOT 2
- .Net Standard 2.0 with .Net Framework 4.7.2
- Net (Wrapper) migration to .Net Core
- Time drift when running on AWS HOT 1
- ByteBuffer.Add(char) is Encoding dependant HOT 3
- ByteArrayMessageStorage.Add: Suspicious code HOT 11
- Question about behavior when param forceSeqNumReset set to OneTime HOT 2
- Datetime values parser HOT 6
- .editorconfig file makes the solution unbuildable in Visual Studio HOT 1
- Epam.FixAntenna.Constants does not exist. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fix-antenna-net-core.