BlackJoker
BlackJoker

Reputation: 3191

Will time-consuming RPC block the heartbeat and so cause timeout in JGroups?

I'm using TCP protocol in my jgroups program and set FD_ALL.timeout to 12000ms FD_ALL.interval=4000ms. sending code like

MessageDispatcher.sendMessage(message, new RequestOptions(ResponseMode.GET_ALL, 4000))

RequestHandler code like this:

public Object handle(Message message) {
     //time consuming code
    }

sometimes it cost more then 12000ms to handle the message. my question is when that happend will it block the heartbeat packet until timeout? and so cause a viewAccepted event indicate the left of that peer?

Upvotes: 0

Views: 124

Answers (2)

user207421
user207421

Reputation: 310957

If your expected service time is N your timeout should be 2N, as a rule of thumb.

Upvotes: 1

BlackJoker
BlackJoker

Reputation: 3191

I think this will only block the sending thread and the next sending thread(if exists a netxt send)

Upvotes: 0

Related Questions