Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to listen to events emitted before creating event listener #897

Open
bharadwajambati172 opened this issue Jul 11, 2022 · 3 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@bharadwajambati172
Copy link

Launched a fabric network using fabric cli with a total of 3 firefly nodes. Deployed asset-transfer-basic chaincode by following the steps mentioned in the documentation https://hyperledger.github.io/firefly/tutorials/custom_contracts/fabric.html.

Ran three blockchain transactions from org1 and then created an event listener from org2. After creating an event listener, org2 didn't receive any events. Ran fourth transaction from org1, now org2 received the fourth transaction but not the previous transactions.

Below is the payload used for creating event listener in org2

{
  "interface": {
    "id": "f1e5522c-59a5-4787-bbfd-89975e5b0954"
  },
  "location": {
    "channel": "firefly",
    "chaincode": "asset_transfer"
  },
  "event": {
    "name": "AssetCreated"
  },
  "options": {
    "firstEvent": "oldest"
  },
  "topic": "assets"
}

Expected:

Org2 should receive all the events emitted before creating an event listener

Actual:

Org2 didn't receive events emitted before creating an event listener

@nguyer
Copy link
Contributor

nguyer commented Jul 11, 2022

Thanks for reporting this @bharadwajambati172. I'll take a look at it and see if I can reproduce the same behavior.

@nguyer nguyer self-assigned this Jul 11, 2022
@awrichar
Copy link
Contributor

Notably in FireFly Core, we specifically convert "oldest" to "0" when creating a subscription. It's possible fabconnect doesn't actually honor "oldest" (would need to verify).

@awrichar awrichar added the good first issue Good for newcomers label Aug 9, 2022
@sifisKoen
Copy link

Hello @awrichar and @nguyer I checked firefly project and I liked it. I am now in a process of learning Go lang and also study blockchain technology. So if it is possible I would like to try resolve this issue. Finally it would be appreciated if you guide me from where to start solve this issue, I mean if you can give me a guide from which area/folder to start. Thank you 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants