@Test public void shouldPublishMessagesWithoutSetPossDupFlag() { onReplay(END_SEQ_NO, inv -> { bufferContainsExampleMessage(false); final int srcLength = fragmentLength(); setupCapturingClaim(); onFragment(srcLength); assertHasResentWithPossDupFlag(claimedLength, times(1)); final int afterOffset = this.offset + 1; assertThat(resultAsciiBuffer, sequenceEqualsAscii("8=FIX.4.4\0019=86\001", afterOffset)); assertThat(resultAsciiBuffer, sequenceEqualsAscii("8=FIX.4.4\0019=86\001", afterOffset)); assertEndsWithValidChecksum(afterOffset); return true; }); }
public Action onFragment( final DirectBuffer buffer, final int start, final int length, final Header header) { messageHeader.wrap(buffer, start); final int templateId = messageHeader.templateId(); final int offset = start + MessageHeaderDecoder.ENCODED_LENGTH; final int blockLength = messageHeader.blockLength(); final int version = messageHeader.version(); switch (templateId) { case ValidResendRequestDecoder.TEMPLATE_ID: { validResendRequest.wrap( buffer, offset, blockLength, version); final long sessionId = validResendRequest.session(); final long connectionId = validResendRequest.connection(); final long beginSeqNo = validResendRequest.beginSequenceNumber(); final long endSeqNo = validResendRequest.endSequenceNumber(); final int sequenceIndex = validResendRequest.sequenceIndex(); validResendRequest.wrapBody(asciiBuffer); return onResendRequest(sessionId, connectionId, beginSeqNo, endSeqNo, sequenceIndex, asciiBuffer); } case ILinkConnectDecoder.TEMPLATE_ID: { iLinkConnect.wrap( buffer, offset, blockLength, version); iLinkConnectionIds.add(iLinkConnect.connection()); return CONTINUE; } case RequestDisconnectDecoder.TEMPLATE_ID: { requestDisconnect.wrap( buffer, offset, blockLength, version); final long connectionId = requestDisconnect.connection(); onDisconnect(connectionId); return CONTINUE; } case DisconnectDecoder.TEMPLATE_ID: { disconnect.wrap( buffer, offset, blockLength, version); final long connectionId = disconnect.connection(); onDisconnect(connectionId); return CONTINUE; } default: { return fixSessionCodecsFactory.onFragment(buffer, start, length, header); } } }
Replayer implements Agent, ControlledFragmentHandler { public Action onFragment( final DirectBuffer buffer, final int start, final int length, final Header header) { messageHeader.wrap(buffer, start); final int templateId = messageHeader.templateId(); final int offset = start + MessageHeaderDecoder.ENCODED_LENGTH; final int blockLength = messageHeader.blockLength(); final int version = messageHeader.version(); switch (templateId) { case ValidResendRequestDecoder.TEMPLATE_ID: { validResendRequest.wrap( buffer, offset, blockLength, version); final long sessionId = validResendRequest.session(); final long connectionId = validResendRequest.connection(); final long beginSeqNo = validResendRequest.beginSequenceNumber(); final long endSeqNo = validResendRequest.endSequenceNumber(); final int sequenceIndex = validResendRequest.sequenceIndex(); validResendRequest.wrapBody(asciiBuffer); return onResendRequest(sessionId, connectionId, beginSeqNo, endSeqNo, sequenceIndex, asciiBuffer); } case ILinkConnectDecoder.TEMPLATE_ID: { iLinkConnect.wrap( buffer, offset, blockLength, version); iLinkConnectionIds.add(iLinkConnect.connection()); return CONTINUE; } case RequestDisconnectDecoder.TEMPLATE_ID: { requestDisconnect.wrap( buffer, offset, blockLength, version); final long connectionId = requestDisconnect.connection(); onDisconnect(connectionId); return CONTINUE; } case DisconnectDecoder.TEMPLATE_ID: { disconnect.wrap( buffer, offset, blockLength, version); final long connectionId = disconnect.connection(); onDisconnect(connectionId); return CONTINUE; } default: { return fixSessionCodecsFactory.onFragment(buffer, start, length, header); } } } }
Replayer implements Agent, ControlledFragmentHandler { public Action onFragment( final DirectBuffer buffer, final int start, final int length, final Header header) { messageHeader.wrap(buffer, start); final int templateId = messageHeader.templateId(); final int offset = start + MessageHeaderDecoder.ENCODED_LENGTH; final int blockLength = messageHeader.blockLength(); final int version = messageHeader.version(); switch (templateId) { case ValidResendRequestDecoder.TEMPLATE_ID: { validResendRequest.wrap( buffer, offset, blockLength, version); final long sessionId = validResendRequest.session(); final long connectionId = validResendRequest.connection(); final long beginSeqNo = validResendRequest.beginSequenceNumber(); final long endSeqNo = validResendRequest.endSequenceNumber(); final int sequenceIndex = validResendRequest.sequenceIndex(); validResendRequest.wrapBody(asciiBuffer); return onResendRequest(sessionId, connectionId, beginSeqNo, endSeqNo, sequenceIndex, asciiBuffer); } case ILinkConnectDecoder.TEMPLATE_ID: { iLinkConnect.wrap( buffer, offset, blockLength, version); iLinkConnectionIds.add(iLinkConnect.connection()); return CONTINUE; } case RequestDisconnectDecoder.TEMPLATE_ID: { requestDisconnect.wrap( buffer, offset, blockLength, version); final long connectionId = requestDisconnect.connection(); onDisconnect(connectionId); return CONTINUE; } case DisconnectDecoder.TEMPLATE_ID: { disconnect.wrap( buffer, offset, blockLength, version); final long connectionId = disconnect.connection(); onDisconnect(connectionId); return CONTINUE; } default: { return fixSessionCodecsFactory.onFragment(buffer, start, length, header); } } } Replayer(
        final ReplayQuery outboundReplayQuery,
        final ExclusivePublication publication,
        final BufferClaim bufferClaim,
        final IdleStrategy idleStrategy,
        final ErrorHandler errorHandler,
        final int maxClaimAttempts,
        final Subscription inboundSubscription,
        final String agentNamePrefix,
        final EpochClock clock,
        final Set<String> gapfillOnReplayMessageTypes,
        final IntHashSet gapfillOnRetransmitILinkTemplateIds,
        final ReplayHandler replayHandler,
        final ILink3RetransmitHandler iLink3RetransmitHandler,
        final SenderSequenceNumbers senderSequenceNumbers,
        final FixSessionCodecsFactory fixSessionCodecsFactory,
        final int maxBytesInBuffer,
        final ReplayerCommandQueue replayerCommandQueue,
        final EpochFractionFormat epochFractionFormat,
        final AtomicCounter currentReplayCount,
        final int maxConcurrentSessionReplays); }
