Function amqpr_api::subscribe_stream::subscribe_stream
[−]
[src]
pub fn subscribe_stream<S, E>(
ch_id: u16,
socket: S,
option: StartConsumeOption
) -> SubscribeStream<S, E> where
S: Stream<Item = Frame, Error = E> + Sink<SinkItem = Frame, SinkError = E>,
E: From<Error>,
Returns SubscribeStream
which is Stream
of DeliveredItem
.
Basically, this function send Consume
message to AMQO server first, and then
wait for each items. This uses get_delivered
method internally. If you want to know more detail
please have a look at get_delivered
function document.
We skips an item being not considered as subscribe item such as Heartbeat
or Error
.
So we recommend that one local channel has only one subscribe stream.
Notice
Here is the list of default options we set in Consume
method.
- no-local: false
- no-ack: true
- exclusive: true
- no-wait: true