Hyperledger Fabric Listener

Syntax:

com.ibi.edaqm.XDFabricMaster

Description:

The Hyperledger Fabric listener connects to the event hubs and listens for block events. The listener returns the BlockEvent encoded in an XML or JSON parsed tree. In Hyperledger Fabric, a BlockEvent is an abbreviated view of a BlockInfo with the TxReadWriteSetInfo missing but the event hub origin added. If necessary, the complete BlockInfo can be retrieved by BlockNumber later with the help of the Hyperledger Fabric Query Block Service.

Parameters:

The following table lists and describe the parameter for the Hyperledger Fabric listener.

Parameter

Description

Fabric Channel Provider

The name of the configured Hyperledger Fabric Channel provider.

The listener refers to the Fabric Channel Provider by name to gain access to the reconstructed channel.

Examples:

The following is a sample Bloc kEvent in XML format, which has been indented for display purposes only:

<BlockEvent>
  <EventHub>
    <Name>peer0</Name>
    <Url>grpc://thor.ibi.com:7053</Url>
  </EventHub>
  <BlockNumber>105</BlockNumber> <DataHash>bfd22913e1d50e98ada53a9b8ee28936a661bc5bdc25bb23a...</DataHash> <PreviousHash>b12c299d2bc1ac7866c6f17d90c8b6ec6fd47c415...</PreviousHash>
  <EnvelopeInfos>
    <EnvelopeInfo> <TransactionID>866054c0ef3cafafd22d4f3acf9bb3dc1054c32...</TransactionID>
      <ChannelID>foo</ChannelID>
      <Epoch>0</Epoch>
      <Timestamp>2017-08-02T16:52:15-04:00</Timestamp>
      <IsValid>true</IsValid>
      <ValidationCode>0</ValidationCode>
      <TransactionActionInfos>
        <TransactionActionInfo>
          <ResponseStatus>200</ResponseStatus>
          <ResponseMessageBytes/>
          <EndorserInfos>
            <EndorserInfo> <Signature>304502210097bc7cae110c25ed7743e99043970271aa59e...</Signature>
              <Endorser>6428741983472475683176417364571253165234172653834...</Endorser>
            </EndorserInfo>
          </EndorserInfos>
          <ChaincodeInputArgs>
            <Arg>696e766f6b65</Arg>
            <Arg>6d6f7665</Arg>
            <Arg>61</Arg>
            <Arg>62</Arg>
            <Arg>31</Arg>
          </ChaincodeInputArgs>
          <ProposalResponseStatus>200</ProposalResponseStatus>
          <ProposalResponsePayload/>
        </TransactionActionInfo>
      </TransactionActionInfos>
    </EnvelopeInfo>
  </EnvelopeInfos>
</BlockEvent>

The following is the same BlockEvent in JSON format, which has been indented for display purposes only. Notice that arrays are more natural in JSON.

{
  "EventHub": {
    "Name": "peer0",
    "Url": "grpc:\/\/thor.ibi.com:7053"
  },
  "BlockNumber": 105,
  "DataHash": "bfd22913e1d50e98ada53a9b8ee28936a661bc5bdc25bb23a5a76...",
  "PreviousHash": "b12c299d2bc1ac7866c6f17d90c8b6ec6fd47c415b7161e8f...",
  "EnvelopeInfos": [
    {
      "TransactionID": "866054c0ef3cafafd22d4f3acf9bb3dc1054c32874892a...",
      "ChannelID": "foo",
      "Epoch": 0,
      "Timestamp": "2017-08-02T16:52:15-04:00",
      "IsValid": true,
      "ValidationCode": 0,
      "TransactionActionInfos": [
        {
          "ResponseStatus": 200,
          "ResponseMessageBytes": "",
          "EndorserInfos": [
            {
              "Signature": "304502210097bc7cae110c25ed7743e99043970271aa59e7b94c83d7bef56532abd...",
              "Endorser": "0a074f7267314d53501280062d2d2d2d2d424547494e202d2d2d2d2d0a4d4949434d..."
            }
          ],
          
"ChaincodeInputArgs": [
            "696e766f6b65",
            "6d6f7665",
            "61",
            "62",
            "31"
          ],"ProposalResponseStatus": 200,
          "ProposalResponsePayload": ""
        }
      ]
    }
  ]
}