{"id":8948,"date":"2019-04-15T14:10:24","date_gmt":"2019-04-15T17:10:24","guid":{"rendered":"http:\/\/blog.plataformatec.com.br\/?p=8948"},"modified":"2019-04-15T14:44:26","modified_gmt":"2019-04-15T17:44:26","slug":"announcing-the-rabbitmq-connector-for-broadway","status":"publish","type":"post","link":"http:\/\/blog.plataformatec.com.br\/2019\/04\/announcing-the-rabbitmq-connector-for-broadway\/","title":{"rendered":"Announcing the RabbitMQ Connector for Broadway"},"content":{"rendered":"
Since the announcement of Broadway<\/a> a couple of months ago, we’ve received a very positive response from the community. We were able to gather some great feedback regarding the architecture, suggestions for extending the API and requests for new connectors to allow attaching other technologies to Broadway pipelines. One of the most requested additions was a RabbitMQ connector that would allow Broadway pipelines to consume messages from RabbitMQ.<\/p>\n Today we’re glad to announce the first release of BroadwayRabbitMQ<\/a>, a RabbitMQ connector for Broadway by Plataformatec<\/a>.<\/p>\n The BroadwayRabbitMQ connector ships with a custom Broadway producer that is responsible for:<\/p>\n In order to consume messages from RabbitMQ, you need to configure your Broadway pipeline with one or more If you’re consuming data from an existing broker that requires authorization, you’ll need to provide your credentials using the The producer also exposes other options to customize If you want to give We’ll continue to collect feedback from the community in order to improve the tools around Broadway. We also encourage you to contribute to this project or any other in the Broadway ecosystem, either by reporting bugs or suggesting improvements. If you’re working with data ingestion\/processing pipelines and you’d like to discuss GenStage, Broadway or anything Elixir related, reach out<\/a> and we’ll be glad to talk.<\/p>\n Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":" Since the announcement of Broadway a couple of months ago, we’ve received a very positive response from the community. We were able to gather some great feedback regarding the architecture, suggestions for extending the API and requests for new connectors to allow attaching other technologies to Broadway pipelines. One of the most requested additions was … \u00bb<\/a><\/p>\n","protected":false},"author":77,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[1],"tags":[143],"aioseo_notices":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/blog.plataformatec.com.br\/wp-json\/wp\/v2\/posts\/8948"}],"collection":[{"href":"http:\/\/blog.plataformatec.com.br\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.plataformatec.com.br\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.plataformatec.com.br\/wp-json\/wp\/v2\/users\/77"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.plataformatec.com.br\/wp-json\/wp\/v2\/comments?post=8948"}],"version-history":[{"count":10,"href":"http:\/\/blog.plataformatec.com.br\/wp-json\/wp\/v2\/posts\/8948\/revisions"}],"predecessor-version":[{"id":8960,"href":"http:\/\/blog.plataformatec.com.br\/wp-json\/wp\/v2\/posts\/8948\/revisions\/8960"}],"wp:attachment":[{"href":"http:\/\/blog.plataformatec.com.br\/wp-json\/wp\/v2\/media?parent=8948"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.plataformatec.com.br\/wp-json\/wp\/v2\/categories?post=8948"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.plataformatec.com.br\/wp-json\/wp\/v2\/tags?post=8948"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}Features<\/h2>\n
\n
Usage<\/h2>\n
BroadwayRabbitMQ<\/code> producers:<\/p>\n
defmodule MyBroadway do\n use Broadway\n\n def start_link(_opts) do\n Broadway.start_link(__MODULE__,\n name: __MODULE__,\n producers: [\n default: [\n module: {BroadwayRabbitMQ.Producer,\n queue: \"my_queue\"\n },\n stages: 2\n ]\n ],\n processors: [\n default: [\n stages: 50\n ]\n ]\n )\n end\n\n def handle_message(_, message, _) do\n IO.inspect(message.data, label: \"Got message\")\n message\n end\n end\n<\/code><\/pre>\n
:connection<\/code> option:<\/p>\n
...\nproducers: [\n default: [\n module: {BroadwayRabbitMQ.Producer,\n queue: \"my_queue\",\n connection: [\n username: \"user\",\n password: \"password\",\n ]\n ...\n }\n ]\n]\n...\n<\/code><\/pre>\n
:connection<\/code> and
:qos<\/code> configurations. For a full list of options, please see the BroadwayRabbitMQ.Producer<\/a> documentation.<\/p>\n
Next steps<\/h2>\n
BroadwayRabbitMQ<\/code> a try, we strongly recommend you to take a look at our RabbitMQ Guide<\/a>. There you’ll find more details on usage and configuration, as well as valuable information about some of the design choices behind the implementation.<\/p>\n