SAP抛xml资料到kafka(本机模拟)

为了在本机跑,先将kafka的 bootstrap.servers 设为 localhost:9092 

将Sub端的DB改成test DB

在本地路径放需要抛的xml文件(写个简单的xml测试)

以下是步骤:

1. 打开flow,发资料到queue

下面的xml描述了要抛到kafka的topic名称(test.topic),要抛的xml文件名(hello.XML)

 2. flow收到queue的资料

 以下是各组件的详细展示

 

 

 

 sub端的queue收到资料,有4笔,因为我发了4次

3. 打开Sub Adapter

4. 查看DB

5.  查看kafka

test.topic被建好了

 

 consumer消费

收到了hello.XML的资料

 

猜你喜欢

转载自www.cnblogs.com/fangjb/p/12966472.html
今日推荐