Skip to content

Commit

Permalink
[Java] use toolChannel/StreamId
Browse files Browse the repository at this point in the history
  • Loading branch information
nbradac committed Dec 18, 2024
1 parent c8c127e commit d05fa80
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,16 +286,13 @@ protected int createEmptyServiceSnapshot(final File clusterDir, final PrintStrea
final int subscriptionSessionId = (int)archive.startReplay(
entry.recordingId, 0, AeronArchive.NULL_LENGTH, toolChannel, toolStreamId);

final String snapshotChannel = "aeron:ipc";
final int snapshotStreamId = 1234; // TODO

final String replayChannel = ChannelUri.addSessionId(toolChannel, subscriptionSessionId);
try (Subscription subscription = aeron.addSubscription(replayChannel, toolStreamId);
ExclusivePublication publication = aeron.addExclusivePublication(snapshotChannel, snapshotStreamId))
ExclusivePublication publication = aeron.addExclusivePublication(toolChannel, toolStreamId))
{
final int publicationSessionId = publication.sessionId();
final String recordingChannel = ChannelUri.addSessionId(snapshotChannel, publicationSessionId);
archive.startRecording(recordingChannel, snapshotStreamId, LOCAL, true);
final String recordingChannel = ChannelUri.addSessionId(toolChannel, publicationSessionId);
archive.startRecording(recordingChannel, toolStreamId, LOCAL, true);

final CountersReader counters = aeron.countersReader();
final long archiveId = archive.archiveId();
Expand Down

0 comments on commit d05fa80

Please sign in to comment.