Thanks for the comments Arvind.
I thought about this and I decided it might be a good idea to add it on both sides, with configurability and functions that will be called either on put or take.
- provide a way to configure if the callbacks should be made on put, get or both.
- provide an interface with the following callback functions:
- onPut(Map<String, String> eventHeaders), called on put, if the config specifies put or both.
- onTake(Map<String, String> eventHeaders), called on take, based on config.
I am adding support in MemoryChannel and RecoverableMemory channel and a unit test for MemoryChannel with txnlistener support.