You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support unsigned 64-bit integers for sequence numbers #621
fields with data type SeqNum need to be changed (this will probably only work with a custom build, just like with BigDecimal for decimal fields, but need to investigate)
we should make sure that there are no endless resends or OOM conditions so we should also add a configuration which can restrict resends to n messages (this will also be helpful today already)
FIX 4.3 added a “datatype” of SeqNum
FIX 4.4 uses a “datatype” of SeqNum for the following fields:
7, 16, 34, 36, 45, 369, 630, 789
FIX 5.0 SP2 EP276 uses a “datatype” of SeqNum for the following fields:
1182, 1183, 1350, 1399, 1181, 7, 16, 630, 369, 34,36, 789, 1357, 45
So the full solution is to change the SeqNum datatype to uint64
In Java SE 8 and later, you can use the long data type to represent an unsigned 64-bit long, which has a minimum value of 0 and a maximum value of 2^64-1. Use this data type when you need a range of values wider than those provided by int. The Long class also contains methods like compareUnsigned, divideUnsigned etc to support arithmetic operations for unsigned long.
In general I think changing the data type should not affect most users because the seqnum fields shouldn't be processed by user applications anyway. Maybe for logging or monitoring?!
Another thing to take care of: getting messages from the store for resends is usually done through some kind of list with max capacity of Integer.MAX_VALUE. But getting such large lists should probably be forbidden anyway to guard against OOME.
Activity
chrjohn commentedon Mar 13, 2023
Note to self:
SeqNumneed to be changed (this will probably only work with a custom build, just like withBigDecimalfor decimal fields, but need to investigate)nmessages (this will also be helpful today already)JohnGreenan commentedon Mar 13, 2023
FIX 4.3 added a “datatype” of SeqNum
FIX 4.4 uses a “datatype” of SeqNum for the following fields:
7, 16, 34, 36, 45, 369, 630, 789
FIX 5.0 SP2 EP276 uses a “datatype” of SeqNum for the following fields:
1182, 1183, 1350, 1399, 1181, 7, 16, 630, 369, 34,36, 789, 1357, 45
So the full solution is to change the SeqNum datatype to uint64
chrjohn commentedon Mar 13, 2023
Thanks @JohnGreenan
JohnGreenan commentedon Mar 14, 2023
See also
da4089/simplefix#50
#621
quickfix/quickfix#419
ferrumfix/ferrumfix#108
connamara/quickfixn#760
paritytrading/philadelphia#365
jcass77/WTFIX#8
artiofix/artio#480
chrjohn commentedon Mar 16, 2023
(at least) one more thing: database setup scripts need to change (and to check which data types need to be chosen). E.g. Postgres script only has
INTEGERnow. Probably need to useNUMERIC.See https://www.postgresql.org/docs/current/datatype-numeric.html
One more other thing: as written here https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html the
Longdatatype can be used to represent an unsigned integer:chrjohn commentedon Mar 16, 2023
Fields.xslneeds to change to not useint.In general I think changing the data type should not affect most users because the seqnum fields shouldn't be processed by user applications anyway. Maybe for logging or monitoring?!
chrjohn commentedon Apr 13, 2023
Another thing to take care of: getting messages from the store for resends is usually done through some kind of list with max capacity of Integer.MAX_VALUE. But getting such large lists should probably be forbidden anyway to guard against OOME.
philipwhiuk commentedon Jun 1, 2023
I'd have saved myself some bother had I fixed the aside you pointed out above! As it is the above issue covers the resend problems.
JohnGreenan commentedon Jul 11, 2023
Now adopted https://www.fixtrading.org/packages/fix-recommended-practices-24x7-sessions/