jspurefix 5.8.4 → 5.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/.gitattributes +4 -0
  2. package/BACKPORT_PLAN.md +71 -0
  3. package/DEMO_PORT_PLAN.md +10 -0
  4. package/README.md +3 -0
  5. package/dist/config/js-fix-config.d.ts +4 -0
  6. package/dist/config/js-fix-config.js.map +1 -1
  7. package/dist/runtime/session-launcher.js +1 -1
  8. package/dist/runtime/session-launcher.js.map +1 -1
  9. package/dist/runtime/session-scope.d.ts +3 -0
  10. package/dist/runtime/session-scope.js +47 -0
  11. package/dist/runtime/session-scope.js.map +1 -0
  12. package/dist/sample/http/oms/app.js +3 -3
  13. package/dist/sample/http/oms/app.js.map +1 -1
  14. package/dist/sample/tcp/qf-md/app.js +3 -3
  15. package/dist/sample/tcp/qf-md/app.js.map +1 -1
  16. package/dist/sample/tcp/skeleton/app.js +1 -1
  17. package/dist/sample/tcp/skeleton/app.js.map +1 -1
  18. package/dist/sample/tcp/trade-capture/app-launcher.js +3 -3
  19. package/dist/sample/tcp/trade-capture/app-launcher.js.map +1 -1
  20. package/dist/transport/ascii/ascii-session.d.ts +17 -3
  21. package/dist/transport/ascii/ascii-session.js +121 -8
  22. package/dist/transport/ascii/ascii-session.js.map +1 -1
  23. package/dist/transport/duplex/fix-duplex.d.ts +1 -0
  24. package/dist/transport/duplex/fix-duplex.js +3 -0
  25. package/dist/transport/duplex/fix-duplex.js.map +1 -1
  26. package/dist/transport/duplex/tcp-duplex.d.ts +1 -0
  27. package/dist/transport/duplex/tcp-duplex.js +5 -0
  28. package/dist/transport/duplex/tcp-duplex.js.map +1 -1
  29. package/dist/transport/factory/msg-transport.d.ts +2 -0
  30. package/dist/transport/factory/msg-transport.js +17 -2
  31. package/dist/transport/factory/msg-transport.js.map +1 -1
  32. package/dist/transport/session/a-session-msg-factory.d.ts +1 -0
  33. package/dist/transport/session/a-session-msg-factory.js +4 -0
  34. package/dist/transport/session/a-session-msg-factory.js.map +1 -1
  35. package/dist/transport/session/clone-session-description.d.ts +6 -0
  36. package/dist/transport/session/clone-session-description.js +11 -0
  37. package/dist/transport/session/clone-session-description.js.map +1 -0
  38. package/dist/transport/session/fix-session.d.ts +5 -1
  39. package/dist/transport/session/fix-session.js +105 -28
  40. package/dist/transport/session/fix-session.js.map +1 -1
  41. package/dist/transport/session/index.d.ts +2 -0
  42. package/dist/transport/session/index.js +2 -0
  43. package/dist/transport/session/index.js.map +1 -1
  44. package/dist/transport/session/session-msg-factory.d.ts +1 -0
  45. package/dist/transport/session/session-msg-factory.js.map +1 -1
  46. package/dist/transport/session/session-registry.d.ts +23 -0
  47. package/dist/transport/session/session-registry.js +59 -0
  48. package/dist/transport/session/session-registry.js.map +1 -0
  49. package/dist/transport/tcp/tcp-acceptor-listener.d.ts +3 -0
  50. package/dist/transport/tcp/tcp-acceptor-listener.js +26 -4
  51. package/dist/transport/tcp/tcp-acceptor-listener.js.map +1 -1
  52. package/dist/transport/tcp/tcp-acceptor.d.ts +5 -0
  53. package/dist/transport/tcp/tcp-acceptor.js +74 -20
  54. package/dist/transport/tcp/tcp-acceptor.js.map +1 -1
  55. package/dist/transport/tcp/tcp-initiator.js +15 -5
  56. package/dist/transport/tcp/tcp-initiator.js.map +1 -1
  57. package/dist/transport/tcp/tcp-transport-description.d.ts +1 -0
  58. package/dist/transport/tcp/tcp-transport-description.js.map +1 -1
  59. package/dist/transport/tcp/tls-diagnostics.d.ts +5 -0
  60. package/dist/transport/tcp/tls-diagnostics.js +64 -0
  61. package/dist/transport/tcp/tls-diagnostics.js.map +1 -0
  62. package/dist/transport/tcp/tls-options-factory.d.ts +1 -0
  63. package/dist/transport/tcp/tls-options-factory.js +24 -2
  64. package/dist/transport/tcp/tls-options-factory.js.map +1 -1
  65. package/docs/acceptor.md +207 -0
  66. package/jsfix.test_client.txt +62 -75
  67. package/jsfix.test_server.txt +72 -72
  68. package/package.json +11 -10
  69. package/script/pack-local.js +68 -0
  70. package/src/config/js-fix-config.ts +8 -0
  71. package/src/runtime/session-launcher.ts +5 -1
  72. package/src/runtime/session-scope.ts +84 -0
  73. package/src/sample/http/oms/app.ts +3 -3
  74. package/src/sample/tcp/qf-md/app.ts +3 -3
  75. package/src/sample/tcp/skeleton/app.ts +1 -1
  76. package/src/sample/tcp/trade-capture/app-launcher.ts +3 -3
  77. package/src/transport/ascii/ascii-session.ts +186 -11
  78. package/src/transport/duplex/fix-duplex.ts +9 -0
  79. package/src/transport/duplex/tcp-duplex.ts +10 -0
  80. package/src/transport/factory/msg-transport.ts +20 -0
  81. package/src/transport/session/a-session-msg-factory.ts +18 -0
  82. package/src/transport/session/clone-session-description.ts +41 -0
  83. package/src/transport/session/fix-session.ts +153 -30
  84. package/src/transport/session/index.ts +2 -0
  85. package/src/transport/session/session-msg-factory.ts +13 -0
  86. package/src/transport/session/session-registry.ts +112 -0
  87. package/src/transport/tcp/tcp-acceptor-listener.ts +43 -5
  88. package/src/transport/tcp/tcp-acceptor.ts +92 -18
  89. package/src/transport/tcp/tcp-initiator.ts +26 -5
  90. package/src/transport/tcp/tcp-transport-description.ts +7 -0
  91. package/src/transport/tcp/tls-diagnostics.ts +76 -0
  92. package/src/transport/tcp/tls-options-factory.ts +34 -2
@@ -1,75 +1,75 @@
1
- 8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260627-11:27:29.697|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=116|
2
- 8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260627-11:27:29.702|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=151|
3
- 8=FIX.4.4|9=0000079|35=2|49=init-comp|56=accept-comp|34=2|57=fix|52=20260627-11:27:29.702|7=1|16=1|10=238|
4
- 8=FIX.4.4|9=0000112|35=4|49=accept-comp|56=init-comp|34=1|57=fix|43=Y|52=20260627-11:27:29.707|122=20260627-11:27:29.707|123=Y|36=2|10=117|
5
- 8=FIX.4.4|9=0000075|35=5|49=init-comp|56=accept-comp|34=3|57=fix|52=20260627-11:27:31.705|58=5|10=211|
6
- 8=FIX.4.4|9=0000075|35=5|49=accept-comp|56=init-comp|34=2|57=fix|52=20260627-11:27:31.707|58=5|10=212|
7
- 8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260627-11:27:34.546|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=105|
8
- 8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260627-11:27:34.548|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=155|
9
- 8=FIX.4.4|9=0000079|35=2|49=init-comp|56=accept-comp|34=2|57=fix|52=20260627-11:27:34.549|7=1|16=0|10=242|
10
- 8=FIX.4.4|9=0000112|35=4|49=accept-comp|56=init-comp|34=1|57=fix|43=Y|52=20260627-11:27:34.551|122=20260627-11:27:34.551|123=Y|36=2|10=103|
11
- 8=FIX.4.4|9=0000075|35=5|49=init-comp|56=accept-comp|34=3|57=fix|52=20260627-11:27:36.550|58=5|10=214|
12
- 8=FIX.4.4|9=0000075|35=5|49=accept-comp|56=init-comp|34=2|57=fix|52=20260627-11:27:36.551|58=5|10=214|
13
- 8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260627-11:27:39.042|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=101|
14
- 8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260627-11:27:39.044|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=151|
15
- 8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=2|57=fix|52=20260627-11:27:39.044|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=104|
16
- 8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260627-11:27:39.579|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=116|
17
- 8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260627-11:27:39.580|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=156|
18
- 8=FIX.4.4|9=0000075|35=5|49=init-comp|56=accept-comp|34=2|57=fix|52=20260627-11:27:40.582|58=5|10=213|
19
- 8=FIX.4.4|9=0000075|35=5|49=accept-comp|56=init-comp|34=2|57=fix|52=20260627-11:27:40.583|58=5|10=214|
20
- 8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260627-11:27:43.284|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=104|
21
- 8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260627-11:27:43.285|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=153|
22
- 8=FIX.4.4|9=0000075|35=5|49=init-comp|56=accept-comp|34=2|57=fix|52=20260627-11:27:44.287|58=5|10=219|
23
- 8=FIX.4.4|9=0000075|35=5|49=accept-comp|56=init-comp|34=2|57=fix|52=20260627-11:27:44.288|58=5|10=220|
24
- 8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260627-11:27:47.058|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=107|
25
- 8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260627-11:27:47.059|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=156|
26
- 8=FIX.4.4|9=0000075|35=5|49=init-comp|56=accept-comp|34=0|57=fix|52=20260627-11:27:48.061|58=5|10=211|
27
- 8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260627-11:27:50.563|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=102|
28
- 8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=5|57=fix|52=20260627-11:27:50.564|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=155|
29
- 8=FIX.4.4|9=0000075|35=5|49=init-comp|56=accept-comp|34=2|57=fix|52=20260627-11:27:51.565|58=5|10=216|
30
- 8=FIX.4.4|9=0000075|35=5|49=accept-comp|56=init-comp|34=2|57=fix|52=20260627-11:27:51.566|58=5|10=217|
31
- 8=FIX.4.4|9=0000110|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260627-11:27:54.044|98=0|141=Y|553=js-client|554=pwd-client|10=168|
32
- 8=FIX.4.4|9=0000125|35=3|49=accept-comp|56=init-comp|34=1|57=fix|52=20260627-11:27:54.045|45=1|372=A|373=1|58=msgType A missing required tag 108|10=002|
33
- 8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260627-11:27:58.638|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=113|
34
- 8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260627-11:27:58.640|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=154|
1
+ 8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260801-14:51:15.489|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=104|
2
+ 8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260801-14:51:15.494|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=148|
3
+ 8=FIX.4.4|9=0000079|35=2|49=init-comp|56=accept-comp|34=2|57=fix|52=20260801-14:51:15.495|7=1|16=1|10=236|
4
+ 8=FIX.4.4|9=0000112|35=4|49=accept-comp|56=init-comp|34=1|57=fix|43=Y|52=20260801-14:51:15.500|122=20260801-14:51:15.500|123=Y|36=2|10=077|
5
+ 8=FIX.4.4|9=0000075|35=5|49=init-comp|56=accept-comp|34=3|57=fix|52=20260801-14:51:17.498|58=5|10=218|
6
+ 8=FIX.4.4|9=0000075|35=5|49=accept-comp|56=init-comp|34=2|57=fix|52=20260801-14:51:17.499|58=5|10=218|
7
+ 8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260801-14:51:20.313|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=086|
8
+ 8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260801-14:51:20.315|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=136|
9
+ 8=FIX.4.4|9=0000079|35=2|49=init-comp|56=accept-comp|34=2|57=fix|52=20260801-14:51:20.315|7=1|16=0|10=222|
10
+ 8=FIX.4.4|9=0000112|35=4|49=accept-comp|56=init-comp|34=1|57=fix|43=Y|52=20260801-14:51:20.318|122=20260801-14:51:20.318|123=Y|36=2|10=083|
11
+ 8=FIX.4.4|9=0000075|35=5|49=init-comp|56=accept-comp|34=3|57=fix|52=20260801-14:51:22.316|58=5|10=203|
12
+ 8=FIX.4.4|9=0000075|35=5|49=accept-comp|56=init-comp|34=2|57=fix|52=20260801-14:51:22.318|58=5|10=204|
13
+ 8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260801-14:51:24.804|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=095|
14
+ 8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260801-14:51:24.806|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=145|
15
+ 8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=2|57=fix|52=20260801-14:51:24.806|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=098|
16
+ 8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260801-14:51:25.344|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=095|
17
+ 8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260801-14:51:25.345|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=144|
18
+ 8=FIX.4.4|9=0000075|35=5|49=init-comp|56=accept-comp|34=2|57=fix|52=20260801-14:51:26.346|58=5|10=209|
19
+ 8=FIX.4.4|9=0000075|35=5|49=accept-comp|56=init-comp|34=2|57=fix|52=20260801-14:51:26.347|58=5|10=210|
20
+ 8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260801-14:51:29.063|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=097|
21
+ 8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260801-14:51:29.065|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=147|
22
+ 8=FIX.4.4|9=0000075|35=5|49=init-comp|56=accept-comp|34=2|57=fix|52=20260801-14:51:30.067|58=5|10=204|
23
+ 8=FIX.4.4|9=0000075|35=5|49=accept-comp|56=init-comp|34=2|57=fix|52=20260801-14:51:30.068|58=5|10=205|
24
+ 8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260801-14:51:32.552|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=094|
25
+ 8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260801-14:51:32.553|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=143|
26
+ 8=FIX.4.4|9=0000075|35=5|49=init-comp|56=accept-comp|34=0|57=fix|52=20260801-14:51:33.554|58=5|10=206|
27
+ 8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260801-14:51:36.035|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=094|
28
+ 8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=5|57=fix|52=20260801-14:51:36.036|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=147|
29
+ 8=FIX.4.4|9=0000075|35=5|49=init-comp|56=accept-comp|34=2|57=fix|52=20260801-14:51:37.038|58=5|10=209|
30
+ 8=FIX.4.4|9=0000075|35=5|49=accept-comp|56=init-comp|34=2|57=fix|52=20260801-14:51:37.039|58=5|10=210|
31
+ 8=FIX.4.4|9=0000110|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260801-14:51:39.686|98=0|141=Y|553=js-client|554=pwd-client|10=177|
32
+ 8=FIX.4.4|9=0000125|35=3|49=accept-comp|56=init-comp|34=1|57=fix|52=20260801-14:51:39.687|45=1|372=A|373=1|58=msgType A missing required tag 108|10=011|
33
+ 8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260801-14:51:44.447|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=100|
34
+ 8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260801-14:51:44.449|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=150|
35
35
  8=FIX4.4|9=0000136|35=ZZ|49=init-comp|56=accept-comp|34=2|57=fix|52=20180902-12:25:28.980|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=177|
