You should look at Apache Camel, it provides an Idempotent consumer component that would work with any JMS provider, see: http://camel.apache.org/idempotent-consumer.html
Using that in combination with the ActiveMQ component makes using JMS quite simple, see:
http://camel.apache.org/activemq.html