|
|
Line 9: |
Line 9: |
|
| |
|
|
| |
|
| = Create a Business Process to put a file in Kafka = | | == [[IBM Sterling B2B: Create a Business Process to put a file in Kafka]] == |
| | |
| Where variables
| |
| * BootStrapServers: Server:Port, same as variable KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://localhost:29092
| |
| * KafkaClientAdapter: KafkaClientAdapter
| |
| * SecurityAction: security action same as variable KAFKA_ADVERTISED_LISTENERS=PLAINTEXT...
| |
| * Topic: topic name that i create previously - sb2b-kfk-outbound
| |
| | |
| | |
| <process name="Demo_Kafka_Producer">
| |
| <sequence>
| |
| <operation name="Kafka Client Begin Session Service">
| |
| <participant name='KafkaBeginSessionService'/>
| |
| <output message="xout">
| |
| <assign to='Action'>'''put'''</assign>
| |
| <assign to='BootStrapServers'>'''localhost:29092'''</assign>
| |
| <assign to='KafkaClientAdapter'>'''KafkaClientAdapter'''</assign>
| |
| <assign to='SecurityAction'>'''PLAINTEXT'''</assign>
| |
| <assign to='ProducerConfig'>'''buffer.memory=102400;compression.type=gzip'''</assign>
| |
| <assign to='.' from='PrimaryDocument'/>
| |
| </output>
| |
| <input message="xin">
| |
| <assign to="KafkaBeginSessionServiceResults" from="*"/>
| |
| </input>
| |
| </operation>
| |
|
| |
| <operation name="Kafka Client Producer Service">
| |
| <participant name="KafkaProducerService"/>
| |
| <output message="xout">
| |
| <assign to="SessionID" from="//KafkaBeginSessionServiceResults/SessionID/text()"/>
| |
| <assign to="KafkaClientAdapter" from="//KafkaBeginSessionServiceResults/KafkaClientAdapter/text()"/>
| |
| <assign to='Topic'>'''sb2b-kfk-outbound'''</assign>
| |
| <assign to='.' from='PrimaryDocument'/>
| |
| </output>
| |
| <input message="xin">
| |
| <assign to="." from="*"/>
| |
| </input>
| |
| </operation>
| |
|
| |
| <operation name="Kafka Client End Session Service">
| |
| <participant name='KafkaEndSessionService'/>
| |
| <output message="xout">
| |
| <assign to="SessionID" from="//KafkaBeginSessionServiceResults/SessionID/text()"/>
| |
| <assign to="KafkaClientAdapter" from="//KafkaBeginSessionServiceResults/KafkaClientAdapter/text()"/>
| |
| <assign to='Action'>'''put'''</assign>
| |
| </output>
| |
| <input message="xin">
| |
| <assign to="." from="*"/>
| |
| </input>
| |
| </operation>
| |
| </sequence>
| |
| </process>
| |
| | |
| Run this Business Process and provide a file.
| |
| | |
| When i check in Kowl
| |
| [[File:Sb2b-kafka-outbound.png]]
| |
| | |
|
| |
|
| = Create a Custom Protocol in SFG to use with Kafka = | | = Create a Custom Protocol in SFG to use with Kafka = |