36
- 8=FIX.4.4|9=0000111|35=3|49=accept-comp|56=init-comp|34=2|57=fix|52=20260627-11:27:58.641|45=2|372=ZZ|373=11|58=msgType ZZ unknown|10=156|
37
- 8=FIX.4.4|9=0000075|35=5|49=init-comp|56=accept-comp|34=3|57=fix|52=20260627-11:28:00.642|58=5|10=208|
38
- 8=FIX.4.4|9=0000075|35=5|49=accept-comp|56=init-comp|34=3|57=fix|52=20260627-11:28:00.643|58=5|10=209|
39
- 8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260627-11:28:03.398|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=107|
40
- 8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260627-11:28:03.400|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=139|
36
+ 8=FIX.4.4|9=0000111|35=3|49=accept-comp|56=init-comp|34=2|57=fix|52=20260801-14:51:44.451|45=2|372=ZZ|373=11|58=msgType ZZ unknown|10=144|
37
+ 8=FIX.4.4|9=0000075|35=5|49=init-comp|56=accept-comp|34=3|57=fix|52=20260801-14:51:46.450|58=5|10=208|
38
+ 8=FIX.4.4|9=0000075|35=5|49=accept-comp|56=init-comp|34=3|57=fix|52=20260801-14:51:46.451|58=5|10=209|
39
+ 8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260801-14:51:48.955|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=108|
40
+ 8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260801-14:51:48.956|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=157|
41
41
  8=FIX4.4|9=0000123|35=0|49=init-comp|56=accept-comp|34=2|57=fix|52=20180902-12:25:59.161|999=Sun, 02 Sep 2018 12:25:59 GMT|10=95|
