observe
Observes request's target (RFC 7641): the flow registers when collected, emits the first response and every fresher notification, and completes after a response that ends the observation (one without Observe, or an error code, which is emitted last). It fails with CoapException when the registration gets no response or a Reset, or, under message security, only a response that could not be verified (CoapException.Reason.UNVERIFIED_RESPONSE). Once established, the observation ignores such responses: they neither end it nor reach the collectors (ADR 0008).
Collectors of the same target share one registration (RFC 7641 §3.1); when the last one stops, the observation is cancelled as CoapClientConfig.observeCancellation says. A slow collector misses intermediate notifications rather than holding up the client.
With CoapClientConfig.qBlock on and a server that supports it, notification bodies come in Q-Block2 (RFC 9177 §4.5) and each is emitted once, whole; a FETCH registration whose body needs blocks is uploaded in Q-Block1 and, when cancelled, forgets its token instead of deregistering. Under message security (CoapClientConfig.security) that takes QBlockClientConfig.withMessageSecurity, and the security layer orders the notifications, taking the blocks of a body in any order (RFC 8613 §4.1.3.5.2, §7.4.1); otherwise observations keep RFC 7959.
Observes uri with GET; see observe.