Re: HA & Missed Events with HyperLedger Fabric Events #fabric #fabric-sdk-node


Gari Singh <garis@...>
 

Correct ... channel event hub does not support "durable subscriptions". Consuming applications need to keep track of the most recent block they have received / processed (I'll also note that there are actually full-fledged messaging engines which work this way as well). There is also no mechanism to treat multiple instances of an application as a single subscriber; all instances will receive all blocks/events. Generally speaking, I would not try to deduplicate messages but rather would look to implement fault tolerant processes where only a single instance is active / running. There are multiple ways to accomplish this: exclusive lock on a shared file, use Kubernetes and require only one instance to be running, etc.



-----------------------------------------
Gari Singh
Distinguished Engineer, CTO - IBM Blockchain
IBM Middleware
550 King St
Littleton, MA 01460
Cell: 978-846-7499
garis@...
-----------------------------------------

-----fabric@... wrote: -----
To: beharrison@...
From: "Robert Broeckelmann"
Sent by: fabric@...
Date: 09/09/2019 10:38PM
Cc: fabric@...
Subject: [EXTERNAL] Re: [Hyperledger Fabric] HA & Missed Events with HyperLedger Fabric Events #fabric #fabric-sdk-node

Thanks for the information.

So, it sounds like the application is still responsible for keeeping track of the most recent block that has been processed for chaincode events across application restarts. Is that accurate?

Has any support been added for running multiple instances of an application that is subscribing to chaincode events without the need for a deduping step?

Thanks again!

RCBJ

On Mon, Sep 9, 2019 at 10:44 AM <beharrison@...> wrote:
The ChannelEventHub offers the ability to be started or restarted with a 'startBlock' and/or 'endBlock'. The ChannelEventHub instance keeps the last block received number. The block number is also included in all event information provided to the callbacks of the application's registered listeners. When using chaincode events, it would be best to receive all events at one from a block of transactions in case the application goes down, this feature was added with fabric-client@1.4.2.


--
Robert C. Broeckelmann Jr | Managing Director | IyaSec
Medium.com LinkedIn Twitter Personal Blog
m: +1 314-494-3398 (SMS or WhatsApp) | fax: +1 (866) 484-1634
email: robert@... | site: iyasec.io
mail: 19215 SE 34th St Ste 106-407 Camas WA 98607-8830

Join fabric@lists.hyperledger.org to automatically receive all group messages.