42
- 8=FIX.4.4|9=0000146|35=3|49=accept-comp|56=init-comp|34=2|57=fix|52=20260627-11:28:03.403|45=2|372=0|373=5|58=msgType 0 checksum failed. received = 95 computed = 143|10=064|
43
- 8=FIX.4.4|9=0000075|35=5|49=init-comp|56=accept-comp|34=3|57=fix|52=20260627-11:28:05.403|58=5|10=208|
44
- 8=FIX.4.4|9=0000075|35=5|49=accept-comp|56=init-comp|34=3|57=fix|52=20260627-11:28:05.404|58=5|10=209|
45
- 8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260627-11:28:11.905|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=100|
46
- 8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260627-11:28:11.906|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=149|
42
+ 8=FIX.4.4|9=0000146|35=3|49=accept-comp|56=init-comp|34=2|57=fix|52=20260801-14:51:48.958|45=2|372=0|373=5|58=msgType 0 checksum failed. received = 95 computed = 143|10=081|
43
+ 8=FIX.4.4|9=0000075|35=5|49=init-comp|56=accept-comp|34=3|57=fix|52=20260801-14:51:50.958|58=5|10=216|
44
+ 8=FIX.4.4|9=0000075|35=5|49=accept-comp|56=init-comp|34=3|57=fix|52=20260801-14:51:50.959|58=5|10=217|
45
+ 8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260801-14:51:57.567|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=107|
46
+ 8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260801-14:51:57.568|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=156|
47
47
  8=FIX4.4|9=0000123|35=0|49=init-not!|56=accept-comp|34=2|57=fix|52=20180902-12:25:59.161|112=Sun, 02 Sep 2018 12:25:59 GMT|10=95|
