I use the Python bindings that come with Quickfix and I'd like to set the sequence number through it (see why). How can I do this?
I found the following in the SWIG bindings:
class Session(_object):
# ...
def setNextSenderMsgSeqNum(self, *args): return _quickfix.Session_setNextSenderMsgSeqNum(self, *args)
# ...
It requires two parameters: a Session object and an int sequence number.
How can I get the Session object?
Or is there another method of setting the sequence number?
Odds are you have a reference to a
SessionIDobject associated with the session (for example, by caching the session-Id given to you in theApplication.onCreatemethod when the session is created) . In this case, you can use theSession.lookupSessionmethod to look the session up from theSessionID. If you don't, you can construct aSessionIDfirst from the BeginString, SenderCompID and TargetCompID of the session you are interested in.Sorry, but I don't know Python - so I can't provide you with an example.