- Example project of how you can use faust_streaming to processing the streaming and filter messages that are not suitable to proceed for forward processing.
#KAFKA_BROKER_URL='http://ip_do_servidor:8080'
#SCHEMA_REGISTRY_URL='http://ip_do_servidor:8080'
FHIR_SERVER_URL='http://ip_do_servidor:8080'
TOPIC_ORGANIZATION_NAME='amh_organization'
- Script: ./kafka_fhir_adapter/main.py
- Passe isso no script parameters:
-A kafka_fhir_adapter.main worker -l info
docker build -t meucontainer -f faust/Dockerfile .
- kafka-consumer-groups --bootstrap-server broker:9092 --group fhir_consumer --describe
- kafka-consumer-groups --bootstrap-server broker:9092 --group fhir_consumer --topic amh_organization --reset-offsets --to-earliest --execute
Subir servidor de testes (1) e adicionar os recursos da pasta tests/resources
(2)
Primeiramente dentro da pasta tests
de permissão para os scripts
cd tests
sudo chmod +x *.sh
(1)
Para subir servidor de teste rode o script up_servidor_test.sh
./up_servidor_test.sh
(2)
Para adicionar os recursos da pasta tests/resources
rode o script add_resources_test.sh
./add_resources_test.sh
Por fim, para executar todos os testes:
pytest
Instale as dependências usando o pip
:
pip install -r requirements.txt