You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stream for subscribing to Postgres connection notices
[resolvespgjdbc#570]
Postgres may send notice messages through a connection, which may
contain log information or metadata related to the submitted commands.
Notices travel on the same backend messaging subsystem used by
notifications. The implementation processes NoticeResponse in a way
similar to NotificationResponse, and exposes a coherent API.
* Return a {@link Flux} of {@link Notice} received from the connection. The stream is a hot stream producing messages as they are received. Notices received by this
115
+
* connection are published as they are received. When the client gets {@link #close() closed}, the subscription {@link Subscriber#onComplete() completes normally}. Otherwise (transport
116
+
* connection disconnected unintentionally) with an {@link R2dbcNonTransientResourceException error}.
117
+
*
118
+
* @return a hot {@link Flux} of {@link Notice Notices}
119
+
*/
120
+
Flux<Notice> getNotices();
121
+
113
122
/**
114
123
* Cancel currently running query by sending {@link CancelRequest} to a server.
* Add a consumer of notices. Notices received by this connection are sent to the {@link Consumer notice consumer}. Note that connection errors and events such as
66
+
* disconnects are not visible to the {@link Consumer notice consumer}.
67
+
*
68
+
* @param consumer the consumer of notices
69
+
* @return a new {@link Disposable} that can be used to cancel the underlying subscription
70
+
* @throws IllegalArgumentException if {@code consumer} is {@code null}
* Add a consumer of notices. Notices received by this connection are sent to the {@link Subscriber notice listener}. When the client gets {@link #close() closed}, the
76
+
* subscription {@link Subscriber#onComplete() completes normally}. Otherwise (transport connection disconnected unintentionally) with an {@link R2dbcNonTransientResourceException error}.
77
+
*
78
+
* @param consumer the consumer of notices
79
+
* @return a new {@link Disposable} that can be used to cancel the underlying subscription
80
+
* @throws IllegalArgumentException if {@code consumer} is {@code null}
0 commit comments