[−][src]Struct eventstore::commands::RegularCatchupSubscribe
Subscribes to a given stream. This kind of subscription specifies a
starting point (by default, the beginning of a stream). For a regular
stream, that starting point will be an event number. For the system
stream $all
, it will be a position in the transaction file
(see subscribe_to_all_from
). This subscription will fetch every event
until the end of the stream, then will dispatch subsequently written
events.
For example, if a starting point of 50 is specified when a stream has 100 events in it, the subscriber can expect to see events 51 through 100, and then any events subsequenttly written events until such time as the subscription is dropped or closed.
- Notes Catchup subscription are resilient to connection drops. Basically, if the connection drops. The command will restart its catching up phase from the begining and then emit a new volatile subscription request.
All this process happens without the user has to do anything.
Methods
impl<'a> RegularCatchupSubscribe<'a>
[src]
pub fn resolve_link_tos(self, tos: LinkTos) -> RegularCatchupSubscribe<'a>
[src]
When using projections, you can have links placed into another stream.
If you set true
, the server will resolve those links and will return
the event that the link points to. Default: NoResolution.
pub fn require_master(self, require_master: bool) -> RegularCatchupSubscribe<'a>
[src]
Asks the server receiving the command to be the master of the cluster
in order to perform the write. Default: false
.
pub fn start_position(self, start_pos: i64) -> RegularCatchupSubscribe<'a>
[src]
For example, if a starting point of 50 is specified when a stream has 100 events in it, the subscriber can expect to see events 51 through 100, and then any events subsequenttly written events until such time as the subscription is dropped or closed.
By default, it will start from the event number 0.
pub fn credentials(self, creds: Credentials) -> RegularCatchupSubscribe<'a>
[src]
Performs the command with the given credentials.
pub fn execute(self) -> Subscription
[src]
Preforms the catching up phase of the subscription asynchronously. When it will reach the head of stream, the command will emit a volatile subscription request.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for RegularCatchupSubscribe<'a>
impl<'a> Send for RegularCatchupSubscribe<'a>
impl<'a> Sync for RegularCatchupSubscribe<'a>
impl<'a> Unpin for RegularCatchupSubscribe<'a>
impl<'a> !UnwindSafe for RegularCatchupSubscribe<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,