Override this method in derived class and implement message handling logic.
Detailed Description
Base component for your consumers. Basically a ConsumerBase but in a nice component-ish way.
You should derive from it and override Process method, which gets called when a new message arrives from the broker. The consumer will be automatically started after all components are loaded and stopped before all components are beginning to stop.
Library takes care of handling start failures and runtime failures (connection breakage/broker node downtime etc.) and will try it's best to restart the consumer.
Note
Library guarantees at least once delivery, hence some deduplication might be needed ou your side.
Name | Description rabbit_name | Name of the RabbitMQ component to use for consumption queue | Name of the queue to consume from prefetch_count | prefetch_count for the consumer, limits the amount of in-flight messages
Override this method in derived class and implement message handling logic.
If this method returns successfully message would be acked (best effort) to the broker, if this method throws the message would be requeued.
Please keep in mind that it is possible for the message to be delivered again even if Process returns successfully: sadly we can't guarantee that ack ever reached the broker (network issues or unexpected shutdown, for example). It is however guaranteed for message to be requeued if Process fails.
The documentation for this class was generated from the following file: