346.5. thrift 형식 정의
첫 번째 단계는 교환 본문에 대한 형식을 정의하는 것입니다. .thrift 파일에 다음과 같이 정의됩니다.
tutorial.thrift
namespace java org.apache.camel.dataformat.thrift.generated
enum Operation {
ADD = 1,
SUBTRACT = 2,
MULTIPLY = 3,
DIVIDE = 4
}
struct Work {
1: i32 num1 = 0,
2: i32 num2,
3: Operation op,
4: optional string comment,
}