0

I have a Spring JmsListener which receives messages from an SQS queue.

Now I need to set processing_timeout for each message I receive.

Lets assume that I have set processing_timeout to 2 mins, then each message received by Jmslistener should finish before 2 mins. If not, an exception should be thrown (which will make the SQS to resend immediately).

How do I set this processing_timeout for each message?

Justin Bertram
  • 29,372
  • 4
  • 21
  • 43
LearnerForLife
  • 147
  • 1
  • 12

1 Answers1

0

Without going into the guts of spring-jms, the only way I can see would be for your @JmsListener to launch a worker thread, that it could time and chop.

chughts
  • 4,210
  • 2
  • 14
  • 27