How can i skip message by date using masstransit c#

Viewed 20

I have a fanout exchange and distributed queues. If the sentTime exceeds two minutes, I want message to come to the consumer. If it doesn't exceed two minutes, I want to hold the message in the queue.

I tried filtering as below but if the filter is not valid the message is consumed. Is there a way to bypass this on masstransit?

MassTransit Filtering messages a consumer can handle

I would like to say that each queue has a multiple consumer. Can you help me?

Thanks.

1 Answers

If you need to delay the delivery of a message to a consumer, you can use the delayed message delivery feature of the transport to schedule it for two minutes in the future. MassTransit also supports scheduling messages via Quartz.NET or Hangfire if that makes more sense.

Related