Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagecpp
bool processMsg(Engine::MsgPipeElem* elem, Parser::LiteFixMessage& msg)
{
.........
      	uint64_t t1 = msg.getNanosTimestamp();  // message ingress timestamp
      	msg.setNanosTimestamp( 0 );                      
 
      	session->put( &msg );
      	uint64_t t3 = get_nanosec(); // send complete timestamp
 
      	uint64_t t2 = msg.getNanosTimestamp();  // serialization+persistience complete timestamp
                                   		// there could be 0 we set above if the message wasn't sent to the socket synchronously


Affinity control

If the affinity is set explicitly for each socket thread, it is possible to have some control over the socket affinity for acceptor sessions. Two listen sockets and two reading threads are allocated. All inbound connections that end up at a particular listen socket will be served by the same thread. TCPDispatcher.IncomingConnectionOnloadStackAffinity enables this behavior, otherwise, the sockets are spread in round-robin fashion among the reading threads.

...