{"id":25650688,"url":"https://github.com/flow-build/streamers","last_synced_at":"2025-10-13T15:31:58.788Z","repository":{"id":154965032,"uuid":"622996025","full_name":"flow-build/streamers","owner":"flow-build","description":"Interface para Streamers de Eventos","archived":false,"fork":false,"pushed_at":"2023-05-26T15:37:34.000Z","size":136,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-28T23:47:22.772Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flow-build.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-04-03T13:39:14.000Z","updated_at":"2023-04-06T17:54:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"506e5457-8ef3-45a2-b277-1fe2ac1b3525","html_url":"https://github.com/flow-build/streamers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/flow-build/streamers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flow-build%2Fstreamers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flow-build%2Fstreamers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flow-build%2Fstreamers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flow-build%2Fstreamers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flow-build","download_url":"https://codeload.github.com/flow-build/streamers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flow-build%2Fstreamers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271280995,"owners_count":24732108,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-23T15:17:48.528Z","updated_at":"2025-10-13T15:31:53.766Z","avatar_url":"https://github.com/flow-build.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\" style=\"border-bottom: none;\"\u003eFlowBuild Streamers\u003c/h1\u003e\n\u003ch3 align=\"center\"\u003eThis library provides functionality for writing and consuming events across multiple brokers\u003c/h3\u003e\n\n![Coverage lines](./coverage/badge-lines.svg)\n![Coverage branches](./coverage/badge-branches.svg)\n![Coverage functions](./coverage/badge-functions.svg)\n![Coverage statements](./coverage/badge-statements.svg)\n\n## Dependencies:\n\nIt is necessary to have a Message Broker running in order to use the Stream Interface. The available Brokers are:\n```\nkafka\nbullmq\nmqtt\nrabbitmq\n```\n\n## Install:\n\n```bash\nnpm i @flowbuild/streamers\n```\n\n## Configuration:\n\nThe required configuration object has a structure similar to:\n```json\n{\n    \"topics\":{\n        \"event-topic\":{\n            \"producesTo\":[\"bullmq\", \"kafka\", \"mqtt\", \"rabbitmq\"],\n            \"consumesFrom\":[\"bullmq\", \"kafka\", \"mqtt\", \"rabbitmq\"],\n        },\n    },\n    \"kafka\": {\n        \"CLIENT_ID\": \"my-kafka-id\",\n        \"BROKER_HOST\": \"localhost\",\n        \"BROKER_PORT\": \"9092\",\n        \"GROUP_CONSUMER_ID\": \"my-consumer-group\",\n    },\n    \"bullmq\": {\n        \"REDIS_HOST\": \"localhost\",\n        \"REDIS_PORT\": \"6379\",\n        \"REDIS_PASSWORD\": \"\",\n        \"REDIS_DB\": 4,\n    },\n    \"mqtt\": {\n        \"MQTT_HOST\": \"localhost\",\n        \"MQTT_PORT\": \"1883\",\n        \"MQTT_PROTOCOL\": \"http\",\n        \"MQTT_USERNAME\": \"username\",\n        \"MQTT_PASSWORD\": \"password\",\n    },\n    \"rabbitmq\": {\n        \"RABBITMQ_HOST\": \"localhost:5672\",\n        \"RABBITMQ_USERNAME\": \"user\",\n        \"RABBITMQ_PASSWORD\": \"password\",\n        \"RABBITMQ_QUEUE\": \"flowbuild\"\n    }\n}\n```\nIn *topics* you must put the name of the events and a relation of Consumption and Production listing the brokers that will be used.\n\nFor each broker you want to use, you must put the necessary configuration in the respective configuration key\n\n## Example:\n\n```typescript\nconst stream = new StreamInterface({\n    \"topics\":{\n        \"event-topic\":{\n            \"producesTo\":[\"bullmq\", \"kafka\", \"mqtt\", \"rabbitmq\"],\n            \"consumesFrom\":[\"bullmq\", \"kafka\", \"mqtt\", \"rabbitmq\"],\n        },\n    },\n    \"kafka\": {\n        \"CLIENT_ID\": \"my-kafka-id\",\n        \"BROKER_HOST\": \"localhost\",\n        \"BROKER_PORT\": \"9092\",\n        \"GROUP_CONSUMER_ID\": \"my-consumer-group\",\n    },\n    \"bullmq\": {\n        \"REDIS_HOST\": \"localhost\",\n        \"REDIS_PORT\": \"6379\",\n        \"REDIS_PASSWORD\": \"\",\n        \"REDIS_DB\": 4,\n    },\n    \"mqtt\": {\n        \"MQTT_HOST\": \"localhost\",\n        \"MQTT_PORT\": \"1883\",\n        \"MQTT_PROTOCOL\": \"http\",\n        \"MQTT_USERNAME\": \"username\",\n        \"MQTT_PASSWORD\": \"password\",\n    },\n    \"rabbitmq\": {\n        \"RABBITMQ_HOST\": \"localhost:5672\",\n        \"RABBITMQ_USERNAME\": \"user\",\n        \"RABBITMQ_PASSWORD\": \"password\",\n        \"RABBITMQ_QUEUE\": \"flowbuild\"\n    }\n});\n\nconst consumerCallback = (topic: string, receivedMessage: string) =\u003e {\n    console.log({topic, receivedMessage});\n};\n\nawait stream.connect(consumerCallback);\nawait stream.produce(\n    \"event-topic\", \n    {\"mensagem\": \"This is an test\"},\n);\n\nawait stream.produce(\n    \"event-topic\", \n    {\"mensagem\": \"This is another test\"},\n);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflow-build%2Fstreamers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflow-build%2Fstreamers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflow-build%2Fstreamers/lists"}