-
Notifications
You must be signed in to change notification settings - Fork 121
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
Not able to scan archive in follow mode #438
Comments
Have you got a series of steps or some code that reproduces this issue? |
Hello,
public static void main(String[] args) throws IOException {
System.setProperty(CONTROL_CHANNEL_PROP_NAME, "aeron:udp?endpoint=localhost:7010");
System.setProperty(CONTROL_RESPONSE_CHANNEL_PROP_NAME, "aeron:udp?endpoint=localhost:7020");
System.out.println(AERON_DIRECTORY_NAME);
System.out.println(AERON_ARCHIVE_DIRECTORY_NAME);
final MediaDriver.Context context = new MediaDriver.Context()
.threadingMode(SHARED)
.dirDeleteOnStart(true)
.aeronDirectoryName(AERON_DIRECTORY_NAME);
final Archive.Context archiveContext = new Archive.Context()
.threadingMode(ArchiveThreadingMode.SHARED)
.idleStrategySupplier(CommonConfiguration::backoffIdleStrategy)
// .deleteArchiveOnStart(true)
.aeronDirectoryName(AERON_DIRECTORY_NAME)
.recordingEventsChannel(RECORDING_EVENTS_CHANNEL)
.archiveDirectoryName(AERON_ARCHIVE_DIRECTORY_NAME);
try (ArchivingMediaDriver driver = ArchivingMediaDriver.launch(context, archiveContext)) {
final IntHashSet queryStreamIds = new IntHashSet();
queryStreamIds.add(CommonConfiguration.DEFAULT_OUTBOUND_LIBRARY_STREAM);
queryStreamIds.add(CommonConfiguration.DEFAULT_INBOUND_LIBRARY_STREAM);
try (FixArchiveScanner fixArchiveScanner = new FixArchiveScanner(
new FixArchiveScanner.Configuration()
.aeronDirectoryName(AERON_DIRECTORY_NAME)
.idleStrategy(CommonConfiguration.backoffIdleStrategy()))) {
System.out.println("Scan archive");
fixArchiveScanner.scan(
IPC_CHANNEL,
queryStreamIds,
TestScanner::onMessage,
null,
true,
EngineConfiguration.DEFAULT_ARCHIVE_SCANNER_STREAM
);
}
}
}
private static void onMessage(FixMessageDecoder fixMessageDecoder, DirectBuffer directBuffer, int i, int i1, ArtioLogHeader artioLogHeader) {
System.out.println(fixMessageDecoder.body());
} |
Hi, thanks for expanding a bit but in general if people have support contracts with my company then I'll happily spend time to investigate / debug / fix issues. If you're just submitting an issue on the bug tracker as a member of the public then in order to investigate it I feel that I really need a proper reproducing test case. A reproducing test case should mean the whole code that is needed to reproduce the issue, not a snippet, and clearly fails. The idea with follow mode is that you follow an existing system that is live. In your example code you're starting up a new media driver for the specific purpose of running the FixArchiveScanner, so it's not going to "follow" an Engine because there's no Engine. |
Hello Richard, I will write a small sample to reproduce the issue and post here in case of. |
Hello, I share the sample code to reproduce in case of. As the code is not easy to copy/paste, I put the sample to reproduce this issue in a git repo: |
I tried the sample code in your repo and got the following exception, is this expected?
|
Hello, I test again and I have not this exception ie:
I firstly start the quickfix acceptor and then I start artio initiator and I have the previous logs. And no message coming from archive as I am in follow = true. |
Hello,
I use FixArchiveScanner to scan my archive and when I put follow mode to false all is working fine, I got all messages in the archive and the scanner return correctly when finished.
But when I use follow = true, I get no message.
The text was updated successfully, but these errors were encountered: