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.
spring-amqp
Igor Berman
source share