Hi,
I've designed an AMQP graph where I need to ack or nack a message depending on the processing result of the message:
AmqpSource (consume) -> Process -> Recover -> AmqpSink (publish)
All stages are under my control except the Process stage which is a Flow and is implemented by a different user and is a black box from my point of view.
The Recover stage will emit an ErrorMessage or a Message depending on the Process stage result, because I have to deal with Process stage failures as I don't know what happen in this stage.
The AmqpSink will publish the received message to an exchange and then ack or nack the message depending if it's an ErrorMessage or a Message.
The problem I have is that in the Process stage the user may filter incoming elements, so these elements will never arrive in the AmqpSink and will never be acked.
So to make it simple, if I have N elements out from the source, I MUST have N elements in in the sink, whereas it's an ErrorMessage or a Message, and all of that whatever happens in the Process stage.
Is there a way to catch dropped elements in a stream? How could I resolve my problem?
Thanks in advance,
Victor