Refactor of JMS Input to make it fault-tolerant and idempotent