protected void jointMessageHandler ( DirectBuffer buffer , int offset , int length , Header header ) { byte [ ] data = new byte [ length ] ; buffer . getBytes ( offset , data ) ; // deserialize message val message = VoidMessage . fromBytes ( data ) ; // we're checking if this is known connection or not, and add it if not if ( ! remoteConnections . containsKey ( message . getOriginatorId ( ) ) ) addConnection ( message . getOriginatorId ( ) ) ; log . debug ( "Got [{}] message from [{}]" , message . getClass ( ) . getSimpleName ( ) , message . getOriginatorId ( ) ) ; // we're just putting deserialized message into the buffer try { messageQueue . put ( message ) ; } catch ( InterruptedException e ) { // :( throw new RuntimeException ( e ) ; } }
This method converts aeron buffer into VoidMessage and puts into temp queue for further processing