[rabbitmq-discuss] EOFException when messages in queue

Ben Hood 0x6e6562 at gmail.com
Mon Sep 1 01:39:10 BST 2008

Hi Bradford,

On Sun, Aug 31, 2008 at 8:34 PM, bradford <fingermark at gmail.com> wrote:
> I'm running the AMQPExampleFunPack.actorExample scala example from:
> http://github.com/dpp/liftweb/tree/master/lift-amqp/src/main/scala/net/liftweb/amqp/AMQPSender.scala
> It was working great until I shutdown the client listeners and
> RabbitMQ queued up 2 messages.

This would be expected behaviour if a client dies. The broker will
queue up messages for them until they re-connect and start consuming

> Now when I run the
> AMQPExampleFunPack.actorExample scala example I get an EOFException.
> My questions are 1) is it possible to clear a queue ("routeroute") in
> RabbitMQ w/o writing code for it?

Using the protocol/API client you can purge a queue using the
queue.purge command.

Other than that, queue purging is not exposed in the rabbitmqctl
script, but there is an ongoing discussion about management within
Rabbit, so you could participate in that with this requirement.

If you would like to issue an Rabbit native call in Erlang, either in
the VM that the server is running in or via a remote shell, you call
rabbitmq_amqueue:lookup/1 to get the PID of a queue and then call
rabbitmq_amqueue:purge/1 with the result.

>2) Is there anything obvious I need
> to do to fix the exception, in the event that messages queue up in the
> future?

See point above.

> [WARNING] Consumer com.newpers.amqp.SerializedConsumer at 337d0f method
> handleDelivery for channel
> AMQChannel(amqp://guest@,1) threw an exception:
> [WARNING] java.io.EOFException
> [WARNING]       at
> java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2281)
> [WARNING]       at
> java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2750)
> [WARNING]       at
> java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:780)
> [WARNING]       at java.io.ObjectInputStream.<init>(ObjectInputStream.java:280)
> [WARNING]       at
> com.newpers.amqp.SerializedConsumer.handleDelivery(AMQPDispatcher.scala:105)
> [WARNING]       at
> com.rabbitmq.client.impl.ChannelN.processAsync(ChannelN.java:189)
> [WARNING]       at
> com.rabbitmq.client.impl.AMQChannel.handleCompleteInboundCommand(AMQChannel.java:146)
> [WARNING]       at
> com.rabbitmq.client.impl.AMQChannel.handleFrame(AMQChannel.java:101)
> [WARNING]       at
> com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:440)

I'm not an expert with this particular scala client but it looks to be
within the context of actually unpacking the payload on the
application layer, so I would have expected the data to have been
buffered up already. Is there any way you can dump the verbatim of the
payload without parsing it to see what is coming in off the wire?



More information about the rabbitmq-discuss mailing list