How to set outbound message queue size in Apache Ignite

If you want to limit outbound message queue size, you just need to create instance of TcpCommunicationSpi, and pass it to IgniteConfiguration:

public IgniteConfiguration clientIgniteConfiguration() {
    IgniteConfiguration igniteConfiguration = new IgniteConfiguration();
    TcpCommunicationSpi tcpCommunicationSpi = new TcpCommunicationSpi();
    tcpCommunicationSpi.setMessageQueueLimit(1024);
    igniteConfiguration.setCommunicationSpi(tcpCommunicationSpi);
    ...
    return igniteConfiguration;
}

If you still have any questions, feel free to ask me in the comments under this article, or write me on promark33@gmail.com.

Leave a Reply

Your email address will not be published.