I'm suggesting you take the first solution, and do this:

```scala
case e: TooLongFrameException =>
  nettyExceptionLogger.warn("Handling TooLongFrameException", e)
  val response = new DefaultHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.REQUEST_URI_TOO_LONG)
  response.setHeader("connection", "close")
  ctx.getChannel.write(response).addListener(ChannelFutureListener.CLOSE)
```

`Channel.write` wraps the message in a `DownstreamMessageEvent`, creates the channel future, etc, for you.