aop
aop copied to clipboard
Fix - Add queue to exchange when recover from topic.
Motivation
Add queue to exchange when recover from topic.
Think that
- Receive cmd
AmqpChannel -> receiveBasicPublish
. - Get or create queue
QueueContainer -> asyncGetQueue
. - Recover from topic
PersistentTopic -> recoverRoutersFromQueueProperties
, and add to routers. - Then queue would be never add to exchange.
AmqpChannel -> receiveBasicPublish
if (amqpQueue.getRouter(AbstractAmqpExchange.DEFAULT_EXCHANGE_DURABLE) == null) {
amqpQueue.bindExchange(amqpExchange,
AbstractAmqpMessageRouter.generateRouter(AmqpExchange.Type.Direct),
routingKey.toString(), null);
}
So, we should add queue after add to routers.
Modifications
Verifying this change
Does this pull request potentially affect one of the following parts:
If yes
was chosen, please highlight the changes
- Dependencies (does it add or upgrade a dependency): (no)
- The public API: (no)
- The schema: (no)
- The default values of configurations: (no)
- The wire protocol: (no)
- The rest endpoints: (no)
- The admin cli options: (no)
- Anything that affects deployment: (no)
Documentation
Check the box below and label this PR (if you have committer privilege).
Need to update docs?
- [x]
no-need-doc
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
liu.changqing seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.
It seems it's more complex, the PR https://github.com/streamnative/aop/pull/554 try to fix this problem, I close this PR first.