### Initiate iLink3 Connection Source: https://github.com/artiofix/artio/wiki/iLink3-Support Example code for configuring and initiating an iLink3 connection using Artio. This involves setting up connection details and handling the asynchronous reply. ```java // (1) Setup a FixLibrary and Engine that we will refer to later. final FixLibrary library = ... // (2) You need to initialise the configuration object with the configuration for the gateway that you // plan to connect to. Your `handler` object in the example must be an implementation of // `ILink3ConnectionHandler` - we will discuss this interface in more detail below. final ILink3ConnectionConfiguration connectionConfiguration = ILink3ConnectionConfiguration.builder() .host(HOST) .port(PORT) .sessionId(SESSION_ID) .firmId(FIRM_ID) .userKey(USER_KEY) .accessKeyId(ACCESS_KEY_ID) .handler(handler) .build(); // (3) Now you have the configuration object you can initiate a connection to an iLink3 Gateway. // This returns an async reply object final Reply reply = library.initiate(connectionConfiguration); // (4) Await the completion of your reply object. That operation can be interleaved with other // code on your thread's duty cycle, but you must poll the library object regularly. while (reply.isExecuting()) { idleStrategy.idle(library.poll(1)); } // (5) Check the final state of the Reply object - ie whether it has completed successfully or not. if (reply.hasCompleted()) { final ILink3Connection connection = reply.resultIfPresent(); System.out.println("Connected: " + connection); // (6) Now you can you use your connection object. } // There maybe an error when connecting else if (reply.hasErrored()) { reply.error().printStackTrace(); } // The connection may time out due to a network error else if (reply.hasTimedOut()) { System.err.println("Timed out: " + reply); } ``` -------------------------------- ### Install Benchmark Utilities on Ubuntu Source: https://github.com/artiofix/artio/wiki/Benchmarking Install necessary utilities for benchmarking on an Ubuntu EC2 image. This command installs utilities for benchmarking without JMC. ```sh sudo apt-get update sudo apt-get install htop screen mosh sysbench default-jdk ``` -------------------------------- ### Build Artio FIX Gateway Source: https://github.com/artiofix/artio/blob/master/README.md Run this command to build the Artio FIX Gateway using Gradle. Ensure you have Gradle installed and the project is cloned. ```bash ./gradlew ``` -------------------------------- ### Configure FixEngine for Reproduction Source: https://github.com/artiofix/artio/wiki/Reproduction-Harness Use reproduceInbound() to set the start and end times for reproduction. Call startReproduction() after the engine is ready and check the reply to know when it completes. ```java EngineConfiguration.reproduceInbound(startTime, endTime) ``` ```java startReproduction() ``` -------------------------------- ### Configure FixLibrary for Reproduction Source: https://github.com/artiofix/artio/wiki/Reproduction-Harness Use reproduceInbound() to set the start and end times for reproduction. Ensure each library instance uses a distinct library ID by setting it with libraryId() to avoid bugs. ```java LibraryConfiguration.reproduceInbound(startTime, endTime) ``` ```java LibraryConfiguration.libraryId(id) ``` -------------------------------- ### Install Oracle Java 8 on Ubuntu Source: https://github.com/artiofix/artio/wiki/Benchmarking Install Oracle Java 8 on an Ubuntu EC2 image. This is required if you plan to use JMC for benchmarking. ```sh sudo apt-get install htop screen mosh sysbench sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java8-installer ``` -------------------------------- ### Get Bytes in Slow Consumer Buffer Source: https://github.com/artiofix/artio/wiki/Slow-Consumer Retrieve the number of bytes currently outstanding in the slow consumer buffer for a connected session. Useful for diagnostics and reporting. ```java connectedSessionInfo.bytesInBuffer() ``` -------------------------------- ### Filter FIX Message Types for Logging Source: https://github.com/artiofix/artio/wiki/Operational-Concerns Use `fix.core.debug.msg_types` to log specific FIX message types. This example logs New Order Single (D) and Execution Report (8) messages. ```bash -Dfix.core.debug=FIX_MESSAGE -Dfix.core.debug.msg_types=D,8 ``` -------------------------------- ### Build Artio with iLink3 Support Source: https://github.com/artiofix/artio/wiki/iLink3-Support Run this Gradle command to build Artio with iLink3 support enabled. Ensure the ilinkbinary.xml schema is in the correct location. ```bash ./gradlew -Dfix.core.iLink3Enabled=true ``` -------------------------------- ### Add Artio Binary EntryPoint Dependencies Source: https://github.com/artiofix/artio/wiki/Binary-EntryPoint-Support Include these dependencies in your project to enable Artio's Binary EntryPoint support. Ensure you use the correct artioVersion. ```gradle dependencies { implementation "uk.co.real-logic:artio-binary-entrypoint-codecs:${artioVersion}" implementation "uk.co.real-logic:artio-binary-entrypoint-impl:${artioVersion}" implementation "uk.co.real-logic:artio-codecs:${artioVersion}" implementation "uk.co.real-logic:artio-core:${artioVersion}" } ``` -------------------------------- ### Configure Engine to Accept Binary EntryPoint Source: https://github.com/artiofix/artio/wiki/Binary-EntryPoint-Support Set the EngineConfiguration to accept Binary EntryPoint protocol. This is a prerequisite for handling Binary EntryPoint connections. ```java configuration.acceptFixPProtocol(FixPProtocolType.BINARY_ENTRYPOINT); ``` -------------------------------- ### Compile Artio Benchmarks Source: https://github.com/artiofix/artio/wiki/Benchmarking Run this command to compile the benchmarks JAR for Artio. ```sh ./gradlew benchmarks ``` -------------------------------- ### Initiate a FIX Session Connection Source: https://github.com/artiofix/artio/wiki/Session-Management Use SessionConfiguration to define connection details and then call initiate on the library. Poll the library to process the asynchronous operation until completion. ```java final SessionConfiguration sessionConfig = SessionConfiguration.builder() .address("localhost", 9999) .targetCompId(ACCEPTOR_COMP_ID) .senderCompId(INITIATOR_COMP_ID) .build(); ``` ```java final Reply reply = library.initiate(sessionConfig); ``` ```java while (reply.isExecuting()) { idleStrategy.idle(library.poll(1)); } ``` ```java if (!reply.hasCompleted()) { System.err.println( "Unable to initiate the session, " + reply.state() + " " + reply.error()); return; } ``` ```java System.out.println("Replied with: " + reply.state()); final Session session = reply.resultIfPresent(); ``` -------------------------------- ### Configure Artio Reproduction Log Source: https://github.com/artiofix/artio/wiki/Reproduction-Harness Enable writing the reproduction log to capture back-pressure events, which can be useful for accurate reproduction. Configure the stream ID for the log using reproductionLogStream(). ```java EngineConfiguration.writeReproductionLog(true) ``` ```java EngineConfiguration.reproductionLogStream(streamId) ``` -------------------------------- ### Enable Debug Logging with Tags Source: https://github.com/artiofix/artio/wiki/Operational-Concerns Pass this command-line parameter to enable debug logging. Specify comma-separated tags from `uk.co.real_logic.artio.LogTag` to filter log output. ```bash -Dfix.core.debug=true ``` ```bash -Dfix.core.debug=FIX_MESSAGE,CLOSE,STATE_CLEANUP ``` -------------------------------- ### Publish Artio Version using Script Source: https://github.com/artiofix/artio/wiki/Internal-Maven-Repositories Execute this shell command to publish a new version of Artio to your configured repository. Replace 'X.XX' with the actual version number you intend to publish. ```bash ./publish.sh "X.XX" ``` -------------------------------- ### Configure Repository Properties for Artio Publishing Source: https://github.com/artiofix/artio/wiki/Internal-Maven-Repositories Add these properties to your `~/.gradle/gradle.properties` file to specify your internal Maven repository details for uploading Artio binaries. Ensure your URLs, username, and password are correct. ```properties repoUrl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ snapshotUrl=https://oss.sonatype.org/content/repositories/snapshots/ repoUsername=JaneBloggs123 repoPassword=SecretPassword123 ``` -------------------------------- ### Generate FIX Codecs via Commandline Source: https://github.com/artiofix/artio/wiki/Multiple-FIX-Versions Use the CodecGenerationTool with system properties to specify the parent package and output directory for generated FIX codecs. Ensure required codecs are on the runtime classpath. ```bash java -Dfix.codecs.parent_package=uk.co.real_logic.artio.fixt -cp "artio-codecs/build/libs/artio-codecs-${ARTIO-VERSION}.jar" \ uk.co.real_logic.artio.dictionary.CodecGenerationTool \ /path/to/generated-src/directory \ src/main/resources/your_fix_dictionary_file.xml ``` -------------------------------- ### Configure iLink3 Logging with Java Properties Source: https://github.com/artiofix/artio/wiki/iLink3-Support Use this Java property to enable session and business level logging for iLink3. Configure by specifying the desired LogTags separated by commas. ```java -Dfix.core.debug=FIXP_SESSION,FIXP_BUSINESS ``` -------------------------------- ### Upload Benchmarks Jar via Script Source: https://github.com/artiofix/artio/wiki/Benchmarking Run this script to re-compile and upload the benchmarks JAR to the EC2 image. ```sh ./bench/upload.sh ``` -------------------------------- ### Add Artio iLink3 Dependencies Source: https://github.com/artiofix/artio/wiki/iLink3-Support Include these dependencies in your project to use Artio with iLink3 support. Replace ${artioVersion} with the appropriate Artio version. ```gradle dependencies { implementation "uk.co.real-logic:artio-codecs:${artioVersion}" implementation "uk.co.real-logic:artio-ilink3-codecs:${artioVersion}" implementation "uk.co.real-logic:artio-ilink3-impl:${artioVersion}" implementation "uk.co.real-logic:artio-core:${artioVersion}" } ``` -------------------------------- ### Configure Sender Buffer and Slow Consumer Timeout Source: https://github.com/artiofix/artio/wiki/Slow-Consumer Configure the maximum bytes Artio will buffer per connection and the timeout duration for a session remaining in a slow state. These settings help manage resources and prevent excessively slow clients from impacting the system. ```java final EngineConfiguration configuration = new EngineConfiguration() .senderMaxBytesInBuffer(128 * 1024L) // 128 KiB per-connection backlog .slowConsumerTimeoutInMs(30_000L); // 30s slow-consumer timeout ``` -------------------------------- ### Generate FIX Codecs with Maven Source: https://github.com/artiofix/artio/wiki/Multiple-FIX-Versions Configure the exec-maven-plugin to run the CodecGenerationTool. This sets the main class, arguments for output directory and dictionary file, and system properties for the parent package. ```xml org.codehaus.mojo exec-maven-plugin java generate-sources uk.co.real_logic.artio.dictionary.CodecGenerationTool ${project.build.directory}/generated-sources/java src/main/resources/your_fix_dictionary_file.xml fix.codecs.parent_package uk.co.real_logic.artio.fixt ``` -------------------------------- ### New File Header for Artio Project Source: https://github.com/artiofix/artio/blob/master/CONTRIBUTING.md When adding a new file to the Artio project, ensure it includes this standard header, which specifies copyright and licensing information under the Apache 2.0 license. ```java /* * 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. */ ``` -------------------------------- ### Handling Business Messages in Artio Source: https://github.com/artiofix/artio/wiki/iLink3-Support Implement the ILink3ConnectionHandler and override onBusinessMessage to process incoming application/business-level messages. Use a switch statement on the templateId to wrap and decode specific message types. ```Java private final BusinessReject521Decoder businessReject = new BusinessReject521Decoder(); public void onBusinessMessage( final int templateId, final DirectBuffer buffer, final int offset, final int blockLength, final int version, final boolean possRetrans) { switch (templateId) { case BusinessReject521Decoder.TEMPLATE_ID: { businessReject.wrap(buffer, offset, blockLength, version); System.out.println("Received: " + businessReject.toString()); break; } } } ``` -------------------------------- ### Configure Noop Idle Strategy Source: https://github.com/artiofix/artio/wiki/Benchmarking Set this Java system property to use a noop idle strategy for lowest latency performance. This is a benchmark-specific configuration. ```properties -Dfix.benchmark.engine_idle=noop ``` -------------------------------- ### Run Stub Decoder Benchmark Source: https://github.com/artiofix/artio/wiki/Benchmarking Execute this command to run the stub decoder benchmark using the generated JMH benchmark JAR. ```sh java -jar ./artio-system-tests/build/libs/artio-tests-0.1-SNAPSHOT-benchmarks.jar StubDecoderBenchmark ``` -------------------------------- ### Upload Benchmark Directory to EC2 Source: https://github.com/artiofix/artio/wiki/Benchmarking Use SCP to upload the benchmark directory to your EC2 instance. Ensure the PEM file and EC2 host are correctly exported as environment variables. ```sh scp -i $PEM -r bench/ ubuntu@$EC2:fix-gateway ``` -------------------------------- ### Upload Screen Configuration to EC2 Source: https://github.com/artiofix/artio/wiki/Benchmarking Optionally upload your .screenrc file to the EC2 instance for consistent screen session configurations. ```sh scp -i $PEM ~/.screenrc ubuntu@$EC2: ``` -------------------------------- ### Sending Application Messages with Artio Source: https://github.com/artiofix/artio/wiki/iLink3-Support Use this pattern to send application-level messages. It involves claiming a buffer, setting message fields using an SBE encoder, and committing the message. Reusing encoders is recommended to minimize allocations. ```Java final NewOrderSingle514Encoder newOrderSingle = new NewOrderSingle514Encoder(); final long position = connection.tryClaim(encoder); if (position < 0) { return; } newOrderSingle.price().mantissa(price); newOrderSingle.stopPx().mantissa(PRICENULL9Encoder.mantissaNullValue()); newOrderSingle.execInst().oB(false).nH(notHeld).aON(false); newOrderSingle .orderQty(1) .securityID(securityID) .side(SideReq.Buy) .senderID(senderID) .clOrdID(clOrdId) .partyDetailsListReqID(1) .orderRequestID(orderRequestID) .location(USNY) .minQty(minQty) .displayQty(NewOrderSingle514Encoder.displayQtyNullValue()) .expireDate(NewOrderSingle514Encoder.expireDateNullValue()) .ordType(OrderTypeReq.Limit) .timeInForce(timeInForce) .manualOrderIndicator(ManualOrdIndReq.Automated) .executionMode(ExecMode.Aggressive) .liquidityFlag(BooleanNULL.NULL_VAL) .managedOrder(BooleanNULL.NULL_VAL) .shortSaleType(ShortSaleType.NULL_VAL); connection.commit(); ``` -------------------------------- ### Configure Codec Generation Programmatically Source: https://github.com/artiofix/artio/wiki/Multiple-FIX-Versions Use the CodecGenerator class and CodecConfiguration to programmatically set the parent package and output path for codec generation within existing JVM code. ```java new CodecConfiguration().parentPackage("uk.co.real_logic.artio.fixt").outputPath("/path/to/generated-src/directory"); ``` -------------------------------- ### Set FIXP Authentication Strategy Source: https://github.com/artiofix/artio/wiki/Binary-EntryPoint-Support Implement a FIXP authentication strategy to control connection acceptance based on context and authentication proxy. If none is set, all connections are accepted. ```java configuration.fixPAuthenticationStrategy((context, authProxy) -> { System.out.println("Request to authenticate: " + context); authProxy.accept(); }); ``` -------------------------------- ### Customize Session Replay with Gapfill Configuration Source: https://github.com/artiofix/artio/wiki/Frequently-Asked-Questions Configure the 'gapfillOnReplayMessageTypes()' option in EngineConfiguration to specify message types that will be gap filled during replay. By default, only admin messages are gap filled. ```java EngineConfiguration ``` -------------------------------- ### Generate Custom FIX Protocols with CodecGenerationTool Source: https://github.com/artiofix/artio/wiki/Frequently-Asked-Questions Use CodecGenerationTool to generate codecs for custom FIX protocols. Exclude 'fix-gateway-session-codecs' to use a venue-provided FIX protocol instead of the default minimal one. ```java uk.co.real_logic.fix_gateway.dictionary.CodecGenerationTool ``` -------------------------------- ### Generate FIX Codecs with Gradle Source: https://github.com/artiofix/artio/wiki/Multiple-FIX-Versions Define a Gradle task of type JavaExec to run the CodecGenerationTool. This configures the main class, classpath, system property for the parent package, and arguments for output directory and dictionary file. ```gradle task generateCodecs(type: JavaExec) { main = 'uk.co.real_logic.artio.dictionary.CodecGenerationTool' classpath = sourceSets.main.runtimeClasspath systemProperty("fix.codecs.parent_package", "uk.co.real_logic.artio.fixt") args = ['/path/to/generated-src/directory', 'src/main/resources/your_fix_dictionary_file.xml'] outputs.dir '/path/to/generated-src/directory' } ``` -------------------------------- ### Handle Incoming FIXP Business Messages Source: https://github.com/artiofix/artio/wiki/Binary-EntryPoint-Support Implement the `onBusinessMessage` method to process incoming FIXP messages. This involves decoding the message from a buffer and potentially encoding a response. ```java public void onBusinessMessage( final FixPConnection connection, final int templateId, final DirectBuffer buffer, final int offset, final int blockLength, final int version, final boolean possRetrans) { // (1) You can use the provided template id of the message in order to understand which message your system has received and ... if (templateId == NewOrderSingleDecoder.TEMPLATE_ID) { final NewOrderSingleDecoder newOrderSingle = this.newOrderSingle; // (2) ... then wrap the SBE decoder around the buffer, using the provided offset, block length and version. newOrderSingle.wrap(buffer, offset, blockLength, version); // (3) You need an SBE encoder flyweight - these are provided by the `artio-binary-entrypoint-codecs` project. // In an idiomatic, low-allocation, system these encoders should be reused final ExecutionReport_NewEncoder executionReport = this.executionReport; // (4) Use the tryClaim API in order to wrap the encoder around an in memory buffer // the second parameters is the length of the variable length component of the SBE codec. final long position = connection.tryClaim( executionReport, ExecutionReport_NewEncoder.NoMetricsEncoder.sbeBlockLength()); if (position < 0) { // Your attempt to claim a buffer has been back-pressured. This is unlikely to happen, but you // want to re-attempt this operation later until it succeeds. } // (5) Set the values for your message - you can see some values are taken from the order that you've just decoded. executionReport .orderID(orderId++) .clOrdID(newOrderSingle.clOrdID()) .securityID(newOrderSingle.securityID()) .secondaryOrderID(ExecutionReport_NewEncoder.secondaryOrderIDNullValue()) .ordStatus(OrdStatus.NEW) .execRestatementReason(ExecRestatementReason.NULL_VAL) .multiLegReportingType(MultiLegReportingType.NULL_VAL) .workingIndicator(Bool.NULL_VAL) .transactTime().time(System.nanoTime()); executionReport .putTradeDate(1, 2) .protectionPrice().mantissa(1234); executionReport.receivedTime().time(System.nanoTime()); executionReport.noMetricsCount(0); // (4) Commit the message - this tells Artio that it is ready to send. If an error or exception has // happened during processing then you should call connection.abort() instead of commit. connection.commit(); } } ``` -------------------------------- ### Configure FIXP Connection Exists Handler Source: https://github.com/artiofix/artio/wiki/Binary-EntryPoint-Support Implement the `onConnectionExists` callback to notify the library of a FIXP connection and request a session from the engine. This is similar to how FIX sessions are handled. ```java public Action onConnectionExists( final FixLibrary library, final long surrogateSessionId, final FixPProtocolType protocol, final FixPContext context) { final Reply reply = library.requestSession( surrogateSessionId, NO_MESSAGE_REPLAY, NO_MESSAGE_REPLAY, 5_000); replies.add(reply); return Action.CONTINUE; } ``` -------------------------------- ### Redirect Debug Output to File Source: https://github.com/artiofix/artio/wiki/Operational-Concerns Set the `fix.core.debug.file` property to redirect Artio's debug logging output to a specified file instead of standard output. ```bash -Dfix.core.debug.file=/var/log/artio.log ``` -------------------------------- ### Per FIX Connection Counter IDs Source: https://github.com/artiofix/artio/wiki/Operational-Concerns These counters provide insights into individual FIX connections. 'Bytes In Buffer' should ideally be 0 for non-slow consumers. ```text Messages Read - 10003 ``` ```text Bytes In Buffer - 10004 ``` ```text Invalid Library Attempts - 10005 ``` ```text Sent message sequence number - 10006 ``` ```text Received message sequence number - 10007 ``` -------------------------------- ### Set AWS EC2 Environment Variables Source: https://github.com/artiofix/artio/wiki/Benchmarking Set these environment variables to point to your EC2 host and key for benchmark deployment. ```sh export PEM=/path/to/pem-file.pem export EC2=ec2-.us-west-2.compute.amazonaws.com ``` -------------------------------- ### Implement FixTSessionCustomisationStrategy for FIXT Logon Source: https://github.com/artiofix/artio/wiki/Multiple-FIX-Versions This strategy customizes the Logon message for FIXT protocol versions by setting the applVerID. It requires importing specific encoder and enum types. ```java import uk.co.real_logic.artio.fixt.builder.LogonEncoder; import uk.co.real_logic.artio.fixt.ApplVerID; class FixTSessionCustomisationStrategy implements SessionCustomisationStrategy { private final ApplVerID applVerID; FixTSessionCustomisationStrategy(final ApplVerID applVerID) { this.applVerID = applVerID; } public void configureLogon(final AbstractLogonEncoder abstractLogon, final long sessionId) { if (abstractLogon instanceof LogonEncoder) { final LogonEncoder logon = (LogonEncoder)abstractLogon; logon.defaultApplVerID(applVerID.representation()); } } public void configureLogout(final AbstractLogoutEncoder logout, final long sessionId) { } } ``` -------------------------------- ### Configure FIXP Connection Acquired Handler Source: https://github.com/artiofix/artio/wiki/Binary-EntryPoint-Support Set the `fixPConnectionAcquiredHandler` to specify how to handle newly acquired FIXP connections. This handler should return a `FixPConnectionHandler`. ```java // Configuring the handler: libraryConfiguration.fixPConnectionAcquiredHandler(connection -> onAcquire((BinaryEntryPointConnection)connection)); // Handler implementation: FixPConnectionHandler onAcquire(final BinaryEntryPointConnection connection) { System.out.println(connection.key() + " logged in" + " with sessionId=" + connection.sessionId()); return new FixPExchangeSessionHandler(connection); } ``` -------------------------------- ### Configure TCP Buffer Sizes Source: https://github.com/artiofix/artio/wiki/Benchmarking Improve throughput and latency by increasing TCP buffer sizes using these Java system properties. Ensure values are set appropriately for your network environment. ```properties -Dfix.core.receiver_buffer_size=1048576 \ -Dfix.core.sender_socket_buffer_size=16777216 \ -Dfix.core.receiver_socket_buffer_size=16777216 ``` -------------------------------- ### Enable Slow Consumer Debug Logging Source: https://github.com/artiofix/artio/wiki/Slow-Consumer Configure debug logging for slow consumer events by including SLOW_CONSUMER in the debug property. This enables detailed logs for disconnects. ```properties fix.core.debug = LIBRARY_MANAGEMENT,FIX_CONNECTION,SLOW_CONSUMER,STATE_CLEANUP,CLOSE ``` -------------------------------- ### Configure Aeron Channel for Library and Engine Source: https://github.com/artiofix/artio/wiki/Frequently-Asked-Questions Set the 'aeronChannel' configuration property to configure the channel through which the Library and Engine communicate. For more detailed configuration, use the 'aeronContext' property for both Library and Engine. ```properties aeronChannel ``` ```properties aeronContext ``` -------------------------------- ### Set FIX Dictionary for Session Configuration Source: https://github.com/artiofix/artio/wiki/Multiple-FIX-Versions Specify the FIX dictionary version for a session by setting the 'fixDictionary' property of the SessionConfiguration to the generated FixDictionaryImpl class. ```java import uk.co.real_logic.artio.fixt.FixDictionaryImpl; sessionConfiguration.fixDictionary(FixDictionaryImpl.class) ``` -------------------------------- ### Retrieve JFR Recording from EC2 Source: https://github.com/artiofix/artio/wiki/Benchmarking Download the Java Flight Recorder (JFR) recording from the EC2 instance for local analysis. ```sh ./bench/get_jfr.sh ``` -------------------------------- ### Engine-wide Counter IDs Source: https://github.com/artiofix/artio/wiki/Operational-Concerns These are counter IDs for engine-wide events. Rapid increases in 'Failed Inbound' or 'Failed Outbound' indicate backpressure between FixEngine and FixLibrary. ```text Failed Inbound - 10000 ``` ```text Failed Outbound - 10001 ``` ```text Failed Replay - 10002 ``` -------------------------------- ### Check Admin Session Slow Status Source: https://github.com/artiofix/artio/wiki/Slow-Consumer Determine if a session is considered slow or not connected, intended for admin tools and offline inspection. ```java fixAdminSession.isSlow() ``` -------------------------------- ### Aeron Counter Label Format Source: https://github.com/artiofix/artio/wiki/Slow-Consumer The label format for the Aeron counter tracking slow consumer buffer usage. ```text "Quarantined bytes for {address} id = {connectionId}" ``` -------------------------------- ### Filter Threads for Logging Source: https://github.com/artiofix/artio/wiki/Operational-Concerns Specify the `fix.core.debug.thread` property to filter log output to specific threads in your system. ```bash -Dfix.core.debug.thread=my-specific-thread ``` -------------------------------- ### Print FIX Engine's Archive of Messages Source: https://github.com/artiofix/artio/wiki/Frequently-Asked-Questions Use FixArchivePrinter for a variety of options for printing FIX messages that have been logged. This is useful for inspecting the FIX Engine's archive. ```java uk.co.real_logic.artio.engine.logger.FixArchivePrinter ``` -------------------------------- ### Handle Password Fields in Received FIX Messages Source: https://github.com/artiofix/artio/wiki/Frequently-Asked-Questions Artio replaces received password field values with '***' for security. Implement AuthenticationStrategy to validate passwords and respond to UserRequest messages. ```java AuthenticationStrategy ``` ```java FixEngine ``` -------------------------------- ### Check Session Slow Consumer Status Source: https://github.com/artiofix/artio/wiki/Slow-Consumer Query the session's slow consumer status at runtime. Useful for custom monitoring or decision logic within the application. ```java session.isSlowConsumer() ``` -------------------------------- ### Scan FIX Engine's Archive Programmatically Source: https://github.com/artiofix/artio/wiki/Frequently-Asked-Questions Integrate FixArchiveScanner into your tooling to scan over the archive of FIX messages. It calls a FixMessageConsumer for each message encountered and supports filtering via FixMessagePredicate. ```java uk.co.real_logic.artio.engine.logger.FixArchiveScanner ``` ```java uk.co.real_logic.artio.engine.logger.FixMessageConsumer ``` ```java uk.co.real_logic.artio.engine.logger.FixMessagePredicate ``` ```java uk.co.real_logic.artio.engine.logger.FixMessagePredicates ``` -------------------------------- ### Allocate Aeron Counter for Buffer Usage Source: https://github.com/artiofix/artio/wiki/Slow-Consumer Engine allocates an Aeron counter to track slow consumer buffer usage. The counter is identified by FixCountersId.BYTES_IN_BUFFER_TYPE_ID and a specific label format. ```java FixCounters.bytesInBuffer(connectionId, address) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.