Welcome to Apache MINA


Apache MINA is a network application framework which helps users develop high performance and high scalability network applications easily. It provides an abstract ·event-driven · asynchronous API over various transports such as TCP/IP and UDP/IP via Java NIO.

Apache MINA is often called:

  • NIO framework · library,
  • client · server framework · library, or
  • a networking · socket library.

However, it's much more than that. Please take a look around the list of the features that enable rapid network application development, and what people says about MINA.

Please grab yourself a download, try our Quick Start Guide, surf our FAQ or start join us on our community

Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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 . http://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.


MINA 2.0.16 released posted on October, 31, 2016

The MINA project is pleased to announce a new bug fix release, MINA 2.0.16. It fixes a critical SSL issue, and a regression introduced in 2.0.14.

Here are the fixed issues :

Bugs :

  • DIRMINA-1043 NullPointerException after upgrade to mina 2.0.14
  • DIRMINA-1044 Non-Secure (no TLS/SSL) based client could successfully send message to secure Mina endpoint after second attempt

We urge you to switch to this version if you were using MINA 2.0.14 or any older version.

MINA 2.0.15 released posted on September, 27, 2016

The MINA project is pleased to announce a new bug fix release, MINA 2.0.15. It fixes a hang, a NPE and a few other minor issues.

Here are the fixed issues :

Bugs :

  • DIRMINA-1041 WriteFuture.await() hangs when the connection is closed remotely before await is invoked
  • DIRMINA-1047 NullPointerException in AbstractIoSession.destroy()
  • DIRMINA-1049 Error in mina-statemachine manifest prevents using it in Apache Karaf

We urge you to switch to this version if you were using MINA 2.0.15 or any older version.

MINA 2.0.14 released posted on August, 30, 2016

The MINA project is pleased to announce a new bug fix release, MINA 2.0.14. It fixes many issues, some of them being a real burden for SSHD DIRMINA-1021). Some patches were also applied (thanks to Maria Petridan).

Here are the fixed issues :

Bugs :

  • DIRMINA-760 Client fails to detect disconnection
  • DIRMINA-976 ScheduledWriteBytes Increases after Exception on Writing
  • DIRMINA-1021 MINA-CORE does not remove sessions if exceptions occur while closing
  • DIRMINA-1025 A call to session.closed(true) may still flush messages.
  • DIRMINA-1028 The supported ciphers configuration might not be used
  • DIRMINA-1029 The sent buffer is reset to its original position when using the SSL Filter after a session.write()
  • DIRMINA-1037 Throw exception in NioProcessor.write if the session is closing
  • DIRMINA-1039 Response messages queue up on the server side waiting to be written to socket, while the server continues to read more request messages, causing out of heap memory
  • DIRMINA-1042 Epoll spinning causes memory leak

Task :

  • DIRMINA-986 Update the web site to reflect the switch to git for the release process 1027) SSLHandler writes corrupt messages under heavy load

A security issue has also been fixed in this version.

We urge you to switch to this version if you were using MINA 2.0.13.

MINA 2.0.13 released posted on February, 16, 2016

Another release to fix a critical SSL bug ( a race condition which could lead to a deadlock in some corner cases).

We urge you to switch to this version if you were using MINA 2.0.12.

Bugs :

  • DIRMINA-1019 SslHandler flushScheduledEvents race condition
  • DIRMINA-1027 SSLHandler writes corrupt messages under heavy load

MINA 2.0.12 released posted on February, 07, 2016

This new release of MINA is a bug fix release. There are a few new bugs that were wound in the way we handle closure, leading to some infinite loop consuming 100% CPU, and a bad counter update forbidding the main loop to be exited.

We urge you to switch to this version if you were using MINA 2.0.11.

Bugs :

  • DIRMINA-1001 mina2.0.9 session.close cpu100%
  • DIRMINA-1006 mina2.0.9 NioProcessor thread make cpu 100%
  • DIRMINA-1024 There is no way to start a SslHandshake when the autoStart flag is set to false
  • DIRMINA-1026 Session may be removed twice from the removedSession queue