48
- 8=FIX.4.4|9=0000145|35=3|49=accept-comp|56=init-comp|34=2|57=fix|52=20260627-11:28:11.907|45=2|372=0|373=5|58=msgType 0 checksum failed. received = 95 computed = 59|10=029|
49
- 8=FIX.4.4|9=0000075|35=5|49=init-comp|56=accept-comp|34=3|57=fix|52=20260627-11:28:13.906|58=5|10=215|
50
- 8=FIX.4.4|9=0000075|35=5|49=accept-comp|56=init-comp|34=3|57=fix|52=20260627-11:28:13.907|58=5|10=216|
51
- 8=FIX.4.4|9=0000116|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260627-11:28:16.395|98=0|108=2|141=Y|553=js-client|554=pwd-client|10=058|
52
- 8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260627-11:28:16.396|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=157|
53
- 8=FIX.4.4|9=0000104|35=0|49=init-comp|56=accept-comp|34=2|57=fix|52=20260627-11:28:18.402|112=Sat, 27 Jun 2026 11:28:18 GMT|10=157|
54
- 8=FIX.4.4|9=0000104|35=0|49=init-comp|56=accept-comp|34=3|57=fix|52=20260627-11:28:20.404|112=Sat, 27 Jun 2026 11:28:20 GMT|10=146|
55
- 8=FIX.4.4|9=0000075|35=5|49=init-comp|56=accept-comp|34=4|57=fix|52=20260627-11:28:22.398|58=5|10=221|
56
- 8=FIX.4.4|9=0000075|35=5|49=accept-comp|56=init-comp|34=2|57=fix|52=20260627-11:28:22.399|58=5|10=220|
57
- 8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260627-11:28:24.881|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=107|
58
- 8=FIX.4.4|9=0000116|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260627-11:28:24.882|98=0|108=2|141=Y|553=js-server|554=pwd-server|10=106|
59
- 8=FIX.4.4|9=0000104|35=0|49=accept-comp|56=init-comp|34=2|57=fix|52=20260627-11:28:26.887|112=Sat, 27 Jun 2026 11:28:26 GMT|10=172|
60
- 8=FIX.4.4|9=0000104|35=0|49=accept-comp|56=init-comp|34=3|57=fix|52=20260627-11:28:28.892|112=Sat, 27 Jun 2026 11:28:28 GMT|10=173|
61
- 8=FIX.4.4|9=0000104|35=0|49=accept-comp|56=init-comp|34=4|57=fix|52=20260627-11:28:30.895|112=Sat, 27 Jun 2026 11:28:30 GMT|10=163|
62
- 8=FIX.4.4|9=0000075|35=5|49=init-comp|56=accept-comp|34=2|57=fix|52=20260627-11:28:32.883|58=5|10=219|
63
- 8=FIX.4.4|9=0000075|35=5|49=accept-comp|56=init-comp|34=5|57=fix|52=20260627-11:28:32.884|58=5|10=223|
64
- 8=FIX.4.4|9=0000116|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260627-11:28:35.599|98=0|108=2|141=Y|553=js-client|554=pwd-client|10=065|
65
- 8=FIX.4.4|9=0000116|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260627-11:28:35.600|98=0|108=5|141=Y|553=js-server|554=pwd-server|10=099|
66
- 8=FIX.4.4|9=0000104|35=0|49=init-comp|56=accept-comp|34=2|57=fix|52=20260627-11:28:37.604|112=Sat, 27 Jun 2026 11:28:37 GMT|10=163|
67
- 8=FIX.4.4|9=0000104|35=0|49=init-comp|56=accept-comp|34=3|57=fix|52=20260627-11:28:39.608|112=Sat, 27 Jun 2026 11:28:39 GMT|10=172|
68
- 8=FIX.4.4|9=0000104|35=0|49=accept-comp|56=init-comp|34=2|57=fix|52=20260627-11:28:40.609|112=Sat, 27 Jun 2026 11:28:40 GMT|10=156|
69
- 8=FIX.4.4|9=0000104|35=0|49=init-comp|56=accept-comp|34=4|57=fix|52=20260627-11:28:41.611|112=Sat, 27 Jun 2026 11:28:41 GMT|10=153|
70
- 8=FIX.4.4|9=0000075|35=5|49=init-comp|56=accept-comp|34=5|57=fix|52=20260627-11:28:43.602|58=5|10=213|
71
- 8=FIX.4.4|9=0000075|35=5|49=accept-comp|56=init-comp|34=3|57=fix|52=20260627-11:28:43.602|58=5|10=211|
72
- 8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260627-11:30:11.370|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=089|
73
- 8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260627-11:30:11.380|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=138|
74
- 8=FIX.4.4|9=0000075|35=5|49=init-comp|56=accept-comp|34=2|57=fix|52=20260627-11:30:12.383|58=5|10=205|
75
- 8=FIX.4.4|9=0000075|35=5|49=accept-comp|56=init-comp|34=2|57=fix|52=20260627-11:30:12.385|58=5|10=207|
48
+ 8=FIX.4.4|9=0000145|35=3|49=accept-comp|56=init-comp|34=2|57=fix|52=20260801-14:51:57.569|45=2|372=0|373=5|58=msgType 0 checksum failed. received = 95 computed = 59|10=036|
49
+ 8=FIX.4.4|9=0000075|35=5|49=init-comp|56=accept-comp|34=3|57=fix|52=20260801-14:51:59.570|58=5|10=215|
50
+ 8=FIX.4.4|9=0000075|35=5|49=accept-comp|56=init-comp|34=3|57=fix|52=20260801-14:51:59.570|58=5|10=215|
51
+ 8=FIX.4.4|9=0000116|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260801-14:52:02.309|98=0|108=2|141=Y|553=js-client|554=pwd-client|10=042|
52
+ 8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260801-14:52:02.310|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=132|
53
+ 8=FIX.4.4|9=0000104|35=0|49=init-comp|56=accept-comp|34=2|57=fix|52=20260801-14:52:04.315|112=Sat, 01 Aug 2026 14:52:04 GMT|10=120|
54
+ 8=FIX.4.4|9=0000104|35=0|49=init-comp|56=accept-comp|34=3|57=fix|52=20260801-14:52:06.317|112=Sat, 01 Aug 2026 14:52:06 GMT|10=127|
55
+ 8=FIX.4.4|9=0000075|35=5|49=init-comp|56=accept-comp|34=4|57=fix|52=20260801-14:52:08.312|58=5|10=205|
56
+ 8=FIX.4.4|9=0000075|35=5|49=accept-comp|56=init-comp|34=2|57=fix|52=20260801-14:52:08.313|58=5|10=204|
57
+ 8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260801-14:52:10.828|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=097|
58
+ 8=FIX.4.4|9=0000116|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260801-14:52:10.829|98=0|108=2|141=Y|553=js-server|554=pwd-server|10=096|
59
+ 8=FIX.4.4|9=0000104|35=0|49=accept-comp|56=init-comp|34=2|57=fix|52=20260801-14:52:12.833|112=Sat, 01 Aug 2026 14:52:12 GMT|10=123|
60
+ 8=FIX.4.4|9=0000104|35=0|49=accept-comp|56=init-comp|34=3|57=fix|52=20260801-14:52:14.838|112=Sat, 01 Aug 2026 14:52:14 GMT|10=133|
61
+ 8=FIX.4.4|9=0000104|35=0|49=accept-comp|56=init-comp|34=4|57=fix|52=20260801-14:52:16.841|112=Sat, 01 Aug 2026 14:52:16 GMT|10=132|
62
+ 8=FIX.4.4|9=0000075|35=5|49=init-comp|56=accept-comp|34=2|57=fix|52=20260801-14:52:18.830|58=5|10=209|
63
+ 8=FIX.4.4|9=0000075|35=5|49=accept-comp|56=init-comp|34=5|57=fix|52=20260801-14:52:18.831|58=5|10=213|
64
+ 8=FIX.4.4|9=0000116|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260801-14:52:21.327|98=0|108=2|141=Y|553=js-client|554=pwd-client|10=043|
65
+ 8=FIX.4.4|9=0000116|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260801-14:52:21.328|98=0|108=5|141=Y|553=js-server|554=pwd-server|10=095|
66
+ 8=FIX.4.4|9=0000104|35=0|49=init-comp|56=accept-comp|34=2|57=fix|52=20260801-14:52:23.334|112=Sat, 01 Aug 2026 14:52:23 GMT|10=123|
67
+ 8=FIX.4.4|9=0000104|35=0|49=init-comp|56=accept-comp|34=3|57=fix|52=20260801-14:52:25.336|112=Sat, 01 Aug 2026 14:52:25 GMT|10=130|
68
+ 8=FIX.4.4|9=0000104|35=0|49=accept-comp|56=init-comp|34=2|57=fix|52=20260801-14:52:26.339|112=Sat, 01 Aug 2026 14:52:26 GMT|10=134|
69
+ 8=FIX.4.4|9=0000104|35=0|49=init-comp|56=accept-comp|34=4|57=fix|52=20260801-14:52:27.338|112=Sat, 01 Aug 2026 14:52:27 GMT|10=137|
70
+ 8=FIX.4.4|9=0000075|35=5|49=init-comp|56=accept-comp|34=5|57=fix|52=20260801-14:52:29.329|58=5|10=217|
71
+ 8=FIX.4.4|9=0000075|35=5|49=accept-comp|56=init-comp|34=3|57=fix|52=20260801-14:52:29.330|58=5|10=207|
72
+ 8=FIX.4.4|9=0000117|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20260801-14:54:22.785|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=104|
73
+ 8=FIX.4.4|9=0000117|35=A|49=accept-comp|56=init-comp|34=1|57=fix|52=20260801-14:54:22.794|98=0|108=30|141=Y|553=js-server|554=pwd-server|10=152|
74
+ 8=FIX.4.4|9=0000075|35=5|49=init-comp|56=accept-comp|34=2|57=fix|52=20260801-14:54:23.797|58=5|10=219|
75
+ 8=FIX.4.4|9=0000075|35=5|49=accept-comp|56=init-comp|34=2|57=fix|52=20260801-14:54:23.799|58=5|10=221|
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jspurefix",
3
- "version": "5.8.4",
3
+ "version": "5.9.1",
4
4
  "description": "pure node js fix engine",