Replayer implements Agent, ControlledFragmentHandler { public Action onFragment( final DirectBuffer buffer, final int start, final int length, final Header header) { messageHeader.wrap(buffer, start); final int templateId = messageHeader.templateId(); final int offset = start + MessageHeaderDecoder.ENCODED_LENGTH; final int blockLength = messageHeader.blockLength(); final int version = messageHeader.version(); switch (templateId) { case ValidResendRequestDecoder.TEMPLATE_ID: { validResendRequest.wrap( buffer, offset, blockLength, version); final long sessionId = validResendRequest.session(); final long connectionId = validResendRequest.connection(); final long beginSeqNo = validResendRequest.beginSequenceNumber(); final long endSeqNo = validResendRequest.endSequenceNumber(); final int sequenceIndex = validResendRequest.sequenceIndex(); validResendRequest.wrapBody(asciiBuffer); return onResendRequest(sessionId, connectionId, beginSeqNo, endSeqNo, sequenceIndex, asciiBuffer); } case ILinkConnectDecoder.TEMPLATE_ID: { iLinkConnect.wrap( buffer, offset, blockLength, version); iLinkConnectionIds.add(iLinkConnect.connection()); return CONTINUE; } case RequestDisconnectDecoder.TEMPLATE_ID: { requestDisconnect.wrap( buffer, offset, blockLength, version); final long connectionId = requestDisconnect.connection(); onDisconnect(connectionId); return CONTINUE; } case DisconnectDecoder.TEMPLATE_ID: { disconnect.wrap( buffer, offset, blockLength, version); final long connectionId = disconnect.connection(); onDisconnect(connectionId); return CONTINUE; } default: { return fixSessionCodecsFactory.onFragment(buffer, start, length, header); } } } Replayer(
        final ReplayQuery outboundReplayQuery,
        final ExclusivePublication publication,
        final BufferClaim bufferClaim,
        final IdleStrategy idleStrategy,
        final ErrorHandler errorHandler,
        final int maxClaimAttempts,
        final Subscription inboundSubscription,
        final String agentNamePrefix,
        final EpochClock clock,
        final Set<String> gapfillOnReplayMessageTypes,
        final IntHashSet gapfillOnRetransmitILinkTemplateIds,
        final ReplayHandler replayHandler,
        final ILink3RetransmitHandler iLink3RetransmitHandler,
        final SenderSequenceNumbers senderSequenceNumbers,
        final FixSessionCodecsFactory fixSessionCodecsFactory,
        final int maxBytesInBuffer,
        final ReplayerCommandQueue replayerCommandQueue,
        final EpochFractionFormat epochFractionFormat,
        final AtomicCounter currentReplayCount,
        final int maxConcurrentSessionReplays); Action onFragment(
        final DirectBuffer buffer, final int start, final int length, final Header header); int doWork(); void onClose(); String roleName(); }
