Delete a message once it's consumed?

182 views Asked by At

Is it possible to delete a message once it has been consumed? Example below creates and consumes the message but does not delete the message. Watching the RabbitMQ web interface and the message flicks between Ready and Unacked.

Producer (My Service)

 using (var messagebus = RabbitHutch.CreateBus("host=localhost;persistentMessages=false"))
            {
                var myrequest = new MyRequest();
                messagebus.Publish(myrequest);
            }

Consumer (My App)

MessageBus = RabbitHutch.CreateBus(Settings.Default.MessageBusParams);
MessageBus.Subscribe<MyRequest>("TheQueue", DoSomething);
0

There are 0 answers