
uk.co.real_logic.artio.stress.SoleEngine Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of artio-samples Show documentation
Show all versions of artio-samples Show documentation
High-Performance FIX Gateway
The newest version!
/*
* Copyright 2015-2025 Real Logic Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package uk.co.real_logic.artio.stress;
import uk.co.real_logic.artio.engine.EngineConfiguration;
import uk.co.real_logic.artio.engine.FixEngine;
import static io.aeron.archive.client.AeronArchive.Configuration.CONTROL_CHANNEL_PROP_NAME;
import static io.aeron.archive.client.AeronArchive.Configuration.CONTROL_RESPONSE_CHANNEL_PROP_NAME;
public final class SoleEngine
{
static final String AERON_CHANNEL = "aeron:udp?endpoint=localhost:10000";
public static void main(final String[] args)
{
System.setProperty(CONTROL_CHANNEL_PROP_NAME, "aeron:udp?endpoint=localhost:8010");
System.setProperty(CONTROL_RESPONSE_CHANNEL_PROP_NAME, "aeron:udp?endpoint=localhost:8020");
final EngineConfiguration configuration = new EngineConfiguration()
.bindTo("localhost", StressConfiguration.PORT)
.logFileDir("stress-server-logs")
.libraryAeronChannel(AERON_CHANNEL)
.errorIfDuplicateEngineDetected(false);
configuration.replyTimeoutInMs(1000);
System.out.println("Server Logs at " + configuration.logFileDir());
StressUtil.cleanupOldLogFileDir(configuration);
try (FixEngine ignore = FixEngine.launch(configuration))
{
StressUtil.awaitKeyPress();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy