c# - MassTransit republish message for another consumer when a consumer throws exception -
i developing micro-services system using masstransit , rabbitmq. 1 service can publish jobs many subscriber services. 1 of subscribers execute job (competing consumer).
if 1 subscriber consume message, execute job , throw exception, is there way message re-delivered queue, other subscribers can consume message.
i use retry policy subscribers, allows me re-consume message inside same subscriber, not consume subscriber.
you can schedule redelivery of message:
http://masstransit-project.com/masstransit/usage/scheduling/redeliver.html
you need have message scheduler, or use delayed exchange in rabbitmq. typically retrying discouraged, can set redelivery timer want.
Comments
Post a Comment