Use Hypothesist to validate received messages as a Rebus handler.
var expected = new Message(1234);
var observer = new Observer<Message>();
using var activator = new BuiltinHandlerActivator()
.Register(observer.AsHandler); // <-- here's the magic
var bus = Configure.With(activator)
.Transport(t => t.UseRabbitMq("...")
.Start();
await bus.Subscribe<Message>();
await bus.Publish(new Message(1234)); // <-- from the system under test
await Hypothesis
.On(observer)
.Timebox(2.Seconds())
.Any()
.Match(expected)
.Validate();
Slightly more convenient then the inline handler method: activator.Handle<Message>(m => observer.Observe(m))
.