WebSub Developers Guide
WebSub module provides a common mechanism for communication between publishers of any kind of Web content and their subscribers, based on HTTP webhooks.
Below is a list of tools required in WebSub:
- 1.Ballerina (Swan-Lake)
- 2.Any IDE (like Vs Code)
- 3.Kafka
- 4.Postman (any HTTP Client)
- 5.Git
For the code setup, clone the repository and follow the guidelines mentioned in the Code Contributions.
- 1.Open the hub and consolidator folders where
Ballerina.toml
is present. - 2.Open the command prompt from the same folder.
- 3.Run the command
bal build
to build the hub and consolidator. - 4.Open the project in VS Code either by
open with vs code
or fromFile -> Open Folder
.
- 1.Copy
websub-service.toml
andwebsub-consolidator.toml
file from mosip-config repository to hub and consolidator folder respectively and rename both of them asConfig.toml
(case-sensitive). - 2.Run Configure and run Kafka, update
KAFKA_BOOTSTRAP_NODE
inConfig.toml
to point to your Kafka.
- 1.WebSub consists of consolidator and hub.
- 2.Consolidator should be started first,
Got to consolidator -> java -jar target/bin/<Jarname>
. (Config.toml should be in the same place where you are running this command). - 3.Start WebSub with the same approach.
- 4.
Last modified 1yr ago