MINA 2.0.11 released posted on January, 26, 2016

This new release of MINA is a bug fix release. We have found a critical bug in the SSL Handler, that may cause a loop when dealing with big messages being transmitted over an SSL connection.

Otherwise, thee Javadoc has been cleaned.

We urge you to switch to this version if you were using MINA 2.0.10.

Bugs :

  • DIRMINA-1023 - Infinite loop in SslHandler when the AppBuffer is too small
  • DIRMINA-1022 - The IoBuffer.fill(byte, int) method does not work when byte > 0x7F

Improvements :

MINA 2.0.10 released posted on December, 16, 2015

This new release of MINA is a bug fix release. Among important fixes, we have removed a bottleneck in the way we were using Codecs, removed a deadlock in SSL when using the proxy, a race condition, and a few other things :

Bugs :

  • DIRMINA-992 - NioSocketConnector.newHandle throws the wrong exception
  • DIRMINA-994 - The ConnectionRequest.cancel() method is inconsistent wrt concurrent access
  • DIRMINA-995 - Deadlock when using SSL and proxy
  • DIRMINA-1013 -Threading model is supressed by ProtocolCodecFilter
  • DIRMINA-1016 - Regression with 2.0.9: Missing javax.net.ssl import in manifest
  • DIRMINA-1017 - SSLEngine BUFFER_OVERFLOW (unwrap)
  • DIRMINA-1019 - SslHandler flushScheduledEvents race condition

Improvements :

MINA 2.0.9 released posted on October, 25, 2014

This new release of MINA is just a bug fix release. A few issues have been fixed, one critical, inducing a 100% CPU, and one was annoying as it was generating stack traces for nothing.

You can check the list of fixes for this version there :

Release note

  • DIRMINA-921 - Maven build fails if test phase is given
  • DIRMINA-988 - 100% CPU when using IoBuffer.shrink() method in some cases
  • DIRMINA-989 - Frequent CancelledKeyException
  • DIRMINA-990 - Control flow over exceptional path in AbstractIoBuffer
  • DIRMINA-991 - Possible faster deserialization in AbstractIoBuffer object deserialization.

MINA 2.0.8 released posted on September, 22, 2014

It's 2 years we haven't had a release of MINA 2.0, it's about time.

We have tried to fix as much issues as we could in the last 3 weeks. As a result, we have closed around 90 JIRAs (fixed, postponed or simply discarded).

There is one change that might break the build for those switching from MINA 2.0.7 to MINA 2.0.8 : the IoHandler interface now has a method called inputClosed(), so either you have to implement this method if you are directly implementing the IoHandler interface, or better, you can extends IoHandlerAdapter, which implements a placeholder for this method.

You can check the list of fixes for this version there :

Release note


  • DIRMINA-539 - NioDatagramConnector doesn't takes the TrafficClass value set to his DatagramSessionConfig
  • DIRMINA-574 - ClassCastException when a message is written on a closed session.
  • DIRMINA-604 - Deadlock occurs when implementing two mina StateMachine
  • DIRMINA-639 - WriteFuture are updated long after a session.write() is done
  • DIRMINA-738 - Using IoEventQueueThrottler with a WriteRequestFilter can lead to hangs
  • DIRMINA-760 - Client fails to detect disconnection
  • DIRMINA-764 - DDOS possible in only a few seconds...
  • DIRMINA-777 - IoSessionConfig.setUseReadOperation(true) doesn't seem to work
  • DIRMINA-779 - SSLHandler can re-order data that it reads
  • DIRMINA-782 - Combination of SslFilter & FileRegionWriteFilter causes messageSent events to be lost
  • DIRMINA-785 - Half-duplex close of TCP channel
  • DIRMINA-789 - Possible Deadlock/Out of memory when sending large amounts of data using Nio
  • DIRMINA-792 - await() forever
  • DIRMINA-804 - NioDatagramAcceptor.unbind does not unbind cleanly
  • DIRMINA-805 - No cipher suites and protocols in SslFilter
  • DIRMINA-813 - Starvation occures sometimes in SerialSession#close()
  • DIRMINA-818 - Loosing connects on NioSocketConnector
  • DIRMINA-833 - LoggingFilter does not log SENT bytes when used with a ProtocolCodecFilter
  • DIRMINA-843 - NioSocketAcceptor doesnot provide an interface to input connectiontimeout parameter.
  • DIRMINA-844 - Http Proxy Authentication failed to complete (see description for exact point of failure)
  • DIRMINA-845 - ProtocolEncoderOutputImpl isn't thread-safe
  • DIRMINA-891 - SSLHandler throws SSLException during handshake that sequence number triggers
  • DIRMINA-899 - IoSession.getAttribute() doesn't store default value
  • DIRMINA-902 - Buffer read incorrectly when reading after a NEED_DATA trigger.
  • DIRMINA-905 - mina serial close
  • DIRMINA-911 - Surprising behaviour with ConnectFuture
  • DIRMINA-912 - Different instances of OrderedThreadPoolExecutor may use same task queue
  • DIRMINA-920 - HTTP server decoding is broken
  • DIRMINA-926 - IoSession IP Error when Socket Server Communicate With Microcomputer In LAN and Internet.
  • DIRMINA-928 - when client want to connect to server by binding wrong ip address,there is a bug.
  • DIRMINA-931 - HTTP header decoding is broken
  • DIRMINA-932 - HTTP Request decoding is broken if request headers are received in several messages
  • DIRMINA-933 - subtle HttpServerDecoder problems
  • DIRMINA-937 - sslfilter hangs with openjdk works with oracle?
  • DIRMINA-940 - HTTP Client decoder does not support responses without Content-Length header
  • DIRMINA-942 - Infinite loop flushing to broken pipe
  • DIRMINA-948 - Performance recession when invoke session.write concurrent
  • DIRMINA-956 - Status code match bug in AbstractHttpLogicHandler
  • DIRMINA-957 - MINA build in BlacklistFilter does not support IPV6 address
  • DIRMINA-962 - Immediate session close with a SSL filter
  • DIRMINA-963 - Socks5 and ProxyConnector don't work with InetSocketAddress.createUnresolved
  • DIRMINA-965 - HttpServerDecoder is broken in certain condition
  • DIRMINA-966 - NIO Datagram messages can get duplicated when unable to be sent by the underlying DatagramChannel
  • DIRMINA-967 - IoSession updateThroughput not automatically called
  • DIRMINA-968 - Memory leak in SSL Handshake errors
  • DIRMINA-970 - ProtocolEncoderOutputImpl.flush() occur a IllegalArgumentException
  • DIRMINA-972 - NPE during handshake on Android using SSLFilter
  • DIRMINA-973 - IllegalArgumentException thrown on ProtocolCodecFilter.flush
  • DIRMINA-976 - ScheduledWriteBytes Increases after Exception on Writing
  • DIRMINA-977 - DefaultIoFilterChain.replace does not call register/deregister
  • DIRMINA-978 - ClosedSelectorException handling in AbstractPollingIoProcessor
  • DIRMINA-980 - Missing implementation of write() method in SerialSessionImpl.SerialIoProcessor
  • DIRMINA-981 - IoBuffer GetSlice throw an IllegalArgumentException
  • DIRMINA-982 - ProtocolEncoderOutputImpl.flush() throws an IllegalArgumentException if buffers queue is empty
  • DIRMINA-983 - Problems with TextLineDecoder and special characters


  • DIRMINA-210 - Investigate removal of static methods in ByteBuffer
  • DIRMINA-237 - Improve Spring integration
  • DIRMINA-572 - Add Spring support for Mina statemachine
  • DIRMINA-586 - Dynamic delimiter support for TextLineCodecFactory
  • DIRMINA-593 - Javadoc & documentation for org/apache/mina/filter/reqres
  • DIRMINA-629 - The IoServiceStatistics methods are called for every new session creation
  • DIRMINA-631 - AbstractIoFilter: increment writen- and receivedMessages statistics on application end of filter chain
  • DIRMINA-668 - Modify the way we use IoProcessors
  • DIRMINA-682 - We need a better documentation for the ExecutorFilter [was :Writing more than one message will block until the MessageReceived as been fully proceced]
  • DIRMINA-723 - OrderedThreadPoolExecutor behavior: configurable queue size, corePoolSize, maximumPoolSize
  • DIRMINA-752 - maybe move SerialAddressEditor.class to the mina beans project
  • DIRMINA-761 - how to shutdown a mina application
  • DIRMINA-766 - Read does not exploit buffer optimally
  • DIRMINA-767 - Move encoder/decoder out of the session Attributes
  • DIRMINA-773 - org.apache.mina.filter.firewall.Subnet should consider as a subnet that contains 'all the ipv4 addresses'
  • DIRMINA-780 - Writing null objects to the Session should raise an Exception
  • DIRMINA-825 - Add host and port info to BindException thrown by NioSocketAcceptor#open
  • DIRMINA-838 - Redundant AttributeKey allocation resulting in high garbage collector activity
  • DIRMINA-913 - Add a method IoSession.isSecured() to tell the user if the SSL filter has been started or not
  • DIRMINA-921 - Maven build fails if test phase is given
  • DIRMINA-929 - AbstractPollingIoProcessor patch to mark buffer as free
  • DIRMINA-934 - Replace synchronized with a Semaphore for better performance
  • DIRMINA-941 - DefaultIoFilterChain (or any other class) should not catch Throwable without re-throwing
  • DIRMINA-945 - DefaultVmPipeSessionConfig is empty

