# GapFill & PossDupe

**URL:** <https://forum.fixtrading.org/t/gapfill-possdupe/13018>\
**Category:** General Q&A\
**Tags:** imported, 40-session, xid\_164649\
**Created:** [January 11, 2005, 7:44pm UTC](https://forum.fixtrading.org/t/gapfill-possdupe/13018 "2005-01-11T19:44:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![joshuaopper24\_x](https://avatars.discourse-cdn.com/v4/letter/j/f9ae1b/32.png) [@joshuaopper24\_x](https://forum.fixtrading.org/u/joshuaopper24_x)\
**Post date:** [January 11, 2005, 7:44pm UTC](https://forum.fixtrading.org/t/gapfill-possdupe/13018/1 "2005-01-11T19:44:18Z")

</div>

Imported from previous forum

---

<div class="post-metadata">

**Author:** ![joshuaopper24\_x](https://avatars.discourse-cdn.com/v4/letter/j/f9ae1b/32.png) [@joshuaopper24\_x](https://forum.fixtrading.org/u/joshuaopper24_x)\
**Post date:** [January 11, 2005, 7:44pm UTC](https://forum.fixtrading.org/t/gapfill-possdupe/13018/2 "2005-01-11T19:44:18Z")

</div>

If you receive a SequenceReset message with the GapFill flag set to Y and the PossDup flag set to Y should that message conform to normal message sequencing rules or is it not treated as such do to the PossDup flag?

Thanks all,

Josh

---

<div class="post-metadata">

**Author:** ![fplpo\_x](https://avatars.discourse-cdn.com/v4/letter/f/7ab992/32.png) [@fplpo\_x](https://forum.fixtrading.org/u/fplpo_x)\
**Post date:** [January 11, 2005, 8:22pm UTC](https://forum.fixtrading.org/t/gapfill-possdupe/13018/3 "2005-01-11T20:22:23Z")

</div>

[original email was from Ryan Coon - [ryanc@betasys.com](mailto:ryanc@betasys.com) ]  
\> If you receive a SequenceReset message with the GapFill flag set to Y

> and the PossDup flag set to Y should that message conform to normal  
> message sequencing rules or is it not treated as such do to the  
> PossDup flag?
> 
> Thanks all,
> 
> Josh

Reject(35=3) is the only administrative message which can be resent. So, you should never have a PossDup flag set to Y in a SequenceReset message.

---

<div class="post-metadata">

**Author:** ![fplpo\_x](https://avatars.discourse-cdn.com/v4/letter/f/7ab992/32.png) [@fplpo\_x](https://forum.fixtrading.org/u/fplpo_x)\
**Post date:** [January 11, 2005, 8:54pm UTC](https://forum.fixtrading.org/t/gapfill-possdupe/13018/4 "2005-01-11T20:54:12Z")

</div>

[original email was from Witold Sames - [wsames@yahoo.com](mailto:wsames@yahoo.com) ]  
\> \> If you receive a SequenceReset message with the GapFill flag set to Y

> > and the PossDup flag set to Y should that message conform to normal  
> > message sequencing rules or is it not treated as such do to the  
> > PossDup flag?
> > 
> > Thanks all,
> > 
> > Josh
> 
> Reject(35=3) is the only administrative message which can be  
> resent. So, you should never have a PossDup flag set to Y in a  
> SequenceReset message.

Josh, I think that in order to “skip” certain messages (including administrative messages) in a recovery scenario, you will actually have at least two cases where a Sequence Reset message would have a PossDupeFlag set to Y:

a) SeqReset-GapFill with PossDupFlag set to “Y” message replaces the retransmission of administrative and application messages  
b) SeqReset-Reset with PossDupFlag set to “Y” to forces sequence number synchronization

Depending on whether or not the GapFillFlag is set, the message may or may not be subject to “regular” sequencing rules:

1. If the GapFillFlag field is not present (or set to N), the MsgSeqNum should be ignored.
2. If the GapFillFlag field is present (and equal to Y), the MsgSeqNum is subject to your normal sequencing rules.

Hope that helps.

---

<div class="post-metadata">

**Author:** ![davidrhodes95\_x](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@davidrhodes95\_x](https://forum.fixtrading.org/u/davidrhodes95_x)\
**Post date:** [January 11, 2005, 9:04pm UTC](https://forum.fixtrading.org/t/gapfill-possdupe/13018/5 "2005-01-11T21:04:54Z")

</div>

It looks like this was clarified in FIX 4.4. From Volume 2, page 8. Point #2 shows that you are expected to set PossDupFlag=Y on a GapFill.

Upon receipt of a Resend Request, the resender can respond in one of three ways:

1. retransmit the requested messages (in order) with the original sequence numbers and PossDupFlag set to “Y” except for the administrative messages (listed below) which are not to be resent and which require a SeqReset-GapFill (#2)
2. issue a SeqReset-GapFill with PossDupFlag set to “Y” message to replace the retransmission of administrative and application messages
3. issue a SeqReset-Reset with PossDupFlag set to “Y” to force sequence number synchronization  
The normal course of action involves a combination of #1 and #2. Note that #3 should be used ONLY to recover from a disaster situation which cannot be otherwise recovered via “Gap Fill” mode

David Rhodes  
TransactTools

> > > If you receive a SequenceReset message with the GapFill flag set to  
> > > Y and the PossDup flag set to Y should that message conform to  
> > > normal message sequencing rules or is it not treated as such do to  
> > > the PossDup flag?
> > > 
> > > Thanks all,
> > > 
> > > Josh
> > 
> > Reject(35=3) is the only administrative message which can be resent.  
> > So, you should never have a PossDup flag set to Y in a SequenceReset  
> > message.
> 
> Josh, I think that in order to “skip” certain messages (including  
> administrative messages) in a recovery scenario, you will actually have  
> at least two cases where a Sequence Reset message would have a  
> PossDupeFlag set to Y:
> 
> a) SeqReset-GapFill with PossDupFlag set to “Y” message replaces the  
> retransmission of administrative and application messages  
> b) SeqReset-Reset with PossDupFlag set to “Y” to forces sequence number  
> synchronization
> 
> Depending on whether or not the GapFillFlag is set, the message may or  
> may not be subject to “regular” sequencing rules:
> 
> 1. If the GapFillFlag field is not present (or set to N), the MsgSeqNum  
> should be ignored.
> 2. If the GapFillFlag field is present (and equal to Y), the MsgSeqNum  
> is subject to your normal sequencing rules.
> 
> Hope that helps.

---

<div class="post-metadata">

**Author:** ![fplpo\_x](https://avatars.discourse-cdn.com/v4/letter/f/7ab992/32.png) [@fplpo\_x](https://forum.fixtrading.org/u/fplpo_x)\
**Post date:** [January 11, 2005, 9:46pm UTC](https://forum.fixtrading.org/t/gapfill-possdupe/13018/6 "2005-01-11T21:46:57Z")

</div>

[original email was from Ryan Coon - [ryanc@betasys.com](mailto:ryanc@betasys.com) ]  
\> \> \> If you receive a SequenceReset message with the GapFill flag set to

> > > Y and the PossDup flag set to Y should that message conform to  
> > > normal message sequencing rules or is it not treated as such do to  
> > > the PossDup flag?
> > > 
> > > Thanks all,
> > > 
> > > Josh
> > 
> > Reject(35=3) is the only administrative message which can be resent.  
> > So, you should never have a PossDup flag set to Y in a SequenceReset  
> > message.
> 
> Josh, I think that in order to “skip” certain messages (including  
> administrative messages) in a recovery scenario, you will actually have  
> at least two cases where a Sequence Reset message would have a  
> PossDupeFlag set to Y:
> 
> a) SeqReset-GapFill with PossDupFlag set to “Y” message replaces the  
> retransmission of administrative and application messages  
> b) SeqReset-Reset with PossDupFlag set to “Y” to forces sequence number  
> synchronization
> 
> Depending on whether or not the GapFillFlag is set, the message may or  
> may not be subject to “regular” sequencing rules:
> 
> 1. If the GapFillFlag field is not present (or set to N), the MsgSeqNum  
> should be ignored.
> 2. If the GapFillFlag field is present (and equal to Y), the MsgSeqNum  
> is subject to your normal sequencing rules.
> 
> Hope that helps.

Here are the inconsistencies in the FIX 4.0 manual:

“PossDupFlag - Always required for retranmitted messages”  
“The administrative messages which are not to be resent are: Logon, ResendRequest, Heartbeat, TestRequest, and SeqReset-Reset and SeqReset-GapFill”  
“2. issue a SeqReset-GapFill with PossDupFlag set to “Y” message to replace the retransmission of administrative and application messages  
3. issue a SeqReset-Reset with PossDupFlag set to “Y” to force sequence number synchronization”

So, SeqReset messages are never resent but always sent with PossDupFlag set to “Y”. (Seems odd)

Witold is correct, you will see SeqReset messages with the PossDupFlag set. To answer your original question (even though Witold already did), the PossDupFlag is required for a SeqReset message and should not invoke any special logic. It’s the GapFill flag that tells you if you should validate the sequence number or not.
