public class PulsarProducer {
private static PulsarClient client;
private static Producer<String> producer;
public static void main(String[] args) throws Exception {
try {
client = PulsarClient.builder().serviceUrl("pulsar://mypulsar.test.com:6650")
.build();
producer = client.newProducer(Schema.STRING)
// .topic("public/dominos/coupon3")
.enableBatching(false)
//.batcherBuilder(BatcherBuilder.KEY_BASED)
.topic("my-topic").create();
startProducer3();
}catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
}
// System.exit(1);
}
private static void startProducer3() throws Exception {
for (int i = 0; i < 100; i++) {
try {
producer.newMessage().key(UUID.randomUUID().toString()).value(("message-1-" + i + "\n")).send();
System.out.println("发送成功============");
}catch (Exception e) {
e.printStackTrace();
}
Thread.sleep(5000);
}
}
private static void startProduce2() throws Exception {
while (true) {
producer.newMessage().key("key-1").value("message-1-2\n").send();
producer.newMessage().key("key-1").value("message-1-3\n").send();
producer.newMessage().key("key-2").value("message-2-1\n").send();
producer.newMessage().key("key-2").value("message-2-2\n").send();
producer.newMessage().key("key-2").value("message-2-3\n").send();
producer.newMessage().key("key-3").value("message-3-1\n").send();
producer.newMessage().key("key-3").value("message-3-2\n").send();
producer.newMessage().key("key-4").value("message-4-1\n").send();
producer.newMessage().key("key-4").value("message-4-2\n").send();
Thread.sleep(1000);
}
}
private static void startProducer() throws Exception {
// while (true){
producer.newMessage().key("key-1").value("message-1-1\n").send();
producer.newMessage().key("key-1").value("message-1-2\n").send();
producer.newMessage().key("key-1").value("message-1-3\n").send();
producer.newMessage().key("key-2").value("message-2-1\n").send();
producer.newMessage().key("key-2").value("message-2-2\n").send();
producer.newMessage().key("key-2").value("message-2-3\n").send();
producer.newMessage().key("key-3").value("message-3-1\n").send();
producer.newMessage().key("key-3").value("message-3-2\n").send();
producer.newMessage().key("key-4").value("message-4-1\n").send();
producer.newMessage().key("key-4").value("message-4-2\n").send();
Thread.sleep(1000);
// }
}
}
pulsar底层用的netty,当我们用Netty实现一个TCP client时,我们当然希望当连接断掉的时候Netty能够自动重连。
Netty Client有两种情况下需要重连:
- Netty Client启动的时候需要重连
默认重连接10次,断开
10:24:03.490 [main] DEBUG io.netty.util.internal.logging.InternalLoggerFactory - Using SLF4J as the default logging framework
10:24:03.510 [main] DEBUG io.netty.channel.MultithreadEventLoopGroup - -Dio.netty.eventLoopThreads: 8
10:24:03.548 [main] DEBUG io.netty.util.internal.InternalThreadLocalMap - -Dio.netty.threadLocalMap.stringBuilder.initialSize: 1024
10:24:03.548 [main] DEBUG io.netty.util.internal.InternalThreadLocalMap - -Dio.netty.threadLocalMap.stringBuilder.maxSize: 4096
10:24:03.560 [main] DEBUG io.netty.channel.nio.NioEventLoop - -Dio.netty.noKeySetOptimization: false
10:24:03.560 [main] DEBUG io.netty.channel.nio.NioEventLoop - -Dio.netty.selectorAutoRebuildThreshold: 512
10:24:03.597 [main] DEBUG io.netty.util.internal.PlatformDependent - Platform: Windows
10:24:03.599 [main] DEBUG io.netty.util.internal.PlatformDependent0 - -Dio.netty.noUnsafe: false
10:24:03.600 [main] DEBUG io.netty.util.internal.PlatformDependent0 - Java version: 8
10:24:03.603 [main] DEBUG io.netty.util.internal.PlatformDependent0 - sun.misc.Unsafe.theUnsafe: available
10:24:03.604 [main] DEBUG io.netty.util.internal.PlatformDependent0 - sun.misc.Unsafe.copyMemory: available
10:24:03.605 [main] DEBUG io.netty.util.internal.PlatformDependent0 - java.nio.Buffer.address: available
10:24:03.606 [main] DEBUG io.netty.util.internal.PlatformDependent0 - direct buffer constructor: available
10:24:03.608 [main] DEBUG io.netty.util.internal.PlatformDependent0 - java.nio.Bits.unaligned: available, true
10:24:03.608 [main] DEBUG io.netty.util.internal.PlatformDependent0 - jdk.internal.misc.Unsafe.allocateUninitializedArray(int): unavailable prior to Java9
10:24:03.608 [main] DEBUG io.netty.util.internal.PlatformDependent0 - java.nio.DirectByteBuffer.<init>(long, int): available
10:24:03.608 [main] DEBUG io.netty.util.internal.PlatformDependent - sun.misc.Unsafe: available
10:24:03.609 [main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.tmpdir: C:\Users\ZENGMI~1.ZHA\AppData\Local\Temp (java.io.tmpdir)
10:24:03.609 [main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.bitMode: 64 (sun.arch.data.model)
10:24:03.611 [main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.maxDirectMemory: 1877475328 bytes
10:24:03.611 [main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.uninitializedArrayAllocationThreshold: -1
10:24:03.613 [main] DEBUG io.netty.util.internal.CleanerJava6 - java.nio.ByteBuffer.cleaner(): available
10:24:03.613 [main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.noPreferDirect: false
10:24:03.666 [main] DEBUG io.netty.util.internal.PlatformDependent - org.jctools-core.MpscChunkedArrayQueue: available
10:24:03.942 [main] DEBUG org.apache.pulsar.common.allocator.PulsarByteBufAllocator - Is Pooled: true -- Exit on OOM: false
10:24:03.973 [main] DEBUG io.netty.util.ResourceLeakDetector - -Dio.netty.leakDetection.level: simple
10:24:03.973 [main] DEBUG io.netty.util.ResourceLeakDetector - -Dio.netty.leakDetection.targetRecords: 4
10:24:03.978 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.numHeapArenas: 8
10:24:03.978 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.numDirectArenas: 8
10:24:03.978 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.pageSize: 8192
10:24:03.978 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxOrder: 11
10:24:03.978 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.chunkSize: 16777216
10:24:03.978 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.tinyCacheSize: 512
10:24:03.978 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.smallCacheSize: 256
10:24:03.978 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.normalCacheSize: 64
10:24:03.979 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxCachedBufferCapacity: 32768
10:24:03.979 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.cacheTrimInterval: 8192
10:24:03.979 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.cacheTrimIntervalMillis: 0
10:24:03.979 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.useCacheForAllThreads: true
10:24:03.979 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxCachedByteBuffersPerChunk: 1023
10:24:04.027 [main] DEBUG org.apache.bookkeeper.common.allocator.impl.ByteBufAllocatorImpl - Disable Netty allocator leak detector
10:24:04.057 [main] DEBUG io.netty.util.NetUtil - -Djava.net.preferIPv4Stack: false
10:24:04.057 [main] DEBUG io.netty.util.NetUtil - -Djava.net.preferIPv6Addresses: false
10:24:04.186 [main] DEBUG io.netty.util.NetUtil - Loopback interface: lo (Software Loopback Interface 1, 127.0.0.1)
10:24:04.187 [main] DEBUG io.netty.util.NetUtil - Failed to get SOMAXCONN from sysctl and file \proc\sys\net\core\somaxconn. Default: 200
10:24:04.338 [main] DEBUG io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider - Default DNS servers: [/172.19.1.252:53, /172.19.1.2:53] (sun.net.dns.ResolverConfiguration)
10:24:04.377 [main] DEBUG io.netty.channel.DefaultChannelId - -Dio.netty.processId: 17956 (auto-detected)
10:24:04.493 [main] DEBUG io.netty.channel.DefaultChannelId - -Dio.netty.machineId: e4:b9:7a:ff:fe:25:3b:61 (auto-detected)
10:24:04.534 [main] DEBUG io.netty.buffer.ByteBufUtil - -Dio.netty.allocator.type: pooled
10:24:04.535 [main] DEBUG io.netty.buffer.ByteBufUtil - -Dio.netty.threadLocalDirectBufferSize: 0
10:24:04.535 [main] DEBUG io.netty.buffer.ByteBufUtil - -Dio.netty.maxThreadLocalCharBufferSize: 16384
10:24:04.641 [main] DEBUG io.netty.util.ResourceLeakDetectorFactory - Loaded default ResourceLeakDetector: io.netty.util.ResourceLeakDetector@402e37bc
10:24:04.710 [main] DEBUG org.apache.pulsar.client.impl.ConnectionPool - Connection for 127.0.0.1:6650 not found in cache
10:24:04.726 [pulsar-client-io-1-1] DEBUG io.netty.util.Recycler - -Dio.netty.recycler.maxCapacityPerThread: 4096
10:24:04.726 [pulsar-client-io-1-1] DEBUG io.netty.util.Recycler - -Dio.netty.recycler.maxSharedCapacityFactor: 2
10:24:04.726 [pulsar-client-io-1-1] DEBUG io.netty.util.Recycler - -Dio.netty.recycler.linkCapacity: 16
10:24:04.726 [pulsar-client-io-1-1] DEBUG io.netty.util.Recycler - -Dio.netty.recycler.ratio: 8
10:24:04.900 [pulsar-client-io-1-1] DEBUG io.netty.buffer.AbstractByteBuf - -Dio.netty.buffer.checkAccessible: true
10:24:04.900 [pulsar-client-io-1-1] DEBUG io.netty.buffer.AbstractByteBuf - -Dio.netty.buffer.checkBounds: true
10:24:04.900 [pulsar-client-io-1-1] DEBUG io.netty.util.ResourceLeakDetectorFactory - Loaded default ResourceLeakDetector: io.netty.util.ResourceLeakDetector@81a92ec
10:24:05.927 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ConnectionPool - Failed to open connection to 127.0.0.1:6650 : io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: /127.0.0.1:6650
10:24:06.039 [pulsar-external-listener-3-1] WARN org.apache.pulsar.client.impl.PulsarClientImpl - [topic: persistent://public/default/my-topic] Could not get connection while getPartitionedTopicMetadata -- Will try again in 100 ms
10:24:06.039 [pulsar-external-listener-3-1] DEBUG org.apache.pulsar.client.impl.ConnectionPool - Connection for 127.0.0.1:6650 not found in cache
10:24:07.043 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ConnectionPool - Failed to open connection to 127.0.0.1:6650 : io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: /127.0.0.1:6650
10:24:07.236 [pulsar-external-listener-3-1] WARN org.apache.pulsar.client.impl.PulsarClientImpl - [topic: persistent://public/default/my-topic] Could not get connection while getPartitionedTopicMetadata -- Will try again in 191 ms
10:24:07.239 [pulsar-external-listener-3-1] DEBUG org.apache.pulsar.client.impl.ConnectionPool - Connection for 127.0.0.1:6650 not found in cache
10:24:08.244 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ConnectionPool - Failed to open connection to 127.0.0.1:6650 : io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: /127.0.0.1:6650
10:24:08.616 [pulsar-external-listener-3-1] WARN org.apache.pulsar.client.impl.PulsarClientImpl - [topic: persistent://public/default/my-topic] Could not get connection while getPartitionedTopicMetadata -- Will try again in 370 ms
10:24:08.616 [pulsar-external-listener-3-1] DEBUG org.apache.pulsar.client.impl.ConnectionPool - Connection for 127.0.0.1:6650 not found in cache
10:24:09.619 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ConnectionPool - Failed to open connection to 127.0.0.1:6650 : io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: /127.0.0.1:6650
10:24:10.393 [pulsar-external-listener-3-1] WARN org.apache.pulsar.client.impl.PulsarClientImpl - [topic: persistent://public/default/my-topic] Could not get connection while getPartitionedTopicMetadata -- Will try again in 768 ms
10:24:10.393 [pulsar-external-listener-3-1] DEBUG org.apache.pulsar.client.impl.ConnectionPool - Connection for 127.0.0.1:6650 not found in cache
10:24:11.396 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ConnectionPool - Failed to open connection to 127.0.0.1:6650 : io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: /127.0.0.1:6650
10:24:12.928 [pulsar-external-listener-3-1] WARN org.apache.pulsar.client.impl.PulsarClientImpl - [topic: persistent://public/default/my-topic] Could not get connection while getPartitionedTopicMetadata -- Will try again in 1531 ms
10:24:12.928 [pulsar-external-listener-3-1] DEBUG org.apache.pulsar.client.impl.ConnectionPool - Connection for 127.0.0.1:6650 not found in cache
10:24:13.932 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ConnectionPool - Failed to open connection to 127.0.0.1:6650 : io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: /127.0.0.1:6650
10:24:16.889 [pulsar-external-listener-3-1] WARN org.apache.pulsar.client.impl.PulsarClientImpl - [topic: persistent://public/default/my-topic] Could not get connection while getPartitionedTopicMetadata -- Will try again in 2956 ms
10:24:16.889 [pulsar-external-listener-3-1] DEBUG org.apache.pulsar.client.impl.ConnectionPool - Connection for 127.0.0.1:6650 not found in cache
10:24:17.895 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ConnectionPool - Failed to open connection to 127.0.0.1:6650 : io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: /127.0.0.1:6650
10:24:23.710 [pulsar-external-listener-3-1] WARN org.apache.pulsar.client.impl.PulsarClientImpl - [topic: persistent://public/default/my-topic] Could not get connection while getPartitionedTopicMetadata -- Will try again in 5814 ms
10:24:23.710 [pulsar-external-listener-3-1] DEBUG org.apache.pulsar.client.impl.ConnectionPool - Connection for 127.0.0.1:6650 not found in cache
10:24:24.714 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ConnectionPool - Failed to open connection to 127.0.0.1:6650 : io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: /127.0.0.1:6650
10:24:37.364 [pulsar-external-listener-3-1] WARN org.apache.pulsar.client.impl.PulsarClientImpl - [topic: persistent://public/default/my-topic] Could not get connection while getPartitionedTopicMetadata -- Will try again in 12649 ms
10:24:37.364 [pulsar-external-listener-3-1] DEBUG org.apache.pulsar.client.impl.ConnectionPool - Connection for 127.0.0.1:6650 not found in cache
10:24:38.367 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ConnectionPool - Failed to open connection to 127.0.0.1:6650 : io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: /127.0.0.1:6650
10:24:43.990 [pulsar-external-listener-3-1] WARN org.apache.pulsar.client.impl.PulsarClientImpl - [topic: persistent://public/default/my-topic] Could not get connection while getPartitionedTopicMetadata -- Will try again in 5621 ms
10:24:43.990 [pulsar-external-listener-3-1] DEBUG org.apache.pulsar.client.impl.ConnectionPool - Connection for 127.0.0.1:6650 not found in cache
10:24:44.993 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ConnectionPool - Failed to open connection to 127.0.0.1:6650 : io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: /127.0.0.1:6650
Exception in thread "main" 10:24:44.993 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.PulsarClientImpl - [my-topic] Failed to get partitioned topic metadata: org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.CompletionException: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: /127.0.0.1:6650
org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.ExecutionException: org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.CompletionException: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: /127.0.0.1:6650
at org.apache.pulsar.client.api.PulsarClientException.unwrap(PulsarClientException.java:719)
at org.apache.pulsar.client.impl.ProducerBuilderImpl.create(ProducerBuilderImpl.java:93)
at com.dominos.cloud.mq.PulsarProducer.main(PulsarProducer.java:23)
Caused by: java.util.concurrent.ExecutionException: org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.CompletionException: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: /127.0.0.1:6650
at java.util.concurrent.CompletableFuture.reportGet(Unknown Source)
at java.util.concurrent.CompletableFuture.get(Unknown Source)
at org.apache.pulsar.client.impl.ProducerBuilderImpl.create(ProducerBuilderImpl.java:91)
... 1 more
Caused by: org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.CompletionException: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: /127.0.0.1:6650
at org.apache.pulsar.client.impl.ConnectionPool.lambda$null$9(ConnectionPool.java:203)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:497)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Unknown Source)
Caused by: java.util.concurrent.CompletionException: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: /127.0.0.1:6650
at java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source)
at java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source)
at java.util.concurrent.CompletableFuture.uniAccept(Unknown Source)
at java.util.concurrent.CompletableFuture$UniAccept.tryFire(Unknown Source)
at java.util.concurrent.CompletableFuture.postComplete(Unknown Source)
at java.util.concurrent.CompletableFuture.completeExceptionally(Unknown Source)
at org.apache.pulsar.client.impl.ConnectionPool.lambda$connectToAddress$17(ConnectionPool.java:276)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:577)
at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:570)
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:549)
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:490)
at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:615)
at io.netty.util.concurrent.DefaultPromise.setFailure0(DefaultPromise.java:608)
at io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:117)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.fulfillConnectPromise(AbstractNioChannel.java:321)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:337)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:702)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
... 4 more
Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: /127.0.0.1:6650
Caused by: java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:330)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:702)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Unknown Source)
2.在程序运行中连接断掉需要重连。
一直重连直到连接成功
11:17:05.655 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Sending message cnx org.apache.pulsar.client.impl.ClientCnx@3094cc36, sequenceId 2
11:17:24.558 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ClientCnx - [mypulsar.test.com/10.23.191.242:6650] Got exception IOException : 远程主机强迫关闭了一个现有的连接。
java.io.IOException: 远程主机强迫关闭了一个现有的连接。
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(Unknown Source)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.read(Unknown Source)
at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:253)
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1133)
at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:350)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Unknown Source)
11:17:24.559 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ConnectionPool - Removing closed connection from pool: AbstractChannel$CloseFuture@5c01f5d6(success)
11:17:24.561 [pulsar-client-io-1-1] INFO org.apache.pulsar.client.impl.ClientCnx - [id: 0x0474e9d6, L:/172.19.1.198:64155 ! R:mypulsar.test.com/10.23.191.242:6650] Disconnected
11:17:24.569 [pulsar-client-io-1-1] INFO org.apache.pulsar.client.impl.ConnectionHandler - [my-topic] [standalone-5-27] Closed connection [id: 0x0474e9d6, L:/172.19.1.198:64155 ! R:mypulsar.test.com/10.23.191.242:6650] -- Will try again in 0.1 s
11:17:24.673 [pulsar-timer-4-1] INFO org.apache.pulsar.client.impl.ConnectionHandler - [my-topic] [standalone-5-27] Reconnecting after timeout
11:17:25.002 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarHandler - [[id: 0x91bae236, L:/172.19.1.198:64154 - R:mypulsar.test.com/10.23.191.242:6650]] Sending ping message
11:17:35.653 [pulsar-timer-4-1] INFO org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Message send timed out. Failing 1 messages
org.apache.pulsar.client.api.PulsarClientException$TimeoutException: The producer standalone-5-27 can not send message to the topic my-topic within given timeout
at org.apache.pulsar.client.api.PulsarClientException.unwrap(PulsarClientException.java:667)
at org.apache.pulsar.client.impl.ProducerBase.send(ProducerBase.java:117)
at org.apache.pulsar.client.impl.TypedMessageBuilderImpl.send(TypedMessageBuilderImpl.java:89)
at com.dominos.cloud.mq.PulsarProducer.startProducer3(PulsarProducer.java:43)
at com.dominos.cloud.mq.PulsarProducer.main(PulsarProducer.java:29)
11:17:40.656 [main] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Connection is not ready -- sequenceId 3
11:17:43.798 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ClientCnx - [mypulsar.test.com/10.23.191.242:6650] Got exception IOException : 远程主机强迫关闭了一个现有的连接。
java.io.IOException: 远程主机强迫关闭了一个现有的连接。
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(Unknown Source)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.read(Unknown Source)
at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:253)
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1133)
at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:350)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Unknown Source)
11:17:43.798 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ConnectionPool - Removing closed connection from pool: AbstractChannel$CloseFuture@2304c075(success)
11:17:43.799 [pulsar-client-io-1-1] INFO org.apache.pulsar.client.impl.ClientCnx - [id: 0x91bae236, L:/172.19.1.198:64154 ! R:mypulsar.test.com/10.23.191.242:6650] Disconnected
11:17:43.799 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.BinaryProtoLookupService - [persistent://public/default/my-topic] failed to send lookup request : org.apache.pulsar.client.api.PulsarClientException: Disconnected from server at mypulsar.test.com/10.23.191.242:6650
11:17:43.799 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.BinaryProtoLookupService - [persistent://public/default/my-topic] Lookup response exception: {}
java.util.concurrent.CompletionException: org.apache.pulsar.client.api.PulsarClientException: Disconnected from server at mypulsar.test.com/10.23.191.242:6650
at java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source)
at java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source)
at java.util.concurrent.CompletableFuture.uniAccept(Unknown Source)
at java.util.concurrent.CompletableFuture$UniAccept.tryFire(Unknown Source)
at java.util.concurrent.CompletableFuture.postComplete(Unknown Source)
at java.util.concurrent.CompletableFuture.completeExceptionally(Unknown Source)
at org.apache.pulsar.client.impl.ClientCnx.lambda$channelInactive$3(ClientCnx.java:235)
at org.apache.pulsar.common.util.collections.ConcurrentLongHashMap$Section.forEach(ConcurrentLongHashMap.java:427)
at org.apache.pulsar.common.util.collections.ConcurrentLongHashMap.forEach(ConcurrentLongHashMap.java:163)
at org.apache.pulsar.client.impl.ClientCnx.channelInactive(ClientCnx.java:235)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241)
at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:386)
at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:351)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelInactive(DefaultChannelPipeline.java:1405)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
at io.netty.channel.DefaultChannelPipeline.fireChannelInactive(DefaultChannelPipeline.java:901)
at io.netty.channel.AbstractChannel$AbstractUnsafe$8.run(AbstractChannel.java:818)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:497)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.pulsar.client.api.PulsarClientException: Disconnected from server at mypulsar.test.com/10.23.191.242:6650
at org.apache.pulsar.client.impl.ClientCnx.channelInactive(ClientCnx.java:231)
... 20 common frames omitted
11:17:43.800 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ConnectionHandler - [my-topic] [standalone-5-27] Error connecting to broker: org.apache.pulsar.client.api.PulsarClientException: Disconnected from server at mypulsar.test.com/10.23.191.242:6650
11:17:43.800 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ConnectionHandler - [my-topic] [standalone-5-27] Could not get connection to broker: org.apache.pulsar.client.api.PulsarClientException: Disconnected from server at mypulsar.test.com/10.23.191.242:6650 -- Will try again in 0.194 s
11:17:43.997 [pulsar-timer-4-1] INFO org.apache.pulsar.client.impl.ConnectionHandler - [my-topic] [standalone-5-27] Reconnecting after connection was closed
11:17:43.997 [pulsar-timer-4-1] DEBUG org.apache.pulsar.client.impl.ConnectionPool - Connection for mypulsar.test.com:6650 not found in cache
11:17:44.000 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ConnectionPool - Failed to open connection to mypulsar.test.com:6650 : io.netty.channel.AbstractChannel$AnnotatedNoRouteToHostException: No route to host: no further information: mypulsar.test.com/10.23.191.242:6650
11:17:44.000 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ConnectionHandler - [my-topic] [standalone-5-27] Error connecting to broker: org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.CompletionException: io.netty.channel.AbstractChannel$AnnotatedNoRouteToHostException: No route to host: no further information: mypulsar.test.com/10.23.191.242:6650
11:17:44.000 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ConnectionHandler - [my-topic] [standalone-5-27] Could not get connection to broker: org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.CompletionException: io.netty.channel.AbstractChannel$AnnotatedNoRouteToHostException: No route to host: no further information: mypulsar.test.com/10.23.191.242:6650 -- Will try again in 0.389 s
11:17:44.392 [pulsar-timer-4-1] INFO org.apache.pulsar.client.impl.ConnectionHandler - [my-topic] [standalone-5-27] Reconnecting after connection was closed
11:17:44.392 [pulsar-timer-4-1] DEBUG org.apache.pulsar.client.impl.ConnectionPool - Connection for mypulsar.test.com:6650 not found in cache
11:17:44.393 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ConnectionPool - Failed to open connection to mypulsar.test.com:6650 : io.netty.channel.AbstractChannel$AnnotatedNoRouteToHostException: No route to host: no further information: mypulsar.test.com/10.23.191.242:6650
11:17:44.394 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ConnectionHandler - [my-topic] [standalone-5-27] Error connecting to broker: org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.CompletionException: io.netty.channel.AbstractChannel$AnnotatedNoRouteToHostException: No route to host: no further information: mypulsar.test.com/10.23.191.242:6650
11:17:44.394 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ConnectionHandler - [my-topic] [standalone-5-27] Could not get connection to broker: org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.CompletionException: io.netty.channel.AbstractChannel$AnnotatedNoRouteToHostException: No route to host: no further information: mypulsar.test.com/10.23.191.242:6650 -- Will try again in 0.722 s
11:17:45.118 [pulsar-timer-4-1] INFO org.apache.pulsar.client.impl.ConnectionHandler - [my-topic] [standalone-5-27] Reconnecting after connection was closed
11:17:45.119 [pulsar-timer-4-1] DEBUG org.apache.pulsar.client.impl.ConnectionPool - Connection for mypulsar.test.com:6650 not found in cache
11:17:45.120 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ConnectionPool - Failed to open connection to mypulsar.test.com:6650 : io.netty.channel.AbstractChannel$AnnotatedNoRouteToHostException: No route to host: no further information: mypulsar.test.com/10.23.191.242:6650
11:17:45.121 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ConnectionHandler - [my-topic] [standalone-5-27] Error connecting to broker: org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.CompletionException: io.netty.channel.AbstractChannel$AnnotatedNoRouteToHostException: No route to host: no further information: mypulsar.test.com/10.23.191.242:6650
11:17:45.121 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ConnectionHandler - [my-topic] [standalone-5-27] Could not get connection to broker: org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.CompletionException: io.netty.channel.AbstractChannel$AnnotatedNoRouteToHostException: No route to host: no further information: mypulsar.test.com/10.23.191.242:6650 -- Will try again in 1.484 s
11:17:46.608 [pulsar-timer-4-1] INFO org.apache.pulsar.client.impl.ConnectionHandler - [my-topic] [standalone-5-27] Reconnecting after connection was closed
11:17:46.608 [pulsar-timer-4-1] DEBUG org.apache.pulsar.client.impl.ConnectionPool - Connection for mypulsar.test.com:6650 not found in cache
11:17:46.609 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ConnectionPool - Failed to open connection to mypulsar.test.com:6650 : io.netty.channel.AbstractChannel$AnnotatedNoRouteToHostException: No route to host: no further information: mypulsar.test.com/10.23.191.242:6650
11:17:46.609 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ConnectionHandler - [my-topic] [standalone-5-27] Error connecting to broker: org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.CompletionException: io.netty.channel.AbstractChannel$AnnotatedNoRouteToHostException: No route to host: no further information: mypulsar.test.com/10.23.191.242:6650
11:17:46.609 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ConnectionHandler - [my-topic] [standalone-5-27] Could not get connection to broker: org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.CompletionException: io.netty.channel.AbstractChannel$AnnotatedNoRouteToHostException: No route to host: no further information: mypulsar.test.com/10.23.191.242:6650 -- Will try again in 2.962 s
11:17:49.572 [pulsar-timer-4-1] INFO org.apache.pulsar.client.impl.ConnectionHandler - [my-topic] [standalone-5-27] Reconnecting after connection was closed
11:17:49.572 [pulsar-timer-4-1] DEBUG org.apache.pulsar.client.impl.ConnectionPool - Connection for mypulsar.test.com:6650 not found in cache
11:17:49.573 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ConnectionPool - Failed to open connection to mypulsar.test.com:6650 : io.netty.channel.AbstractChannel$AnnotatedNoRouteToHostException: No route to host: no further information: mypulsar.test.com/10.23.191.242:6650
11:17:49.573 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ConnectionHandler - [my-topic] [standalone-5-27] Error connecting to broker: org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.CompletionException: io.netty.channel.AbstractChannel$AnnotatedNoRouteToHostException: No route to host: no further information: mypulsar.test.com/10.23.191.242:6650
11:17:49.573 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ConnectionHandler - [my-topic] [standalone-5-27] Could not get connection to broker: org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.CompletionException: io.netty.channel.AbstractChannel$AnnotatedNoRouteToHostException: No route to host: no further information: mypulsar.test.com/10.23.191.242:6650 -- Will try again in 4.64 s
11:17:54.215 [pulsar-timer-4-1] INFO org.apache.pulsar.client.impl.ConnectionHandler - [my-topic] [standalone-5-27] Reconnecting after connection was closed
11:17:54.215 [pulsar-timer-4-1] DEBUG org.apache.pulsar.client.impl.ConnectionPool - Connection for mypulsar.test.com:6650 not found in cache
11:17:54.216 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ConnectionPool - Failed to open connection to mypulsar.test.com:6650 : io.netty.channel.AbstractChannel$AnnotatedNoRouteToHostException: No route to host: no further information: mypulsar.test.com/10.23.191.242:6650
11:17:54.216 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ConnectionHandler - [my-topic] [standalone-5-27] Error connecting to broker: org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.CompletionException: io.netty.channel.AbstractChannel$AnnotatedNoRouteToHostException: No route to host: no further information: mypulsar.test.com/10.23.191.242:6650
11:17:54.217 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ConnectionHandler - [my-topic] [standalone-5-27] Could not get connection to broker: org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.CompletionException: io.netty.channel.AbstractChannel$AnnotatedNoRouteToHostException: No route to host: no further information: mypulsar.test.com/10.23.191.242:6650 -- Will try again in 11.585 s
11:17:55.475 [pulsar-timer-4-1] INFO org.apache.pulsar.client.impl.ProducerStatsRecorderImpl - [my-topic] [standalone-5-27] Pending messages: 1 --- Publish throughput: 0.05 msg/s --- 0.00 Mbit/s --- Latency: med: 0.045 ms - 95pct: 0.045 ms - 99pct: 0.045 ms - 99.9pct: 0.045 ms - max: 0.045 ms --- Ack received rate: 0.03 ack/s --- Failed messages: 1
11:18:05.804 [pulsar-timer-4-1] INFO org.apache.pulsar.client.impl.ConnectionHandler - [my-topic] [standalone-5-27] Reconnecting after connection was closed
11:18:05.804 [pulsar-timer-4-1] DEBUG org.apache.pulsar.client.impl.ConnectionPool - Connection for mypulsar.test.com:6650 not found in cache
11:18:05.817 [pulsar-client-io-1-1] INFO org.apache.pulsar.client.impl.ConnectionPool - [[id: 0xba82432c, L:/172.19.1.198:64259 - R:mypulsar.test.com/10.23.191.242:6650]] Connected to server
11:18:05.817 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarHandler - [[id: 0xba82432c, L:/172.19.1.198:64259 - R:mypulsar.test.com/10.23.191.242:6650]] Scheduling keep-alive task every 30 s
11:18:05.817 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ClientCnx - [id: 0xba82432c, L:/172.19.1.198:64259 - R:mypulsar.test.com/10.23.191.242:6650] Connected to broker
11:18:05.818 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ClientCnx - Complete: true
11:18:05.833 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [mypulsar.test.com/10.23.191.242:6650] Received cmd CONNECTED
11:18:05.833 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ClientCnx - [id: 0xba82432c, L:/172.19.1.198:64259 - R:mypulsar.test.com/10.23.191.242:6650] Connection has max message size setting, replace old frameDecoder with server frame size 5242880
11:18:05.833 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ClientCnx - [id: 0xba82432c, L:/172.19.1.198:64259 - R:mypulsar.test.com/10.23.191.242:6650] Connection is ready
11:18:05.833 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ConnectionPool - [[id: 0xba82432c, L:/172.19.1.198:64259 - R:mypulsar.test.com/10.23.191.242:6650]] Connection handshake completed
11:18:05.852 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [mypulsar.test.com/10.23.191.242:6650] Received cmd LOOKUP_RESPONSE
11:18:05.852 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ClientCnx - Received Broker lookup response: Connect
11:18:05.853 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ConnectionPool - Connection for localhost:6650 not found in cache
11:18:05.864 [pulsar-client-io-1-1] INFO org.apache.pulsar.client.impl.ConnectionPool - [[id: 0x7c46e8dd, L:/172.19.1.198:64260 - R:mypulsar.test.com/10.23.191.242:6650]] Connected to server
11:18:05.864 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarHandler - [[id: 0x7c46e8dd, L:/172.19.1.198:64260 - R:mypulsar.test.com/10.23.191.242:6650]] Scheduling keep-alive task every 30 s
11:18:05.864 [pulsar-client-io-1-1] INFO org.apache.pulsar.client.impl.ClientCnx - [id: 0x7c46e8dd, L:/172.19.1.198:64260 - R:mypulsar.test.com/10.23.191.242:6650] Connected through proxy to target broker at localhost:6650
11:18:05.865 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ClientCnx - Complete: true
11:18:05.916 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [mypulsar.test.com/10.23.191.242:6650] Received cmd CONNECTED
11:18:05.917 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ClientCnx - [id: 0x7c46e8dd, L:/172.19.1.198:64260 - R:mypulsar.test.com/10.23.191.242:6650] Connection has max message size setting, replace old frameDecoder with server frame size 5242880
11:18:05.917 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ClientCnx - [id: 0x7c46e8dd, L:/172.19.1.198:64260 - R:mypulsar.test.com/10.23.191.242:6650] Connection is ready
11:18:05.917 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ConnectionPool - [[id: 0x7c46e8dd, L:/172.19.1.198:64260 - R:mypulsar.test.com/10.23.191.242:6650]] Connection handshake completed
11:18:05.917 [pulsar-client-io-1-1] INFO org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Creating producer on cnx [id: 0x7c46e8dd, L:/172.19.1.198:64260 - R:mypulsar.test.com/10.23.191.242:6650]
11:18:05.935 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [mypulsar.test.com/10.23.191.242:6650] Received cmd PRODUCER_SUCCESS
11:18:05.935 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ClientCnx - [id: 0x7c46e8dd, L:/172.19.1.198:64260 - R:mypulsar.test.com/10.23.191.242:6650] Received producer success response from server: 5 - producer-name: standalone-5-27
11:18:05.935 [pulsar-client-io-1-1] INFO org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Created producer on cnx [id: 0x7c46e8dd, L:/172.19.1.198:64260 - R:mypulsar.test.com/10.23.191.242:6650]
11:18:05.935 [pulsar-client-io-1-1] INFO org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Re-Sending 1 messages to server
11:18:05.935 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Re-Sending message in cnx [id: 0x7c46e8dd, L:/172.19.1.198:64260 - R:mypulsar.test.com/10.23.191.242:6650], sequenceId 3
11:18:05.953 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [mypulsar.test.com/10.23.191.242:6650] Received cmd SEND_RECEIPT
11:18:05.953 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ClientCnx - [id: 0x7c46e8dd, L:/172.19.1.198:64260 - R:mypulsar.test.com/10.23.191.242:6650] Got receipt for producer: 0 -- msg: 3 -- id: 78141:42
11:18:05.953 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Received ack for msg 3
发送成功============
11:18:10.954 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Sending message cnx org.apache.pulsar.client.impl.ClientCnx@470f8de3, sequenceId 4
11:18:10.972 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [mypulsar.test.com/10.23.191.242:6650] Received cmd SEND_RECEIPT
11:18:10.972 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ClientCnx - [id: 0x7c46e8dd, L:/172.19.1.198:64260 - R:mypulsar.test.com/10.23.191.242:6650] Got receipt for producer: 0 -- msg: 4 -- id: 78141:43
11:18:10.972 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Received ack for msg 4
发送成功============
11:18:15.972 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Sending message cnx org.apache.pulsar.client.impl.ClientCnx@470f8de3, sequenceId 5
11:18:15.990 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [mypulsar.test.com/10.23.191.242:6650] Received cmd SEND_RECEIPT
11:18:15.990 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ClientCnx - [id: 0x7c46e8dd, L:/172.19.1.198:64260 - R:mypulsar.test.com/10.23.191.242:6650] Got receipt for producer: 0 -- msg: 5 -- id: 78141:44
11:18:15.991 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Received ack for msg 5
发送成功============
11:18:20.992 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Sending message cnx org.apache.pulsar.client.impl.ClientCnx@470f8de3, sequenceId 6
11:18:21.013 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [mypulsar.test.com/10.23.191.242:6650] Received cmd SEND_RECEIPT
11:18:21.013 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ClientCnx - [id: 0x7c46e8dd, L:/172.19.1.198:64260 - R:mypulsar.test.com/10.23.191.242:6650] Got receipt for producer: 0 -- msg: 6 -- id: 78141:45
11:18:21.014 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Received ack for msg 6
发送成功============
11:18:26.014 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Sending message cnx org.apache.pulsar.client.impl.ClientCnx@470f8de3, sequenceId 7
11:18:26.030 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [mypulsar.test.com/10.23.191.242:6650] Received cmd SEND_RECEIPT
11:18:26.030 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ClientCnx - [id: 0x7c46e8dd, L:/172.19.1.198:64260 - R:mypulsar.test.com/10.23.191.242:6650] Got receipt for producer: 0 -- msg: 7 -- id: 78141:46
11:18:26.030 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Received ack for msg 7
发送成功============
11:18:31.031 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Sending message cnx org.apache.pulsar.client.impl.ClientCnx@470f8de3, sequenceId 8
11:18:31.050 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [mypulsar.test.com/10.23.191.242:6650] Received cmd SEND_RECEIPT
11:18:31.051 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ClientCnx - [id: 0x7c46e8dd, L:/172.19.1.198:64260 - R:mypulsar.test.com/10.23.191.242:6650] Got receipt for producer: 0 -- msg: 8 -- id: 78141:47
11:18:31.051 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Received ack for msg 8
发送成功============
11:18:35.818 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarHandler - [[id: 0xba82432c, L:/172.19.1.198:64259 - R:mypulsar.test.com/10.23.191.242:6650]] Sending ping message
11:18:35.832 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [mypulsar.test.com/10.23.191.242:6650] Received cmd PING
11:18:35.833 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarHandler - [[id: 0xba82432c, L:/172.19.1.198:64259 - R:mypulsar.test.com/10.23.191.242:6650]] Replying back to ping message
11:18:35.835 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [mypulsar.test.com/10.23.191.242:6650] Received cmd PONG
11:18:35.865 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarHandler - [[id: 0x7c46e8dd, L:/172.19.1.198:64260 - R:mypulsar.test.com/10.23.191.242:6650]] Sending ping message
11:18:35.876 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [mypulsar.test.com/10.23.191.242:6650] Received cmd PING
11:18:35.876 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarHandler - [[id: 0x7c46e8dd, L:/172.19.1.198:64260 - R:mypulsar.test.com/10.23.191.242:6650]] Replying back to ping message
11:18:35.883 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [mypulsar.test.com/10.23.191.242:6650] Received cmd PONG
11:18:36.052 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Sending message cnx org.apache.pulsar.client.impl.ClientCnx@470f8de3, sequenceId 9
11:18:36.067 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [mypulsar.test.com/10.23.191.242:6650] Received cmd SEND_RECEIPT
11:18:36.067 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ClientCnx - [id: 0x7c46e8dd, L:/172.19.1.198:64260 - R:mypulsar.test.com/10.23.191.242:6650] Got receipt for producer: 0 -- msg: 9 -- id: 78141:48
11:18:36.067 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Received ack for msg 9
发送成功============
11:18:41.067 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Sending message cnx org.apache.pulsar.client.impl.ClientCnx@470f8de3, sequenceId 10
11:18:41.086 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [mypulsar.test.com/10.23.191.242:6650] Received cmd SEND_RECEIPT
11:18:41.086 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ClientCnx - [id: 0x7c46e8dd, L:/172.19.1.198:64260 - R:mypulsar.test.com/10.23.191.242:6650] Got receipt for producer: 0 -- msg: 10 -- id: 78141:49
11:18:41.086 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Received ack for msg 10
发送成功============
11:18:46.088 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Sending message cnx org.apache.pulsar.client.impl.ClientCnx@470f8de3, sequenceId 11
11:18:46.105 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [mypulsar.test.com/10.23.191.242:6650] Received cmd SEND_RECEIPT
11:18:46.105 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ClientCnx - [id: 0x7c46e8dd, L:/172.19.1.198:64260 - R:mypulsar.test.com/10.23.191.242:6650] Got receipt for producer: 0 -- msg: 11 -- id: 78141:50
11:18:46.105 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Received ack for msg 11
发送成功============
11:18:51.106 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Sending message cnx org.apache.pulsar.client.impl.ClientCnx@470f8de3, sequenceId 12
11:18:51.121 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [mypulsar.test.com/10.23.191.242:6650] Received cmd SEND_RECEIPT
11:18:51.121 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ClientCnx - [id: 0x7c46e8dd, L:/172.19.1.198:64260 - R:mypulsar.test.com/10.23.191.242:6650] Got receipt for producer: 0 -- msg: 12 -- id: 78141:51
11:18:51.121 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Received ack for msg 12
发送成功============
11:18:55.480 [pulsar-timer-4-1] INFO org.apache.pulsar.client.impl.ProducerStatsRecorderImpl - [my-topic] [standalone-5-27] Pending messages: 0 --- Publish throughput: 0.17 msg/s --- 0.00 Mbit/s --- Latency: med: 0.018 ms - 95pct: 25.298 ms - 99pct: 25.298 ms - 99.9pct: 25.298 ms - max: 25.298 ms --- Ack received rate: 0.17 ack/s --- Failed messages: 0
11:18:56.122 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Sending message cnx org.apache.pulsar.client.impl.ClientCnx@470f8de3, sequenceId 13
11:18:56.140 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [mypulsar.test.com/10.23.191.242:6650] Received cmd SEND_RECEIPT
11:18:56.140 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ClientCnx - [id: 0x7c46e8dd, L:/172.19.1.198:64260 - R:mypulsar.test.com/10.23.191.242:6650] Got receipt for producer: 0 -- msg: 13 -- id: 78141:52
11:18:56.140 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Received ack for msg 13
发送成功============
11:19:01.142 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Sending message cnx org.apache.pulsar.client.impl.ClientCnx@470f8de3, sequenceId 14
11:19:01.160 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [mypulsar.test.com/10.23.191.242:6650] Received cmd SEND_RECEIPT
11:19:01.160 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ClientCnx - [id: 0x7c46e8dd, L:/172.19.1.198:64260 - R:mypulsar.test.com/10.23.191.242:6650] Got receipt for producer: 0 -- msg: 14 -- id: 78141:53
11:19:01.160 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Received ack for msg 14
发送成功============
11:19:05.820 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarHandler - [[id: 0xba82432c, L:/172.19.1.198:64259 - R:mypulsar.test.com/10.23.191.242:6650]] Sending ping message
11:19:05.833 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [mypulsar.test.com/10.23.191.242:6650] Received cmd PING
11:19:05.834 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarHandler - [[id: 0xba82432c, L:/172.19.1.198:64259 - R:mypulsar.test.com/10.23.191.242:6650]] Replying back to ping message
11:19:05.837 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [mypulsar.test.com/10.23.191.242:6650] Received cmd PONG
11:19:05.866 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarHandler - [[id: 0x7c46e8dd, L:/172.19.1.198:64260 - R:mypulsar.test.com/10.23.191.242:6650]] Sending ping message
11:19:05.880 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [mypulsar.test.com/10.23.191.242:6650] Received cmd PING
11:19:05.880 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarHandler - [[id: 0x7c46e8dd, L:/172.19.1.198:64260 - R:mypulsar.test.com/10.23.191.242:6650]] Replying back to ping message
11:19:05.881 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [mypulsar.test.com/10.23.191.242:6650] Received cmd PONG
11:19:06.162 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Sending message cnx org.apache.pulsar.client.impl.ClientCnx@470f8de3, sequenceId 15
11:19:06.182 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [mypulsar.test.com/10.23.191.242:6650] Received cmd SEND_RECEIPT
11:19:06.182 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ClientCnx - [id: 0x7c46e8dd, L:/172.19.1.198:64260 - R:mypulsar.test.com/10.23.191.242:6650] Got receipt for producer: 0 -- msg: 15 -- id: 78141:54
11:19:06.182 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Received ack for msg 15
发送成功============
11:19:11.185 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Sending message cnx org.apache.pulsar.client.impl.ClientCnx@470f8de3, sequenceId 16
11:19:11.203 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [mypulsar.test.com/10.23.191.242:6650] Received cmd SEND_RECEIPT
11:19:11.204 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ClientCnx - [id: 0x7c46e8dd, L:/172.19.1.198:64260 - R:mypulsar.test.com/10.23.191.242:6650] Got receipt for producer: 0 -- msg: 16 -- id: 78141:55
11:19:11.204 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Received ack for msg 16
发送成功============
11:19:16.205 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Sending message cnx org.apache.pulsar.client.impl.ClientCnx@470f8de3, sequenceId 17
11:19:16.224 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [mypulsar.test.com/10.23.191.242:6650] Received cmd SEND_RECEIPT
11:19:16.224 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ClientCnx - [id: 0x7c46e8dd, L:/172.19.1.198:64260 - R:mypulsar.test.com/10.23.191.242:6650] Got receipt for producer: 0 -- msg: 17 -- id: 78141:56
11:19:16.224 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Received ack for msg 17
发送成功============
11:19:21.226 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Sending message cnx org.apache.pulsar.client.impl.ClientCnx@470f8de3, sequenceId 18
11:19:21.246 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [mypulsar.test.com/10.23.191.242:6650] Received cmd SEND_RECEIPT
11:19:21.247 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ClientCnx - [id: 0x7c46e8dd, L:/172.19.1.198:64260 - R:mypulsar.test.com/10.23.191.242:6650] Got receipt for producer: 0 -- msg: 18 -- id: 78141:57
11:19:21.247 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Received ack for msg 18
发送成功============
11:19:26.248 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Sending message cnx org.apache.pulsar.client.impl.ClientCnx@470f8de3, sequenceId 19
11:19:26.268 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [mypulsar.test.com/10.23.191.242:6650] Received cmd SEND_RECEIPT
11:19:26.268 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ClientCnx - [id: 0x7c46e8dd, L:/172.19.1.198:64260 - R:mypulsar.test.com/10.23.191.242:6650] Got receipt for producer: 0 -- msg: 19 -- id: 78141:58
11:19:26.268 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Received ack for msg 19
发送成功============
11:19:31.271 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Sending message cnx org.apache.pulsar.client.impl.ClientCnx@470f8de3, sequenceId 20
11:19:31.286 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.common.protocol.PulsarDecoder - [mypulsar.test.com/10.23.191.242:6650] Received cmd SEND_RECEIPT
11:19:31.286 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ClientCnx - [id: 0x7c46e8dd, L:/172.19.1.198:64260 - R:mypulsar.test.com/10.23.191.242:6650] Got receipt for producer: 0 -- msg: 20 -- id: 78141:59
11:19:31.286 [pulsar-client-io-1-1] DEBUG org.apache.pulsar.client.impl.ProducerImpl - [my-topic] [standalone-5-27] Received ack for msg 20
发送成功============
来源:oschina
链接:https://my.oschina.net/xiaominmin/blog/4331025