New Feature

  • DIRMINA-23 - New transport type: non-NIO sockets
  • DIRMINA-68 - Automatic reconnect configuration for client channels.
  • DIRMINA-389 - Create a Connection Throttle Filter
  • DIRMINA-453 - Multiple IoServices for one java.nio.Selector
  • DIRMINA-485 - SCTP Transport based on APR (Apache Portable Runtime)
  • DIRMINA-489 - Composite IoBuffer
  • DIRMINA-507 - IoBuffer: Support prepending data
  • DIRMINA-554 - A hook between bind() and accept()
  • DIRMINA-655 - Add a more general purpose text based decoder
  • DIRMINA-816 - NioSocketConnector missing defaultLocalAddress
  • DIRMINA-964 - Custom NIO SelectorProvider for NioSocketAcceptor


  • DIRMINA-56 - Create a Benchmark Suite That Generates HTML Reports.
  • DIRMINA-188 - All-in-one JAR
  • DIRMINA-477 - Update page about differences between 1.x and 2.x
  • DIRMINA-721 - Get rid of multiton iohandler and netty2 codec as proposed on ML


  • DIRMINA-922 - Add a benchmark project to compare with other IO frameworks


  • DIRMINA-250 - Provide a test suite for a transport implementor.
  • DIRMINA-916 - Adding Http Status code 101 "101 Switching Protocols" in org.apache.mina.http.api.HttpStatus

MINA 2.0.7 released posted on October, 12, 2012

The Apache MINA project is pleased to announce MINA 2.0.7 ! This version is a bug fix release.

It fixes a regression introduced in MINA 2.0.5, and some performance improvements for the UDP server.

We recommend all users to upgrade to this release. We consider this a stable and production ready release.

Release note1 Release note2

MINA 2.0.5 released posted on August, 26, 2012

The Apache MINA project is pleased to announce MINA 2.0.5 ! This version is a bug fix release.

We recommend all users to upgrade to this release. We consider this a stable and production ready release.

Release note

MINA 2.0.4 released posted on August, 26, 2012

The Apache MINA project is pleased to announce MINA 2.0.4 ! This version is a bug fix release.

We recommend all users to upgrade to this release. We consider this a stable and production ready release.

Release note