️🗓️ 06042024 1357

Components
ClientIdentity
- An id that will be exchanged with a
canal_server
CanalConnector
- 2 available implementations
SimpleNodeAccessStrategy: Interacting with single IP address (server)ClusterNodeAccessStrategy: Interacting with multiple IP addresses
CanalNodeAccessStrategy
- Strategy interface for interacting with
canal_servernodes SimpleNodeAccessStrategy- Single static list of IP addresses
- If 1 server in the list fails, try the next address
ClusterNodeAccessStrategy- Interacts with
Zookeeperto discover activecanal_servernodes
- Interacts with
Client-Server interaction
GET / ACK / Rollback protocol
Message
- Return result of
getoperations - Contains
batchIdEntries
getWithoutAck()
Message getWithoutAck(int batchSize, Long timeout, TimeUnit unit)- Return when
batchSizereached / timeout exceeded
- Return when
Message getWithoutAck(int batchSize)
Rollback
rollback(batchId): Rollback for last get operation
Ack
ack(batchId): Acknowledge consumption ofget
Streaming API design
getcan be called multiple times in succession and later submit theack/rollbackasynchronously in sequence