{"id":22650561,"url":"https://github.com/bleacherreport/carrot","last_synced_at":"2025-04-12T03:12:26.403Z","repository":{"id":57482276,"uuid":"137128357","full_name":"bleacherreport/carrot","owner":"bleacherreport","description":"AMQP Connection Manager","archived":false,"fork":false,"pushed_at":"2018-07-09T15:57:57.000Z","size":41,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-12T03:12:15.864Z","etag":null,"topics":["amqp","connection-manager","elixir","rabbitmq"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bleacherreport.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}},"created_at":"2018-06-12T21:12:52.000Z","updated_at":"2023-05-14T14:39:01.000Z","dependencies_parsed_at":"2022-09-02T04:21:00.661Z","dependency_job_id":null,"html_url":"https://github.com/bleacherreport/carrot","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bleacherreport%2Fcarrot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bleacherreport%2Fcarrot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bleacherreport%2Fcarrot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bleacherreport%2Fcarrot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bleacherreport","download_url":"https://codeload.github.com/bleacherreport/carrot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248510003,"owners_count":21116130,"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":["amqp","connection-manager","elixir","rabbitmq"],"created_at":"2024-12-09T08:34:55.562Z","updated_at":"2025-04-12T03:12:26.380Z","avatar_url":"https://github.com/bleacherreport.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Carrot\n\n\u003e AMQP connection manager\n\n[![Build Status](https://www.travis-ci.org/bleacherreport/carrot.svg?branch=master)](https://www.travis-ci.org/bleacherreport/carrot)\n[![codecov](https://codecov.io/gh/bleacherreport/carrot/branch/master/graph/badge.svg)](https://codecov.io/gh/bleacherreport/carrot)\n\n## Installation\n\nThe package can be installed by adding `carrot` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [{:carrot, \"~\u003e 1.0\"}]\nend\n```\n\n## Configuration and startup\n\nCarrot does not use `Mix` or `Application` configuration. The `ConnectionManager`\nsimply takes a `Keyword` list of connection options as the first argument to\n`start_link/2`:\n\n```elixir\n{:ok, pid} = Carrot.ConnectionManager.start_link([\n  host: \"localhost\",\n  password: \"guest\",\n  username: \"guest\",\n  virtual_host: \"/\"\n])\n```\n\n## Supervision\n\nThe `ConnectionManager` is meant to be started as part of a supervision tree.\nTherefore, it is most common to register the process with a name. The second\nargument to `start_link/2` is a list of `GenServer`\n[options](https://hexdocs.pm/elixir/GenServer.html#t:option/0).\n\nSee [Name Registration](https://hexdocs.pm/elixir/GenServer.html#module-name-registration)\nfor more details.\n\n```elixir\n...\nworker(Carrot.ConnectionManager, [\n  [\n    host: \"localhost\",\n    password: \"guest\",\n    username: \"guest\",\n    virtual_host: \"/\"\n  ],\n  [\n    name: Carrot.ConnectionManager\n  ]\n]),\n...\n```\n\n## Potential gotchas\n\nIf your application dependends on `cowboy` at `v1.x`, you may need to add a\ndependency override for `ranch`:\n\n```elixir\n{:ranch, \"~\u003e 1.4\", override: true}\n```\n\nIt appears there are no breaking changes between `ranch` `1.3` and `1.5`.\n\nAnother issue you might come across is from a dependency on `lager`. You may\nneed to ensure that `lager` is started before Elixir's `logger`:\n\n```elixir\n# mix.exs\ndef application do\n  [applications: [:lager, :logger]]\nend\n```\n\nYou can also silence `lager` by setting its log level to `critical`:\n\n```elixir\nconfig :lager,\n  handlers: [level: :critical]\n```\n\n## Documentation\n\nDocumentation can be be found on [HexDocs](https://hexdocs.pm/carrot).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbleacherreport%2Fcarrot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbleacherreport%2Fcarrot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbleacherreport%2Fcarrot/lists"}