One problem we've run across while debugging ActiveMQ problems after the fact (after the broker and clients have all been cycled) is that it's often difficult to figure out which client was the one that corresponded to a particular error in the broker's logs. The broker's log file will generally tell us the clientId or connectionId (I forget which off the top of my head) of the problematic client, and from that we can back out the hostname, but if many clients are running on that host we generally can't figure out which one it was.
I'd like a way to automatically write a client's clientId and connectionId in that client's log file, so you could just grep for that ID in the various client logs and figure out quickly which one had the problem. I've discovered that I can get that information from the FailoverTransport (for reconnections, but not for the original connection) by setting the Log4j logger level to TRACE for activemq.transport.failover.FailoverTransport, but doing that also spams our logs with a bunch of other TRACE or DEBUG output that we don't want. Is there another way to get the clientId and connectionId into the client's logs? Tim