Skip to content

Commit 9a8db70

Browse files
committed
Bump NIO buffers to 32 K
And change EOF message, to make it clearer. Fixes #11
1 parent b652b00 commit 9a8db70

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/main/java/com/rabbitmq/client/impl/nio/NioHelper.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class NioHelper {
2525
static int read(ReadableByteChannel channel, ByteBuffer buffer) throws IOException {
2626
int read = channel.read(buffer);
2727
if(read < 0) {
28-
throw new IOException("Channel has reached EOF");
28+
throw new IOException("I/O thread: reached EOF");
2929
}
3030
return read;
3131
}

src/main/java/com/rabbitmq/client/impl/nio/NioParams.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
public class NioParams {
2929

3030
/** size of the byte buffer used for inbound data */
31-
private int readByteBufferSize = 8192;
31+
private int readByteBufferSize = 32768;
3232

3333
/** size of the byte buffer used for outbound data */
34-
private int writeByteBufferSize = 8192;
34+
private int writeByteBufferSize = 32768;
3535

3636
/** the max number of IO threads */
3737
private int nbIoThreads = 1;
@@ -70,7 +70,7 @@ public int getReadByteBufferSize() {
7070

7171
/**
7272
* Sets the size in byte of the read {@link java.nio.ByteBuffer} used in the NIO loop.
73-
* Default is 8192.
73+
* Default is 32768.
7474
*
7575
* This parameter isn't used when using SSL/TLS, where {@link java.nio.ByteBuffer}
7676
* size is set up according to the {@link javax.net.ssl.SSLSession} packet size.
@@ -92,7 +92,7 @@ public int getWriteByteBufferSize() {
9292

9393
/**
9494
* Sets the size in byte of the write {@link java.nio.ByteBuffer} used in the NIO loop.
95-
* Default is 8192.
95+
* Default is 32768.
9696
*
9797
* This parameter isn't used when using SSL/TLS, where {@link java.nio.ByteBuffer}
9898
* size is set up according to the {@link javax.net.ssl.SSLSession} packet size.

0 commit comments

Comments
 (0)