github.com/kchristidis/fabric@v1.0.4-0.20171028114726-837acd08cde1/protos/orderer/kafka.proto (about) 1 /* 2 Copyright IBM Corp. 2016 All Rights Reserved. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 syntax = "proto3"; 18 19 option go_package = "github.com/hyperledger/fabric/protos/orderer"; 20 option java_package = "org.hyperledger.fabric.protos.orderer"; 21 22 package orderer; 23 24 // KafkaMessage is a wrapper type for the messages 25 // that the Kafka-based orderer deals with. 26 message KafkaMessage { 27 oneof Type { 28 KafkaMessageRegular regular = 1; 29 KafkaMessageTimeToCut time_to_cut = 2; 30 KafkaMessageConnect connect = 3; 31 } 32 } 33 34 // KafkaMessageRegular wraps a marshalled envelope. 35 message KafkaMessageRegular { 36 bytes payload = 1; 37 } 38 39 // KafkaMessageTimeToCut is used to signal to the orderers 40 // that it is time to cut block <block_number>. 41 message KafkaMessageTimeToCut { 42 uint64 block_number = 1; 43 } 44 45 // KafkaMessageConnect is posted by an orderer upon booting up. 46 // It is used to prevent the panic that would be caused if we 47 // were to consume an empty partition. It is ignored by all 48 // orderers when processing the partition. 49 message KafkaMessageConnect { 50 bytes payload = 1; 51 } 52 53 // LastOffsetPersisted is the encoded value for the Metadata message 54 // which is encoded in the ORDERER block metadata index for the case 55 // of the Kafka-based orderer. 56 message KafkaMetadata { 57 int64 last_offset_persisted = 1; 58 }