I don't know if it's "better" (depends on your requirements) but...
The JMS contract says expired messages should be discarded but some (many?) brokers, such as ActiveMQ can send expired messages to a dead letter queue. So one way might be to send the messages with a time to live; you can then listen for expired messages on the DLQ (and requeue them after). Of course, you'd lose message order then and it might be a little brittle in that messages might expire because the consumer is slow rather than dead.
Another, probably better, alternative would be to have the consumer send a heartbeat (e.g. containing the number of messages processed) from time to time back to the producer on a different queue, and have the producer react when he receives no heartbeat (or the counter doesn't increment as expected).