5
5
  "keywords": [
6
6
  "typescript",
@@ -23,6 +23,7 @@
23
23
  "url": "git+https://github.com/TimelordUK/jspurefix.git"
24
24
  },
25
25
  "scripts": {
26
+ "pack:local": "node script/pack-local.js",
26
27
  "circular": "madge --circular --extensions js dist && madge --circular --extensions ts src",
27
28
  "test": "jest --maxWorkers=1 --coverage",
28
29
  "build": "tsc",
@@ -74,9 +75,8 @@
74
75
  "author": "",
75
76
  "license": "MIT",
76
77
  "dependencies": {
77
- "@jest/globals": "^30.4.1",
78
78
  "align-text": "^1.0.2",
79
- "axios": "^1.16.1",
79
+ "axios": "^1.19.0",
80
80
  "express": "^5.2.1",
81
81
  "lodash": "^4.18.1",
82
82
  "mathjs": "^15.2.0",
@@ -85,30 +85,31 @@
85
85
  "moment": "^2.30.1",
86
86
  "node-fs-extra": "^0.8.2",
87
87
  "reflect-metadata": "^0.2.2",
88
- "sax": "^1.6.0",
88
+ "sax": "^1.6.1",
89
89
  "tsyringe": "^4.10.0",
90
90
  "winston": "^3.19.0",
91
91
  "word-wrap": "^1.2.5",
92
- "yauzl": "^3.3.1"
92
+ "yauzl": "^3.4.0"
93
93
  },
94
94
  "devDependencies": {
95
+ "@jest/globals": "^30.4.1",
95
96
  "@stylistic/eslint-plugin": "^5.10.0",
96
97
  "@types/express": "^5.0.6",
97
- "@types/express-serve-static-core": "^5.1.1",
98
+ "@types/express-serve-static-core": "^5.1.3",
98
99
  "@types/jest": "^30.0.0",
99
- "@types/lodash": "^4.17.24",
100
+ "@types/lodash": "^4.17.25",
100
101
  "@types/mathjs": "^9.4.2",
101
102
  "@types/minimist": "^1.2.5",
102
- "@types/node": "^25.9.1",
103
+ "@types/node": "^25.9.5",
103
104
  "@types/request-promise-native": "^1.0.21",
104
105
  "@types/sax": "^1.2.7",
105
106
  "@types/winston": "^2.4.4",
106
- "eslint": "^9.39.4",
107
+ "eslint": "^9.39.5",
107
108
  "eslint-config-love": "^151.0.0",
108
109
  "jest": "^30.4.2",
109
110
  "madge": "^8.0.0",
110
111
  "standard": "^17.1.2",
111
- "ts-jest": "^29.4.11",
112
+ "ts-jest": "^29.4.12",
112
113
  "typescript": "^6.0.3"
113
114
  }
114
115
  }
@@ -0,0 +1,68 @@
1
+ #!/usr/bin/env node
2
+ /*
3
+ * Build jspurefix and pack it into a tarball that a consumer (jspf-demo, an
4
+ * application repo) can install directly, without publishing to npm.
5
+ *
6
+ * Why a tarball rather than `npm link`:
7
+ * - a symlinked dependency resolves its own copy of reflect-metadata and
8
+ * tsyringe. Two copies means two decorator metadata registries, and tsyringe
9
+ * silently fails to resolve anything registered through the other one.
10
+ * - the tarball is exactly what `npm publish` would upload, so packaging
11
+ * mistakes (a file missing from "files", a stale dist) surface here rather
12
+ * than in a release.
13
+ *
14
+ * Usage:
15
+ * npm run pack:local -> ../.local-packages/jspurefix-<version>.tgz
16
+ * plus a stable ../.local-packages/jspurefix-local.tgz
17
+ * npm run pack:local -- --out D:\somewhere
18
+ */
19
+ const { execSync } = require('child_process')
20
+ const fs = require('fs')
21
+ const path = require('path')
22
+
23
+ /**
24
+ * npm is a .cmd shim on windows, which node refuses to execFile directly, so go
25
+ * through the shell. One command string rather than an argv array - passing args
26
+ * alongside shell:true is deprecated because they are concatenated unescaped.
27
+ */
28
+ function npmRun (command, stdio) {
29
+ // npm pack lists every file it adds - over 1MB of notices, well past the default
30
+ // maxBuffer - so give it room and keep stderr off the pipe
31
+ return execSync(`npm ${command}`, {
32
+ cwd: repoRoot,
33
+ stdio,
34
+ encoding: 'utf8',
35
+ maxBuffer: 64 * 1024 * 1024
36
+ })
37
+ }
38
+
39
+ const repoRoot = path.resolve(__dirname, '..')
40
+ const pkg = JSON.parse(fs.readFileSync(path.join(repoRoot, 'package.json'), 'utf8'))
41
+
42
+ function arg (name, fallback) {
43
+ const i = process.argv.indexOf(name)
44
+ return i >= 0 && process.argv[i + 1] ? process.argv[i + 1] : fallback
45
+ }
46
+
47
+ const outDir = path.resolve(arg('--out', path.join(repoRoot, '..', '.local-packages')))
48
+ fs.mkdirSync(outDir, { recursive: true })
49
+
50
+ console.log(`building ${pkg.name}@${pkg.version} ...`)
51
+ npmRun('run build', 'inherit')
52
+
53
+ console.log(`packing into ${outDir} ...`)
54
+ const packed = npmRun(`pack --pack-destination "${outDir}"`, ['ignore', 'pipe', 'ignore'])
55
+ .trim().split(/\r?\n/).pop()
56
+
57
+ const tarball = path.join(outDir, packed)
58
+ // a stable name so consumers do not have to chase the version number
59
+ const stable = path.join(outDir, `${pkg.name}-local.tgz`)
60
+ fs.copyFileSync(tarball, stable)
61
+
62
+ const sizeMb = (fs.statSync(tarball).size / (1024 * 1024)).toFixed(1)
63
+ console.log('')
64
+ console.log(` ${tarball} (${sizeMb} MB)`)
65
+ console.log(` ${stable} (stable alias)`)
66
+ console.log('')
67
+ console.log('install it in a consumer with:')
68
+ console.log(` npm install "${stable}"`)
@@ -6,6 +6,7 @@ import { EmptyLogFactory } from './empty-log-factory'
6
6
  import { AsciiChars } from '../buffer/ascii/ascii-chars'
7
7
  import { DependencyContainer } from 'tsyringe'
8
8
  import { IFixSessionStoreFactory } from '../store/fix-session-store-factory'
9
+ import { ISessionRegistry } from '../transport/session/session-registry'
9
10
 