Replayer implements Agent, ControlledFragmentHandler { public Action onFragment( final DirectBuffer buffer, final int start, final int length, final Header header) { messageHeader.wrap(buffer, start); final int templateId = messageHeader.templateId(); final int offset = start + MessageHeaderDecoder.ENCODED_LENGTH; final int blockLength = messageHeader.blockLength(); final int version = messageHeader.version(); switch (templateId) { case ValidResendRequestDecoder.TEMPLATE_ID: { validResendRequest.wrap( buffer, offset, blockLength, version); final long sessionId = validResendRequest.session(); final long connectionId = validResendRequest.connection(); final long beginSeqNo = validResendRequest.beginSequenceNumber(); final long endSeqNo = validResendRequest.endSequenceNumber(); final int sequenceIndex = validResendRequest.sequenceIndex(); validResendRequest.wrapBody(asciiBuffer); return onResendRequest(sessionId, connectionId, beginSeqNo, endSeqNo, sequenceIndex, asciiBuffer); } case ILinkConnectDecoder.TEMPLATE_ID: { iLinkConnect.wrap( buffer, offset, blockLength, version); iLinkConnectionIds.add(iLinkConnect.connection()); return CONTINUE; } case RequestDisconnectDecoder.TEMPLATE_ID: { requestDisconnect.wrap( buffer, offset, blockLength, version); final long connectionId = requestDisconnect.connection(); onDisconnect(connectionId); return CONTINUE; } case DisconnectDecoder.TEMPLATE_ID: { disconnect.wrap( buffer, offset, blockLength, version); final long connectionId = disconnect.connection(); onDisconnect(connectionId); return CONTINUE; } default: { return fixSessionCodecsFactory.onFragment(buffer, start, length, header); } } } Replayer(
        final ReplayQuery outboundReplayQuery,
        final ExclusivePublication publication,
        final BufferClaim bufferClaim,
        final IdleStrategy idleStrategy,
        final ErrorHandler errorHandler,
        final int maxClaimAttempts,
        final Subscription inboundSubscription,
        final String agentNamePrefix,
        final EpochClock clock,
        final Set<String> gapfillOnReplayMessageTypes,
        final IntHashSet gapfillOnRetransmitILinkTemplateIds,
        final ReplayHandler replayHandler,
        final ILink3RetransmitHandler iLink3RetransmitHandler,
        final SenderSequenceNumbers senderSequenceNumbers,
        final FixSessionCodecsFactory fixSessionCodecsFactory,
        final int maxBytesInBuffer,
        final ReplayerCommandQueue replayerCommandQueue,
        final EpochFractionFormat epochFractionFormat,
        final AtomicCounter currentReplayCount,
        final int maxConcurrentSessionReplays); Action onFragment(
        final DirectBuffer buffer, final int start, final int length, final Header header); int doWork(); void onClose(); String roleName(); static final int MOST_RECENT_MESSAGE; }