# Resnd request to get Trades for a day

**URL:** <https://forum.fixtrading.org/t/resnd-request-to-get-trades-for-a-day/13000>\
**Category:** General Q&A\
**Tags:** imported, 40-session, xid\_164631\
**Created:** [December 8, 2007, 12:32am UTC](https://forum.fixtrading.org/t/resnd-request-to-get-trades-for-a-day/13000 "2007-12-08T00:32:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bharathkumar\_x](https://avatars.discourse-cdn.com/v4/letter/b/cc9497/32.png) [@bharathkumar\_x](https://forum.fixtrading.org/u/bharathkumar_x)\
**Post date:** [December 8, 2007, 12:32am UTC](https://forum.fixtrading.org/t/resnd-request-to-get-trades-for-a-day/13000/1 "2007-12-08T00:32:18Z")

</div>

Imported from previous forum

---

<div class="post-metadata">

**Author:** ![bharathkumar\_x](https://avatars.discourse-cdn.com/v4/letter/b/cc9497/32.png) [@bharathkumar\_x](https://forum.fixtrading.org/u/bharathkumar_x)\
**Post date:** [December 8, 2007, 12:32am UTC](https://forum.fixtrading.org/t/resnd-request-to-get-trades-for-a-day/13000/2 "2007-12-08T00:32:18Z")

</div>

Hi All,  
I am using QuickFix/J version (quickfixj-1.3.0) to implement the initiator on our side.  
We are getting the messages from the acceptor which is maintained/provided by a clearing house.

We are using FIX version 4.2

The quickfix client implemented is launched in a separate JVM.If our application server crashes  
or the network is down we will miss out on some of the messages sent during the day.

One of the ways to recover these messages is to get the send a resend request and get all the messages  
for the day.I am trying to implement the Resend request.And here is where I am stuck/ not gettign all the messages for the day.

Here is the logic:

1. Applicaiton Server crashes.Restart the server and also restart the fix client.As soon as the  
fix client logs in I am sending a RESEND request.Here is the code snippet.

When I run the fix client it sends a RESEND request to the acceptor.The log file shows the request as  
8=FIX.4.29=5135=249=XXXX52=20071208-00:00:0156=YYYY7=216=010=255

I expected to get all the messages for the day, but it just sends me a messages starting from  
currentMsgSeq -1 and carries on to the end.

I am definitely missing something.

Can you guys please help me to resolve this ?

1. It would be great if sombody sends an example code snippet to get all  
the messages for the current trading day.  
Also let me know if I have to set any of the properties like  
ResetOnLogout , ResetOnDisconnect to Y.If I set them to Y will I miss out any trades?

Appreciate your help.

Thanks  
Bharath

---

<div class="post-metadata">

**Author:** ![evaschmidt\_x](https://avatars.discourse-cdn.com/v4/letter/e/c68b51/32.png) [@evaschmidt\_x](https://forum.fixtrading.org/u/evaschmidt_x)\
**Post date:** [December 11, 2007, 2:16pm UTC](https://forum.fixtrading.org/t/resnd-request-to-get-trades-for-a-day/13000/3 "2007-12-11T14:16:05Z")

</div>

Hi Barath,

I’m not using QuickFix, but I’m working with FIX 4.2 for one year now, implementing my own FIX engine that is in some kind similar to QuickFIX. Maybe I can give you some hints…

> 1. Applicaiton Server crashes.Restart the server and also restart the  
> fix client.As soon as the fix client logs in I am sending a RESEND  
> request.Here is the code snippet.

> When I run the fix client it sends a RESEND request to the acceptor.The  
> log file shows the request as 8=FIX.4.29=5135=249=XXXX52=20071208-  
> 00:00:0156=YYYY7=216=010=255

The message looks quite good. It should provoke a resending beginning on sequence number 2. Did you try it out with different acceptors? Maybe the other side is not able to resend correctly…  
There is a free FIX environment called OpenFIX ([http://www.openfix.net/](http://www.openfix.net/)) were you can see also the Logfile of the acceptor. Maybe this helps on testing.

> Also let me know if I have  
> to set any of the properties like ResetOnLogout , ResetOnDisconnect  
> to Y.If I set them to Y will I miss out any trades?

As far as I understand QuickFIX, the ResetOnDisconnect or ResetOnLogout would only reset the sequence numbers. But this is actually NOT what you want, because  
1.) Probably your own sequence numbers will also be reset. This would lead to a ResendRequest from your counterparty…  
2.) Probably they will set the ResetSeqNum Flag in the Logon Message which initiates a reset of sequence numbers on the other side. Some engines doesn’t allow this. Other ones allow it - but in this case, all messages sent earlier are “discarded”! So: If you reset the counterparties sequence numbers you won’t ever have a chance to receive the messages missed before!

The ResendRequest Message is your own chance to get message duplicates!

Hope that helps alittle bit … 🙂

Regards,  
Eva

---

<div class="post-metadata">

**Author:** ![bharathkumar\_x](https://avatars.discourse-cdn.com/v4/letter/b/cc9497/32.png) [@bharathkumar\_x](https://forum.fixtrading.org/u/bharathkumar_x)\
**Post date:** [December 13, 2007, 12:07am UTC](https://forum.fixtrading.org/t/resnd-request-to-get-trades-for-a-day/13000/4 "2007-12-13T00:07:39Z")

</div>

> Hi Barath,
> 
> I’m not using QuickFix, but I’m working with FIX 4.2 for one year now,  
> implementing my own FIX engine that is in some kind similar to QuickFIX.  
> Maybe I can give you some hints…
> 
> > 1. Applicaiton Server crashes.Restart the server and also restart the  
> > fix client.As soon as the fix client logs in I am sending a RESEND  
> > request.Here is the code snippet.
> 
> > When I run the fix client it sends a RESEND request to the  
> > acceptor.The log file shows the request as 8=FIX.4.29=5135=249=XXXX52=20071208-  
> > 00:00:0156=YYYY7=216=010=255
> 
> The message looks quite good. It should provoke a resending beginning on  
> sequence number 2. Did you try it out with different acceptors? Maybe  
> the other side is not able to resend correctly… There is a free FIX  
> environment called OpenFIX ([http://www.openfix.net/](http://www.openfix.net/)) were you can see  
> also the Logfile of the acceptor. Maybe this helps on testing.
> 
> > Also let me know if I have to set any of the properties like  
> > ResetOnLogout , ResetOnDisconnect to Y.If I set them to Y will I  
> > miss out any trades?
> 
> As far as I understand QuickFIX, the ResetOnDisconnect or ResetOnLogout  
> would only reset the sequence numbers. But this is actually NOT what you  
> want, because  
> 1.) Probably your own sequence numbers will also be reset. This would  
> lead to a ResendRequest from your counterparty…  
> 2.) Probably they will set the ResetSeqNum Flag in the Logon Message  
> which initiates a reset of sequence numbers on the other side. Some  
> engines doesn’t allow this. Other ones allow it - but in this case,  
> all messages sent earlier are “discarded”! So: If you reset the  
> counterparties sequence numbers you won’t ever have a chance to  
> receive the messages missed before!
> 
> The ResendRequest Message is your own chance to get message duplicates!
> 
> Hope that helps alittle bit … 🙂
> 
> Regards, Eva

Thanks Eva.

Acually, I figured out a way to to get the resend working.we have to reset the seqeuence number for the session to the required number inorder to get the resend messages.  
That is how Quickfix works.🙂
