Example: Consume Produce transactional pattern
- Last Updated: January 17, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
The following code example shows how to construct a transactional processor
using a Consume → Produce message delivery pattern. In this pattern, the transactional
processor consumes messages from one stream, processes the messages, and produces
messages to a separate stream. The methods available from ITransactionalProducer are used to ensure that acknowledgment of consumed
messages is managed within the same transaction of produced messages.
In this example, the production of messages, and the offset acknowledgment for the consumer, are handled within a transaction. This is done so that if the processor is restarted for any reason, the incoming messages can be reprocessed.
|