0

We use JmsTemplate and setting the receiveTimeout has no effect. Need help please.

@Bean

public JmsTemplate xyz(){


    JmsTemplate jmsTemplate = new JmsTemplate();

    template.setReceiveTimeout(1);

    return jmsTemplate;

}

jmsTemplate.convertAndSend() does not timeout with a config of 1 millisec while the log mentions that the call took about 40 millisec to complete.

P.S: We only fire the message and do not consume the message. Another team/provider does it.

Gary Russell
  • 166,535
  • 14
  • 146
  • 179
Srikanth
  • 19
  • 3

1 Answers1

1

receiveTimeout has nothing to do with sending; it is used when the template receive operations are performed.

Gary Russell
  • 166,535
  • 14
  • 146
  • 179