Skip to main content

Module memory

Module memory 

Source
Expand description

In-memory message broker, producer, and consumer for testing.

Structs§

InMemoryBroker
An in-memory message broker backed by a tokio::sync::broadcast channel.
InMemoryConsumer
An in-memory message consumer.
InMemoryProducer
An in-memory message producer.

Functions§

assert_no_messages
Assert that zero messages were published to topic.
assert_published
Assert that at least one message on topic satisfies the predicate.
assert_published_n
Assert that exactly n messages were published to topic.
register
Register in-memory producer and consumer factories.
wait_for_message
Wait until at least one message appears on topic or the timeout expires.