fixup
This commit is contained in:
parent
cb18c0d5b1
commit
c0cab43513
|
@ -57,8 +57,8 @@ fn main() {
|
|||
consumer_tag: format!("{}-builder", cfg.whoami()),
|
||||
no_local: false,
|
||||
no_ack: false,
|
||||
no_wait: false,
|
||||
exclusive: false,
|
||||
nowait: false,
|
||||
arguments: None
|
||||
},
|
||||
)
|
||||
|
|
|
@ -5,12 +5,46 @@ use amqp;
|
|||
use amqp::Basic;
|
||||
|
||||
pub struct ConsumeConfig {
|
||||
/// Specifies the name of the queue to consume from.
|
||||
pub queue: String,
|
||||
|
||||
/// Specifies the identifier for the consumer. The consumer tag is
|
||||
/// local to a channel, so two clients can use the same consumer
|
||||
/// tags. If this field is empty the server will generate a unique
|
||||
/// tag.
|
||||
///
|
||||
/// The client MUST NOT specify a tag that refers to an existing
|
||||
/// consumer. Error code: not-allowed
|
||||
pub consumer_tag: String,
|
||||
|
||||
/// If the no-local field is set the server will not send messages
|
||||
/// to the connection that published them.
|
||||
pub no_local: bool,
|
||||
|
||||
/// If this field is set the server does not expect
|
||||
/// acknowledgements for messages. That is, when a message is
|
||||
/// delivered to the client the server assumes the delivery will
|
||||
/// succeed and immediately dequeues it. This functionality may
|
||||
/// increase performance but at the cost of reliability. Messages
|
||||
/// can get lost if a client dies before they are delivered to the
|
||||
/// application.
|
||||
pub no_ack: bool,
|
||||
|
||||
/// Request exclusive consumer access, meaning only this consumer
|
||||
/// can access the queue.
|
||||
///
|
||||
/// The client MAY NOT gain exclusive access to a queue that
|
||||
/// already has active consumers. Error code: access-refused
|
||||
pub exclusive: bool,
|
||||
pub nowait: bool,
|
||||
|
||||
/// If set, the server will not respond to the method. The client
|
||||
/// should not wait for a reply method. If the server could not
|
||||
/// complete the method it will raise a channel or connection
|
||||
/// exception.
|
||||
pub no_wait: bool,
|
||||
|
||||
/// A set of arguments for the consume. The syntax and semantics
|
||||
/// of these arguments depends on the server implementation.
|
||||
pub arguments: Option<amqp::Table>,
|
||||
}
|
||||
|
||||
|
@ -59,7 +93,7 @@ impl TypedWrappers for amqp::Channel {
|
|||
config.no_local,
|
||||
config.no_ack,
|
||||
config.exclusive,
|
||||
config.nowait,
|
||||
config.no_wait,
|
||||
config.arguments.unwrap_or(amqp::Table::new()),
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue