Azure-Samples / Azure-Samples/java-microservices-aks-lab

SB caching

Open
#46 0 comments 0 reactions 0 assignees View on GitHub
Also ASA
Dominant language
Java
Stars
11
Forks
176
PR merge metrics
No merged PRs in 30d

Description

Service Bus connection caching: people who wait 10+ minutes lose the ability to send messages in Lab 5.
Workaround (from a learner):
Add the cache disability to the code. It works better this way. In PetClinicVisitRequestSender you add an import org.springframework.jms.connection.CachingConnectionFactory; and then :
CachingConnectionFactory connectionFactory = (CachingConnectionFactory) jmsTemplate.getConnectionFactory();
connectionFactory.setCacheProducers(false);
Workaround links:
- https://stackoverflow.com/questions/64917959/azure-service-bus-javax-jms-illegalstateexception-the-messageproducer-was-close
- https://stackoverflow.com/questions/59248234/azure-service-bus-amqp-idle-timeout-condition-amqplinkdetach-forced

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.