pub struct NSQProducer { /* private fields */ }
Expand description

An NSQD producer corresponding to a single instance.

Before any messages are published you must wait for an NSQEvent::Healthy() message. If any messages are queued while the connection is unhealthy the publish method shall return an error and the message will not be queued. Messages are queued and delivered asynchronously. Once NSQ acknowledges a message an NSQEvent::Ok() will be available from consume.

Multiple messages can be queued before any are acknowledged. You do not need to wait on consume immediately after each publish. If any NSQEvent::Unhealthy() event is ever returned, all unacknowledged messages up to that point are now considered failed, and must be requeued. A producer will not buffer messages waiting for a healthy connection.

Implementations

Consume message acknowledgements, and connection status updates.

Queue a PUB message to be asynchronously sent

Queue a DPUB message to be asynchronously sent

Queue an MPUB message to be asynchronously sent

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more