Some folks have been experiencing problems with wire format negotiation timeouts. Sometimes it was due to overloaded brokers or lousy networks, but misconfiguration of log4j jms appender could also be one of the causes. So, I wrote two FAQ entries that covers this topic:
Using log4j appender with ActiveMQ
Wire format negotiation timeout exception
Enjoy