idle, close와 reconnect

ConversationIdleNotify → grace 만료 → ConversationClosedNotify → reconnect·재join

idle, close와 reconnect ConversationIdleNotify → grace 만료 → ConversationClosedNotify → reconnect·재join ConversationIdleNotify ConversationIdleNotify ConversationIdleNotify grace 만료 → ConversationClosedNotify ConversationClosedNotify ConversationClosedNotify STREAM reconnect AuthenticateReq(same token) AuthenticateRes JoinConversationReq(metadata ConversationId) JoinConversationReq JoinConversationRes(scheduled=false) JoinConversationRes(scheduled=false) Customer Client · Sequence participant Customer Client Session · Sequence participant Session ConversationSpot · Sequence participant ConversationSpot Agent Client · Sequence participant Agent Client

idle·grace·close 전이

  • • 마지막 message 뒤 domain idle deadline이 지나면 ConversationSpot이 WaitingForClose로 전환하고 양쪽에 ConversationIdleNotify를 보낸다. grace timeout 안에 message가 오면 Active로 돌아가고, 그렇지 않으면 Closed와 ConversationClosedNotify를 보낸다. explicit close는 바로 Closed로 전환한다.
  • • 원문 P→P 자기 메시지 'grace deadline expires'는 archify sequence가 자기 메시지를 지원하지 않아 뒤이은 ConversationClosedNotify 화살표 라벨('grace 만료 → …')에 합쳤다.

reconnect relay 규칙

  • • reconnect는 actor와 Conversation state를 새로 만들지 않는다. scheduled=false로 현재 state를 반환한다. Agent는 roster actor를 다시 bind하고 SetAgentAvailableReq(true)를 보낸 뒤 열려 있던 conversation마다 JoinConversationReq를 보낸다.
  • • Session은 metadata ConversationId가 agent conversation actor map에 있으면 그 actor로 relay하고, customer의 map miss는 customer identity actor로 relay한다.
  • • 여러 process의 준비·재연결 검증이 idle deadline보다 오래 걸리면 runner는 일반 typed SendChatMessageReq로 traffic 유효를 갱신할 수 있다 — 이는 heartbeat·keepalive가 아니며 control packet·sleep·log line으로 deadline을 대신 늘리지 않는다. 실제 idle·grace 동작은 별도 bounded wait로 확인한다.