Remote queue is not redefined; consumers stop processing messages

I am trying to solve the following problem:

  • I have 2 SimpleMessageListenerContainer defined in java conf.
  • Each of them has its own listener wrapped in an adapter, and both of them use the same CachingConnectionFactory (is this normal?). In addition, each of them processes different queues (with a constant name)
  • I am testing a scenario where for some reason one of the queues is deleted.
  • When I manually delete it from the web admin console, the container tries to override this queue and fails (all attempts fail). The exception does not really indicate the reason for the failure.
  • Ultimately, all of the user flows in this queue are β€œreloaded”, however, they will no longer use any messages. Even if someone else redefines this queue (e.g. producer)

therefore there are a few questions:

  • Can I somehow fix the queue redefinition or check why the redefinition fails? With a new start, the definition of queues works. This brings me to the next question.
  • Perhaps I can get the sender of the heartbeat to use the daemon somehow? This prevents jvm from exiting, so a restart does not occur. This will not solve the problem, but a fresh jvm process successfully redefines the queues. The restart will be called by the supervisor.

In the meantime, I get a situation where all consumers (in the first container) for the remote queue do not actually work, I expect jvm to exit, however, probably, since I have a second container that is ok (all consumers are alive and queue exists), jvm continues to live (maybe when the second container is disconnected, the sender heartbeat will also stop?)

Any suggestions would be appreciated. If necessary, I will post fragments of java configuration code.

+1
spring-amqp
source share
1 answer

We just β€œfixed” this by adding the missing-queues-fatal attribute to the listener container.

See transfer request here .

We cannot make circuit changes in the release of the point version, so there are several ways to configure it in the 1.3.x file; it is added to the scheme in 1.4.x and will be available in <rabbit:listener-container/> ; You can see 1.4.x Pull Request here .

1.3.5 should be available later this week or later, but you can try 1.3.5.BUILD-SNAPSHOT now if you want.

If it is set to false (true by default), the container will enter recovery mode using recovery-interval .

Documentation for 1.3.5. snapshot here .

+1
source share

All Articles