Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Artio Engine duplicate FIX messages when replaying to the Gateway library #529

Closed
alex-arica opened this issue Nov 27, 2024 · 6 comments
Closed

Comments

@alex-arica
Copy link

alex-arica commented Nov 27, 2024

Hello,

I am evaluating Aeron and Artio Fix Engine for CMC Markets.

I have a setup with:

  • a standalone Java process running Aeron Archiving Media Driver
  • a standalone Java process running Artio Fix Engine configured to record inbound messages. Outbound messages recording is disabled
  • a standalone Java process running an Artio Fix Gateway connected to the Fix Engine using Aeron UDP
  • a standalone Java process running a FIX Client

Versions used:

  • aeron-*: 1.46.6
  • artio-* : 0.158
  • sbe-*: 1.33.1
  • agrona: 1.23.1

The FIX Client sends a FIX request to subscribe to EUR-GBP and receives quote updates.

The use case that we are testing is the failover and recovery of the Fix Gateway. I shutdown the FIX Gateway Java process and restart it and test that the FIX request to subscribe to EUR-GBP is replayed by the Fix Engine to the Fix Gateway.

When I shutdown the Fix Gateway the 1st time and restart it, I observe one FIX request to subscribe to EUR-GBP being replayed successfully.

Moreover, during this test the FIX Client does not logout from the Fix Engine, which is as expected.

The second time that I shutdown the Fix Gateway and restart it, I observe the same behaviour as the first time, which is as expected.

However, the third time that I shutdown the Fix Gateway and restart it, I observe 3 FIX requests to subscribe to EUR-GBP being replayed rather than one. These 3 Fix messages are duplicate (clones).

Is this an expected behaviour ?

I was expecting only one FIX request to subscribe to EUR-GBP as per the request sent by the Fix Client.

Please find attached the debug logs on the FIX Engine side where we can observe the FIX requests being duplicated in the archive:
Fix Engine logs.txt

Thank you for your help.

@alex-arica alex-arica changed the title Artio Engine duplicate FIX messages when replaying to the Engine Artio Engine duplicate FIX messages when replaying to the Gateway library Nov 27, 2024
lucianoviana added a commit to lucianoviana/artio that referenced this issue Dec 4, 2024
@JackBeezer
Copy link

Thank you for reporting this issue and providing such detailed information. We've been able to recreate the problem and will look into it; we will keep you posted with any further updates.

marc-adaptive added a commit that referenced this issue Jan 14, 2025
marc-adaptive added a commit that referenced this issue Jan 14, 2025
@marc-adaptive
Copy link
Contributor

Hi @alex-arica. Pushed a fix with fee41bd to filter out prior inbound replayed messages which were appearing as duplicates. Could you kindly retry?

Replayed messages use the same Aeron publication from Framer to FixLibrary. The odd behavior you noticed occurred because replayed messages happened to be within the recording range of real messages and were not being filtered out, but rather treated as real messages.

@alex-arica
Copy link
Author

Hi @marc-adaptive . Thank you for letting me know. This morning, I am going to test it and let you know.

@alex-arica
Copy link
Author

I built locally the latest Snapshot (artio-* : 0.162-SNAPSHOT) containing the fix. With this version, I was NOT able to reproduce the issue.

However, when I used the latest tagged version (artio-* : 0.161), I was able to reproduce the issue consistently.

I confirm that the fix you committed works. Thank you very much for your help!

@marc-adaptive
Copy link
Contributor

marc-adaptive commented Jan 15, 2025

That is correct 0.161 does not have this. We will be releasing 0.162 very soon. Thanks for reporting this issue.

@alex-arica
Copy link
Author

I noticed that the release tag : https://github.com/real-logic/artio/releases/tag/0.162 does not contains a reference to this ticket even though it contains the code changes linked to this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants