I'm wondering how is possible to send notifications from the chaincode of a fabric network.
What I would like to do is send a notification to an external legacy system every time a new transaction is successfully committed to the ledger.
To achieve this I thought about two different ways:
- HTTP Request - Is possible to execute an http request directly from the chaincode? If yes, is it possible to send an http request to the endpoint of the legacy system to notify the transaction?
- Event - I understood that there is the possibility to create events in the chaincode. Is possible to listen these events without using the Fabric SDK (I can't integrate the SDK in the legacy system)?
What are your considerations about these two approaches? Do you have any suggestion?