{"id":21572266,"url":"https://github.com/templum/rabbitmq-connector","last_synced_at":"2025-04-06T10:11:51.586Z","repository":{"id":37470236,"uuid":"127464378","full_name":"Templum/rabbitmq-connector","owner":"Templum","description":"The connector enables a developer to trigger OpenFaaS functions from Rabbit MQ using Messages with specific Routing Keys.","archived":false,"fork":false,"pushed_at":"2025-03-18T00:18:19.000Z","size":1385,"stargazers_count":88,"open_issues_count":13,"forks_count":14,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2025-03-30T08:12:50.293Z","etag":null,"topics":["kubernetes","mit-license","openfaas","openfaas-connector","rabbit-mq","rabbitmq","rabbitmq-connector"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Templum.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2018-03-30T19:15:16.000Z","updated_at":"2025-02-20T07:18:45.000Z","dependencies_parsed_at":"2022-09-13T06:50:42.300Z","dependency_job_id":"2ca7b8e6-ed87-48ba-b4d9-d7e9d1e15edc","html_url":"https://github.com/Templum/rabbitmq-connector","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Templum%2Frabbitmq-connector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Templum%2Frabbitmq-connector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Templum%2Frabbitmq-connector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Templum%2Frabbitmq-connector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Templum","download_url":"https://codeload.github.com/Templum/rabbitmq-connector/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247464222,"owners_count":20942970,"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","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":["kubernetes","mit-license","openfaas","openfaas-connector","rabbit-mq","rabbitmq","rabbitmq-connector"],"created_at":"2024-11-24T11:18:46.517Z","updated_at":"2025-04-06T10:11:51.548Z","avatar_url":"https://github.com/Templum.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenFaaS RabbitMQ Connector\r\n\r\n[![Go Report Card](https://goreportcard.com/badge/github.com/Templum/rabbitmq-connector)](https://goreportcard.com/report/github.com/Templum/rabbitmq-connector)\r\n[![CodeFactor](https://www.codefactor.io/repository/github/templum/rabbitmq-connector/badge)](https://www.codefactor.io/repository/github/templum/rabbitmq-connector)\r\n![CI](https://github.com/Templum/rabbitmq-connector/workflows/CI/badge.svg)\r\n![Docker Release](https://github.com/Templum/rabbitmq-connector/workflows/Docker%20Release/badge.svg)\r\n[![codecov](https://codecov.io/gh/Templum/rabbitmq-connector/branch/develop/graph/badge.svg)](https://codecov.io/gh/Templum/rabbitmq-connector)\r\n\r\nThis project is an unofficial trigger for OpenFaaS functions based on RabbitMQ Messages. Where it leverages the\r\n`Routing keys` to call OpenFaaS functions which listen to that `topic`. For usage information please go to [here](#Usage).\r\n\r\n## Usage\r\n\r\nUsing the [OpenFaaS CLI](https://github.com/openfaas/faas-cli) or [Rest API](https://github.com/openfaas/faas/tree/master/api-docs)\r\ndeploy a function which has an `annotation` named `topic`, this has to be a comma-separated string of the relevant topics.\r\nE.g. `log,monitoring,billing`.\r\n\r\nIn case an error occurred during the invocation of the function(s) the message is attempted to be transferred back to the Queue. Therefore you should ensure your functions can handle being called potentially twice with the same payload.\r\n\r\nFurther the returned output from the function is ignored, as the connector currently only supports fire \u0026 forget flows.\r\n\r\nPlease also make sure to check out the official Rabbit MQ documentation [here](https://www.rabbitmq.com/production-checklist.html) and [here](https://www.rabbitmq.com/monitoring.html) in order to avoid message dropping.\r\n\r\n### Configuration\r\n\r\nGeneral Connector:\r\n\r\n* `basic_auth`: Toggle to activate or deactivate basic_auth (E.g `1` || `true`)\r\n* `secret_mount_path`: The path to a file containing the basic auth secret for the OpenFaaS gateway\r\n* `OPEN_FAAS_GW_URL`: URL to the OpenFaaS gateway defaults to `http://gateway:8080`\r\n* `REQ_TIMEOUT`: Request Timeout for invocations of OpenFaaS functions defaults to `30s`\r\n* `TOPIC_MAP_REFRESH_TIME`: Refresh time for the topic map defaults to `60s`\r\n* `INSECURE_SKIP_VERIFY`: Allows to skip verification of HTTP Cert for Communication Connector \u003c=\u003e OpenFaaS default is `false`. It is recommended to keep false, as enabling it opens up the possibility of a man in the middle attack.\r\n* `MAX_CLIENT_PER_HOST`: Allows to specify the maximum number connections/clients that will be opened to an individual host (function), defaults to `256`.\r\n\r\nTLS Config:\r\n\r\n* `TLS_ENABLED`: Set this to `true` if your RabbitMQ requires a TLS connection. Default to `false` if not set.\r\n* `TLS_CA_CERT_PATH`: Path to your CA Cert, make sure golang process is allowed to access it.\r\n* `TLS_SERVER_CERT_PATH`: Path to Client Cert, make sure golang process is allowed to access it.\r\n* `TLS_SERVER_KEY_PATH`: Path to Client Key, make sure golang process is allowed to access it.\r\n\r\n\u003e Make sure if TLS is enabled, the provided `RMQ_HOST` matches the common name from the certificate. Otherwise the connection will yield a error\r\n\r\nRabbitMQ Related:\r\n\r\n* `RMQ_HOST`: Hostname/ip of Rabbit MQ\r\n* `RMQ_PORT`: Port of Rabbit MQ\r\n* `RMQ_VHOST`: Used to specify the vhost for Rabbit MQ, will default to `/`\r\n* `RMQ_USER`: Defaults to \"\", if user and pass are both \"\" than no credentials will be used for connecting\r\n* `RMQ_PASS`: Defaults to \"\", if user and pass are both \"\" than no credentials will be used for connecting\r\n* `PATH_TO_TOPOLOGY`: Path to the yaml describing the topology, has _no_ default and is *required*\r\n\r\n### Topology Configuration\r\n\r\nCompared to v0 this is the biggest change, you can bring your existing Exchange definition to the connector.\r\nThe topology is defined in the following format ([Example](./artifacts/example_topology.yaml)):\r\n\r\n```yaml\r\n# Name of the exchange\r\n- name: Exchange_Name # Required\r\n  topics: [Foo, Bar] # Required\r\n  # Do we need to declare the exchange ? If it already exists it verifies that the exchange matches the configuration\r\n  declare: true # Default: false\r\n  # Either direct or topic\r\n  type: \"direct\" # Required \r\n  # Persistence of Exchange between Rabbit MQ Server restarts\r\n  durable: false # Default: false\r\n  # Auto Deletes Exchange once all consumer are gone\r\n  auto-deleted: false # Default: false\r\n```\r\n\r\nQueues will be configured accordingly to there exchange declaration in regards to `durable` \u0026 `auto-deleted`. Further the name of the queue\r\nwill be generated based on the following schema: `OpenFaaS_{Exchange_Name}_${Topic}`.\r\n\r\n## Bug Reporting \u0026 Feature Requests\r\n\r\nPlease feel free to report any issues or Feature request on the [Issue Tab](https://github.com/Templum/rabbitmq-connector/issues).\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftemplum%2Frabbitmq-connector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftemplum%2Frabbitmq-connector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftemplum%2Frabbitmq-connector/lists"}