1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! The responder half of the direct reply-to convention, packaged as a publish transform.
use ;
/// Redirects each reply of a `#[subscriber(.., publish(..))]` handler to the requester's
/// private reply-to address, echoing its correlation id.
///
/// This is the canonical responder wiring for [request/reply over `RabbitMQ` direct
/// reply-to](crate::LapinRequester): compose it onto the reply publisher at mount time and the
/// handler stays a pure request-to-reply function. Requests without a `reply-to` header fall
/// through to the mount's static destination.
///
/// # Examples
///
/// ```
/// use ruststream::runtime::TypedPublisher;
/// use ruststream_lapin::{DirectReplyTo, LapinBroker};
///
/// let broker = LapinBroker::new("amqp://localhost:5672");
/// let replies = TypedPublisher::new(broker.publisher()).transform(DirectReplyTo);
/// # let _ = replies;
/// ```
;
// --8<-- [start:transform]
// --8<-- [end:transform]