vert-x3 / vertx-tcp-eventbus-bridge

Apache License 2.0
49 stars 44 forks source link

BridgeEventType missing for unregister #42

Closed wem closed 5 years ago

wem commented 5 years ago

Unregister is implemented with io.vertx.ext.eventbus.bridge.tcp.impl.TcpEventBusBridgeImpl#doSendOrPub method, but missing on io.vertx.ext.eventbus.bridge.tcp.impl.TcpEventBusBridgeImpl#parseType. So it's not possible to unregister consumer. Exception:

java.lang.IllegalArgumentException: Invalid frame type unregister at io.vertx.ext.eventbus.bridge.tcp.impl.TcpEventBusBridgeImpl.parseType(TcpEventBusBridgeImpl.java:408) at io.vertx.ext.eventbus.bridge.tcp.impl.TcpEventBusBridgeImpl.lambda$handler$8(TcpEventBusBridgeImpl.java:252) at io.vertx.ext.eventbus.bridge.tcp.impl.protocol.FrameParser.handle(FrameParser.java:67) at io.vertx.ext.eventbus.bridge.tcp.impl.protocol.FrameParser.handle(FrameParser.java:30) at io.vertx.core.net.impl.NetSocketImpl$DataMessageHandler.handle(NetSocketImpl.java:384) at io.vertx.core.net.impl.NetSocketImpl.handleMessageReceived(NetSocketImpl.java:351) at io.vertx.core.net.impl.NetServerImpl$2.handleMessage(NetServerImpl.java:446) at io.vertx.core.net.impl.NetServerImpl$2.handleMessage(NetServerImpl.java:443) at io.vertx.core.net.impl.VertxHandler.lambda$channelRead$1(VertxHandler.java:146) at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl.java:337) at io.vertx.core.impl.ContextImpl.executeFromIO(ContextImpl.java:195) at io.vertx.core.net.impl.VertxHandler.channelRead(VertxHandler.java:144) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1359) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:935) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:141) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Thread.java:748)

vietj commented 5 years ago

can you provide a reproducer and patch ?

wem commented 5 years ago

I will do a PR

wem commented 5 years ago

I saw this is already fixed in 3.6.0-SNAPSHOT.