2

I am using ASB for enqueue/dequeue messages between components. Component A consumes messages from queue A and produces messages from queue B. It consumes then produces when consume. Both queues are using same Azure service bus with different queue name (A and B).

My problem is that once the component becomes idle for more than like 10~15 minutes, and then tries to consumes/produces, it throws

javax.jms.IllegalStateException: The MessageProducer was closed due to an unrecoverable error.

and

Caused by: javax.jms.JMSException: The link 'G5S1:40611071:qpid-jms:sender:ID:bbc3fc62-4377-4aeb-bb80-117d74e780de:1:47:1:queueB' is force detached. Code: publisher(link578). Details: AmqpMessagePublisher.IdleTimerExpired: Idle timeout: 00:10:00. [condition = amqp:link:detach-forced]

After observing the stack trace and behavior, it is having problems when it tries to produce a message to queueB. For consumer and producer, I am using same name bean cachingConnectionFactory() in MessageGateway beans (not sure it matters).

My guess is that when it consumes, it restart connection with queueA, and when it tries to restart connection with queueB, something is wrong.

Anyone has any idea? If need more information, please let me know.

Jonathan Hagen
  • 580
  • 1
  • 6
  • 29

1 Answers1

0

Did you try to disable the cache producers? something similar to :

 CachingConnectionFactory connectionFactory = (CachingConnectionFactory) jmsTemplte.getConnectionFactory();
    
    connectionFactory.setCacheProducers(false);