IBM Sterling B2B: Configuring SB2Bi to use Kafka: Difference between revisions
Line 23: | Line 23: | ||
<participant name='KafkaBeginSessionService'/> | <participant name='KafkaBeginSessionService'/> | ||
<output message="xout"> | <output message="xout"> | ||
<assign to='Action'>put</assign> | <assign to='Action'>'''put'''</assign> | ||
<assign to='BootStrapServers'>'''localhost:29092'''</assign> | <assign to='BootStrapServers'>'''localhost:29092'''</assign> | ||
<assign to='KafkaClientAdapter'>'''KafkaClientAdapter'''</assign> | <assign to='KafkaClientAdapter'>'''KafkaClientAdapter'''</assign> | ||
<assign to='SecurityAction'>'''PLAINTEXT'''</assign> | <assign to='SecurityAction'>'''PLAINTEXT'''</assign> | ||
<assign to='ProducerConfig'>buffer.memory=102400;compression.type=gzip</assign> | <assign to='ProducerConfig'>'''buffer.memory=102400;compression.type=gzip'''</assign> | ||
<assign to='.' from='PrimaryDocument'/> | <assign to='.' from='PrimaryDocument'/> | ||
</output> | </output> | ||
Line 53: | Line 53: | ||
<assign to="SessionID" from="//KafkaBeginSessionServiceResults/SessionID/text()"/> | <assign to="SessionID" from="//KafkaBeginSessionServiceResults/SessionID/text()"/> | ||
<assign to="KafkaClientAdapter" from="//KafkaBeginSessionServiceResults/KafkaClientAdapter/text()"/> | <assign to="KafkaClientAdapter" from="//KafkaBeginSessionServiceResults/KafkaClientAdapter/text()"/> | ||
<assign to='Action'>put</assign> | <assign to='Action'>'''put'''</assign> | ||
</output> | </output> | ||
<input message="xin"> | <input message="xin"> |
Revision as of 18:45, 30 October 2023
1) Deploy Kafka: Deploy Kafka as Container
2) Using Kwol create topics
- sb2b-kfk-inbound
- sb2b-kfk-outbound
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.