You could implement it that way, but you should be away of the
threading model. The call handleEventException will come from the
thread that is running the consumer not the thread that is running the
producer. So you will need to be careful about data is shared within
the Producer implementation. If your implementation of "rollback
transaction" shares data with the parts of the producer that are
writing to the ring buffer they you'll potentially run into
concurrency issues and contention. I personally think it is cleaner
to have the exception handled by a class that is separate from the
producer, so that you a much cleaner asynchronous eventing model.
Mike.