Skip to content

Remoting over JMS with receiveTimeout blocks service forever [SPR-13052] #17644

Closed
@spring-projects-issues

Description

@spring-projects-issues

Erik van Paassen opened SPR-13052 and commented

I'm using remoting over JMS the way it is explained here: http://docs.spring.io/spring/docs/current/spring-framework-reference/html/remoting.html. I'm using the receiveTimeout on the JmsInvokerProxyFactoryBean, which makes the temp-queue on which the reply is ought to be sent disappear after this timeout. This still works fine.

Since Spring Framework 4.0.7, the MessageListenerContainer does not remove the message from the queue when it can't deliver the reply to the reply queue, resulting in endless retries, as the temp queue will never come back. With Spring Framework 4.0.6 all just worked fine. I think the change has to be related to issue #16631, and the following commit: 7af1e00.

I created a test project (https://github.com/eveoh/spring-jms-remoting-test) which demonstrates the problem with the example code found in the Spring docs. First, run the Server and then run the Client. The client has a receive timeout of 1s and the Server waits 1.5s before sending a reply, so the reply is already gone. The server will keep retrying to process the message endlessly. There's also a spring-v4.0.6 branch, which uses Spring Framework 4.0.6 and works just fine. A message is processed only once and discarded when it can't be delivered to the reply destination.

(The server spawns an ActiveMQ broker, so there's no need to start one by hand.)


Affects: 3.2.11, 3.2.12, 3.2.13, 4.0.7, 4.0.8, 4.0.9

Reference URL: https://github.com/eveoh/spring-jms-remoting-test

Issue Links:

Referenced from: commits c111bd7, a64dcc2

Backported to: 3.2.14

Metadata

Metadata

Assignees

Labels

in: messagingIssues in messaging modules (jms, messaging)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions