how long should client wait on dead connection for message draining #584
-
Hello, from this article https://artemiscloud.io/docs/tutorials/scaleup_and_scaledown/#step-5---scale-down-with-message-draining I understand that the operator will move messages to other broker when a broker is down (scaled down or crash?) i assume this draining process would take some time and thus the client (both consumer and producer) must wait until all messages has been moved over to the new broker. How long should i set clientFailureCheckPeriod on the client connection to wait for dead connection before aborting the current connection and move on to the next one? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
@lnthai2002 the messages are migrated only if the brokers are scaled down (decreasing the DeploymentPlan.Size field), can you share the connection url that you are using to connect to the broker cluster? |
Beta Was this translation helpful? Give feedback.
-
Here is my connection: I'm using localhost because my consumer and provider are running on my desktop, so i port-forwarded request from 61610, 61611, 61612 to the 3 kubernetes services at 61617:
The 3 brokers are deployed on kuberntes:
and their kubernetes services:
Here is my deployment:
The reason i am trying to use clientFailureCheckPeriod on the connection string is because i though if there is problem with 1 broker , the client will wait 30 sec before switching to a new broker and when the artemis cluster sees that no consumer is connected to a queue, it will move messages to the other broker that the consumer is now connected to. However, when i stop port forwarding for one of the broker where my consumer is connected to for a few sec and start the port forwarding again, my consumer still could not connect to any broker. Listing queues in all 3 broker i see the same queue that my consumer should use is being created in all 3 brokers. |
Beta Was this translation helpful? Give feedback.
-
when you stop port-forwarding on one broker the broker pod is still alive, so no scaledown will happen. (you will have to change your deploymentPlan.size from 3 to 2 for it). |
Beta Was this translation helpful? Give feedback.
when you stop port-forwarding on one broker the broker pod is still alive, so no scaledown will happen. (you will have to change your deploymentPlan.size from 3 to 2 for it).