10
11
  export interface IJsFixConfig {
11
12
  factory: ISessionMsgFactory | null
@@ -16,11 +17,18 @@ export interface IJsFixConfig {
16
17
  logFactory: JsFixLoggerFactory
17
18
  sessionContainer: DependencyContainer
18
19
  sessionStoreFactory?: IFixSessionStoreFactory
20
+ /**
21
+ * Tracks the live session per SessionId. Set by the acceptor listener so a
22
+ * reconnecting counterparty replaces - rather than duplicates - its session.
23
+ */
24
+ sessionRegistry?: ISessionRegistry
19
25
  }
20
26
 
21
27
  export class JsFixConfig implements IJsFixConfig {
22
28
  public logDelimiter: number = AsciiChars.Pipe
23
29
  public sessionContainer: DependencyContainer
30
+ public sessionStoreFactory?: IFixSessionStoreFactory
31
+ public sessionRegistry?: ISessionRegistry
24
32
  constructor (
25
33
  public readonly factory: ISessionMsgFactory | null,
26
34
  public readonly definitions: FixDefinitions,
@@ -126,8 +126,12 @@ export abstract class SessionLauncher {
126
126
  this.registerApplication(container)
127
127
  } else {
128
128
  if (factory.makeSession) {
129
+ // resolve the config from the container doing the resolving, not the one
130
+ // captured here. An acceptor resolves each session from a per-connection
131
+ // child scope which re-registers IJsFixConfig, so this is how an application
132
+ // receives that session's own description, store and message factory.
129
133
  container.register<FixSession>(DITokens.FixSession, {
130
- useFactory: () => factory.makeSession(config)
134
+ useFactory: (c) => factory.makeSession(c.resolve<IJsFixConfig>(DITokens.IJsFixConfig))
131
135
  })
132
136
  }
133
137
  }
@@ -0,0 +1,84 @@
1
+ import { DependencyContainer } from 'tsyringe'
2
+ import { IJsFixConfig, JsFixConfig } from '../config'
3
+ import { DITokens } from './di-tokens'
4
+ import { ElasticBuffer } from '../buffer/elastic-buffer'
5
+ import { ISessionDescription } from '../transport/session/session-description'
6
+ import { ISessionMsgFactory } from '../transport/session/session-msg-factory'
7
+ import { cloneSessionDescription } from '../transport/session/clone-session-description'
8
+ import { AsciiSessionMsgFactory } from '../transport/ascii/ascii-session-msg-factory'
9
+ import { FixmlSessionMsgFactory } from '../transport/fixml/fixml-session-msg-factory'
10
+
11
+ /**
12
+ * A FIX acceptor serves many connections from one listener configuration. Until
13
+ * this existed every accepted connection shared the *same* parse buffer, transmit
14
+ * buffer, session description and message factory, because those are registered as
15
+ * instances on the single session container built at start up. Two clients talking
16
+ * to one acceptor would therefore interleave bytes in a shared ElasticBuffer and
17
+ * compute the same SessionId - so the same message store file.
18
+ *
19
+ * A session scope is a tsyringe child container which re-registers exactly the
20
+ * per-connection state. Everything else (dictionary, transient parser/transmitter
21
+ * classes, logger factory) is inherited from the parent, and resolving a parent
22
+ * registration from the child still injects the child's instances, so an
23
+ * AsciiParser resolved here receives this scope's ParseBuffer.
24
+ *
25
+ * Mirrors cspurefix TradeCaptureSessionFactory.CreatePerSessionConfigAndEncoder,
26
+ * which had to do the same thing for the same reason.
27
+ */
28
+ export function makeSessionScope (
29
+ config: IJsFixConfig,
30
+ overrides?: Partial<ISessionDescription>): IJsFixConfig {
31
+ const parent: DependencyContainer = config.sessionContainer
32
+ const scope = parent.createChildContainer()
33
+
34
+ const description = cloneSessionDescription(config.description, overrides)
35
+ const factory = makeSessionMsgFactory(description, config.factory)
36
+
37
+ scope.registerInstance(DITokens.ISessionDescription, description)
38
+ scope.registerInstance(DITokens.ISessionMsgFactory, factory)
39
+ scope.registerInstance<ElasticBuffer>(DITokens.TransmitBuffer, cloneBuffer(parent, DITokens.TransmitBuffer))
40
+ scope.registerInstance<ElasticBuffer>(DITokens.ParseBuffer, cloneBuffer(parent, DITokens.ParseBuffer))
41
+
42
+ const scoped = new JsFixConfig(factory, config.definitions, description, config.delimiter, config.logFactory)
43
+ scoped.logDelimiter = config.logDelimiter ?? scoped.logDelimiter
44
+ scoped.sessionStoreFactory = config.sessionStoreFactory
45
+ scoped.sessionRegistry = config.sessionRegistry
46
+ scoped.sessionContainer = scope
47
+ scope.registerInstance(DITokens.IJsFixConfig, scoped)
48
+ scope.registerInstance(DITokens.Definitions, config.definitions)
49
+
50
+ return scoped
51
+ }
52
+
53
+ /**
54
+ * A fresh buffer of the same capacity as the one the parent container holds, so the
55
+ * sizing decisions made in SessionContainer.asAscii are honoured without repeating
56
+ * them here.
57
+ */
58
+ function cloneBuffer (parent: DependencyContainer, token: DITokens): ElasticBuffer {
59
+ if (!parent.isRegistered(token, true)) {
60
+ return new ElasticBuffer()
61
+ }
62
+ const existing = parent.resolve<ElasticBuffer>(token)
63
+ return new ElasticBuffer(existing.size)
64
+ }
65
+
66
+ /**
67
+ * The scope needs a factory bound to *its* description, because the outbound header
68
+ * carries this session's comp ids. Applications may supply their own factory (by
69
+ * overriding SessionContainer.makeSessionFactory), and that must survive into the
70
+ * per-session scope - building a stock one here would silently drop custom header
71
+ * handling on the acceptor path. See issue #87.
72
+ */
73
+ function makeSessionMsgFactory (
74
+ description: ISessionDescription,
75
+ current: ISessionMsgFactory | null): ISessionMsgFactory {
76
+ if (current?.cloneFor) {
77
+ return current.cloneFor(description)
78
+ }
79
+ const ascii = description.application?.protocol === 'ascii'
80
+ const mutator = (current as any)?.mutator ?? null
81
+ return ascii
82
+ ? new AsciiSessionMsgFactory(description, mutator)
83
+ : new FixmlSessionMsgFactory(description, mutator)
84
+ }
@@ -19,9 +19,9 @@ class AppLauncher extends SessionLauncher {
19
19
  protected override makeFactory (config: IJsFixConfig): EngineFactory {
20
20
  const isInitiator = this.isInitiator(config.description)
21
21
  return {
22
- makeSession: () => isInitiator
23
- ? new HttpClient(config)
24
- : new HttpServer(config)
22
+ makeSession: (sessionConfig: IJsFixConfig) => isInitiator
23
+ ? new HttpClient(sessionConfig)
24
+ : new HttpServer(sessionConfig)
25
25
  } as EngineFactory
26
26
  }
27
27
 
@@ -15,9 +15,9 @@ class AppLauncher extends SessionLauncher {
15
15
  protected override makeFactory (config: IJsFixConfig): EngineFactory {
16
16
  const isInitiator = this.isInitiator(config.description)
17
17
  return {
18
- makeSession: () => isInitiator
19
- ? new MDClient(config)
20
- : new MDServer(config)
18
+ makeSession: (sessionConfig: IJsFixConfig) => isInitiator
19
+ ? new MDClient(sessionConfig)
20
+ : new MDServer(sessionConfig)
21
21
  } as EngineFactory
22
22
  }
23
23
  }
@@ -13,7 +13,7 @@ class AppLauncher extends SessionLauncher {
13
13
 
14
14
  protected override makeFactory (config: IJsFixConfig): EngineFactory {
15
15
  return {
16
- makeSession: () => new SkeletonSession(config, 45, false)
16
+ makeSession: (sessionConfig: IJsFixConfig) => new SkeletonSession(sessionConfig, 45, false)
17
17
  } as EngineFactory
18
18
  }
19
19
  }
@@ -14,9 +14,9 @@ export class AppLauncher extends SessionLauncher {
14
14
  protected override makeFactory (config: IJsFixConfig): EngineFactory {
15
15
  const isInitiator = this.isInitiator(config.description)
16
16
  return {
17
- makeSession: () => isInitiator
18
- ? new TradeCaptureClient(config)
19
- : new TradeCaptureServer(config)
17
+ makeSession: (sessionConfig: IJsFixConfig) => isInitiator
18
+ ? new TradeCaptureClient(sessionConfig)
19
+ : new TradeCaptureServer(sessionConfig)
20
20
  } as EngineFactory
21
21
  }
22
22
  }