New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ARTEMIS-3753 Prevent sending message to internal queues on mirror #4012
Conversation
who are you? 🥇 Awesome you found this.. nice catch! Do you have an idea on how to write a test for this? |
I am just a humble programmer. Maybe, just maybe activemq.notifications address also should be marked as internal? |
I have added integration test for this |
@iliya-gr I will handle this in detail next week.. It got my attention.. |
there's an issue with this... what if the queue was sent to an internal queue and a regular queue? This could happen on a case of a topic distribution in cluster. although I honestly thought people would be using mirror with Federation instead of clustering, which would offer a better control on the queues and targets. |
ahhhh... I see... routable would return false only if all the queues are internal queues. |
Yeah and for everyone else it's cool async replication feature. :-) There is also an issue on the target side witch I can't reproduce locally. One I mentioned earlier: messages from activemq.notifications not getting deleted. It can happen not only with activemq.notifications but with any queue if ACKs follows right after messages and disk is slow. Don't think that source side has something to do with it, just wanted to mention it. |
@iliya-gr are you creating a mirror between two nodes of the same cluster? or that was just for this test? |
In test I create mirror between one node of a cluster and a regular server. In reality I want to create mirror between each corresponding nodes of two different clusters. |
In cluster configuration messages could be routed to internal queues for further delivering on different broker. We need to check that before sending to SNF, otherwise message can stuck on target server and will never receive ACK.
@iliya-gr I will have to think some more about this.. as we should not route messages to internal queues on the target as well. I think we should also add a note discouraging clustering message distribution with mirror though. I will have to think over the weekend... I"m pretty sure the target should route without any internal queues.. otherwise the acks will not send them back to the mirror where they came from. |
@clebertsuconic I thought it's not possible. Target may send message to internal queue only if it was originally send to internal queue. Maybe just as a precaution of possible acks errors. But maybe I have overlooked something, will check that.
I'm not sure I got you right. I think there is nothing wrong in mirror + cluster. I think what is missing is mirror scope/filter parameter that will allow mirroring only specific queues. |
@iliya-gr say you are sending to a destination with strict load balancing... the server on other side of the mirror will then send to its cluster. |
regarding scope/filter.. I thought about adding a filter clause on the mirror. The reason I did not do it was I would need to figure out an efficient way to filter it.. so I postponed it... but if we find a optimal way to filter the addresses we could do it. |
I will resume this on Monday with a fresh mind... I plan to finish this before we release 2.22 |
Got it. I will try to add a test case for this before Monday. |
note for myself (or you) so I won't forget...
|
Just to let you know, I found some time to work on it today, and I already have a test locally.. I'm pushing it shortly. (just to avoid two people working on the same thing) |
In cluster configuration messages could be routed to internal queues for further delivering on different broker. We need to check that before sending to SNF, otherwise message can stuck on target server and will never receive ACK. co-author: Clebert Suconic Discusssions on apache#4012 and apache#4038
merged it... |
I amended everything on a single commit, and I added a mark on myself as a co-author (Hope you don't mind)... just to mention the discussions... thanks a lot for this! I am doing a release early next week (look at the dev-list disucssion where I sent a HEADS-UP) |
Great, thanks for helping me with this! |
In cluster configuration messages could be routed to internal queues for further delivering on different broker. We need to check that before sending to SNF, otherwise message can stuck on target server and will never receive ACK. co-author: Clebert Suconic Discusssions on apache/activemq-artemis#4012 and apache/activemq-artemis#4038 (cherry picked from commit 99302b1) downstream: ENTMQBR-6592
In cluster configuration messages could be routed to internal queues for further delivering on different broker. We need to check that before sending to SNF, otherwise message can stuck on target server and will never receive ACK. co-author: Clebert Suconic Discusssions on apache/activemq-artemis#4012 and apache/activemq-artemis#4038 (cherry picked from commit 99302b1)
In cluster configuration messages could be routed to internal queues for further delivering on different broker. We need to check that before sending to SNF, otherwise message can stuck on target server and will never receive ACK. co-author: Clebert Suconic Discusssions on apache#4012 and apache#4038 (cherry picked from commit 99302b1)
In cluster configuration messages could be routed to internal queues for further delivering on different broker. We need to check that before sending to SNF, otherwise message can stuck on target server and will never receive ACK. co-author: Clebert Suconic Discusssions on apache#4012 and apache#4038 (cherry picked from commit 99302b1)
In cluster configuration messages could be routed to internal queues for further delivering on different broker. We need to check that before sending to SNF, otherwise message can stuck on target server and will never receive ACK. co-author: Clebert Suconic Discusssions on apache/activemq-artemis#4012 and apache/activemq-artemis#4038 (cherry picked from commit 99302b1) downstream: ENTMQBR-6198
In cluster configuration messages could be routed to internal queues for further delivering on different broker. We need to check that before sending to SNF, otherwise message can stuck on target server and will never receive ACK. co-author: Clebert Suconic Discusssions on apache#4012 and apache#4038 (cherry picked from commit 99302b1) downstream: ENTMQBR-6592
In cluster configuration messages could be routed to internal queues for further delivering on different broker. We need to check that before sending to SNF, otherwise message can stuck on target server and will never receive ACK. co-author: Clebert Suconic Discusssions on apache#4012 and apache#4038 (cherry picked from commit 99302b1) downstream: ENTMQBR-6592
In cluster configuration messages could be routed to internal queues for further delivering on different broker. We need to check that before sending to SNF, otherwise message can stuck on target server and will never receive ACK. co-author: Clebert Suconic Discusssions on apache#4012 and apache#4038 (cherry picked from commit 99302b1)
In cluster configuration messages could be routed to internal queues for further delivering on different broker. We need to check that before sending to SNF, otherwise message can stuck on target server and will never receive ACK. co-author: Clebert Suconic Discusssions on apache#4012 and apache#4038 (cherry picked from commit 99302b1) downstream: ENTMQBR-6592
In cluster configuration messages could be routed to internal queues for further delivering on different broker. We need to check that before sending to SNF, otherwise message can stuck on target server and will never receive ACK. co-author: Clebert Suconic Discusssions on apache#4012 and apache#4038 (cherry picked from commit 99302b1) downstream: ENTMQBR-6592
In cluster configuration messages could be routed to internal queues for further delivering on different broker. We need to check that before sending to SNF, otherwise message can stuck on target server and will never receive ACK. co-author: Clebert Suconic Discusssions on apache#4012 and apache#4038 (cherry picked from commit 99302b1) downstream: ENTMQBR-6592
In cluster configuration messages could be routed to internal queues for further delivering on different broker. We need to check that before sending to SNF, otherwise message can stuck on target server and will never receive ACK. co-author: Clebert Suconic Discusssions on apache#4012 and apache#4038 (cherry picked from commit 99302b1) downstream: ENTMQBR-6592
In cluster configuration messages could be routed to internal queues for further delivering on different broker. We need to check that before sending to SNF, otherwise message can stuck on target server and will never receive ACK. co-author: Clebert Suconic Discusssions on apache#4012 and apache#4038 (cherry picked from commit 99302b1) downstream: ENTMQBR-6592
In cluster configuration messages could be routed to internal queues for further delivering on different broker. We need to check that before sending to SNF, otherwise message can stuck on target server and will never receive ACK. co-author: Clebert Suconic Discusssions on apache#4012 and apache#4038 (cherry picked from commit 99302b1) downstream: ENTMQBR-6592
In cluster configuration messages could be routed to internal queues for
further delivering on different broker. We need to check that before
sending to SNF, otherwise message can stuck on target server and will
never receive ACK.