All Projects → ruby-amqp → Amqp

ruby-amqp / Amqp

EventMachine-based RabbitMQ client. Prefer Bunny: http://rubybunny.info. See documentation guides at http://rubyamqp.info.

Programming Languages

ruby
36898 projects - #4 most used programming language

Labels

Projects that are alternatives of or similar to Amqp

Netcoremicroservicessample
Sample using micro services in .NET Core 3.1 Focusing on clean code
Stars: ✭ 403 (-36.13%)
Mutual labels:  rabbitmq
Nestjs
A collection of badass modules and utilities to help you level up your NestJS applications 🚀
Stars: ✭ 475 (-24.72%)
Mutual labels:  rabbitmq
Cloud2020
SpringCloud
Stars: ✭ 550 (-12.84%)
Mutual labels:  rabbitmq
Servicebus
Simple service bus for sending events between processes using amqp.
Stars: ✭ 415 (-34.23%)
Mutual labels:  rabbitmq
Invenio
Invenio digital library framework
Stars: ✭ 469 (-25.67%)
Mutual labels:  rabbitmq
Plumber
A swiss army knife CLI tool for interacting with Kafka, RabbitMQ and other messaging systems.
Stars: ✭ 514 (-18.54%)
Mutual labels:  rabbitmq
Gnomock
Test your code without writing mocks with ephemeral Docker containers 📦 Setup popular services with just a couple lines of code ⏱️ No bash, no yaml, only code 💻
Stars: ✭ 398 (-36.93%)
Mutual labels:  rabbitmq
Rabbitmq Tutorials
Tutorials for using RabbitMQ in various ways
Stars: ✭ 5,643 (+794.29%)
Mutual labels:  rabbitmq
Pdf
编程电子书,电子书,编程书籍,包括C,C#,Docker,Elasticsearch,Git,Hadoop,HeadFirst,Java,Javascript,jvm,Kafka,Linux,Maven,MongoDB,MyBatis,MySQL,Netty,Nginx,Python,RabbitMQ,Redis,Scala,Solr,Spark,Spring,SpringBoot,SpringCloud,TCPIP,Tomcat,Zookeeper,人工智能,大数据类,并发编程,数据库类,数据挖掘,新面试题,架构设计,算法系列,计算机类,设计模式,软件测试,重构优化,等更多分类
Stars: ✭ 12,009 (+1803.17%)
Mutual labels:  rabbitmq
Dnc
dnc 去中心化 开源社区 轻联盟 dncto.com QQ群 779699538
Stars: ✭ 551 (-12.68%)
Mutual labels:  rabbitmq
Cookbook
🎉🎉🎉JAVA高级架构师技术栈==任何技能通过 “刻意练习” 都可以达到融会贯通的境界,就像烹饪一样,这里有一份JAVA开发技术手册,只需要增加自己练习的次数。🏃🏃🏃
Stars: ✭ 428 (-32.17%)
Mutual labels:  rabbitmq
Testcontainers Spring Boot
Container auto-configurations for spring-boot based integration tests
Stars: ✭ 460 (-27.1%)
Mutual labels:  rabbitmq
Flower
Real-time monitor and web admin for Celery distributed task queue
Stars: ✭ 5,036 (+698.1%)
Mutual labels:  rabbitmq
Run Aspnetcore Microservices
Microservices on .Net platforms which used Asp.Net Web API, Docker, RabbitMQ, MassTransit, Grpc, Ocelot API Gateway, MongoDB, Redis, PostgreSQL, SqlServer, Dapper, Entity Framework Core, CQRS and Clean Architecture implementation. Also includes Cross-Cutting concerns like Implementing Centralized Distributed Logging with Elasticsearch, Kibana and SeriLog, use the HealthChecks with Watchdog, Implement Retry and Circuit Breaker patterns with Polly and so on.. See Microservices Architecture and Step by Step Implementation on .NET Course w/ discount->
Stars: ✭ 406 (-35.66%)
Mutual labels:  rabbitmq
Machinery
Machinery is an asynchronous task queue/job queue based on distributed message passing.
Stars: ✭ 5,821 (+822.5%)
Mutual labels:  rabbitmq
Spring Samples For All
spring、spring-boot、spring-cloud 常用整合用例
Stars: ✭ 401 (-36.45%)
Mutual labels:  rabbitmq
Cap
Distributed transaction solution in micro-service base on eventually consistency, also an eventbus with Outbox pattern
Stars: ✭ 5,208 (+725.36%)
Mutual labels:  rabbitmq
Aio Pika
AMQP 0.9 client designed for asyncio and humans.
Stars: ✭ 611 (-3.17%)
Mutual labels:  rabbitmq
Docker Alpine
Docker containers running Alpine Linux and s6 for process management. Solid, reliable containers.
Stars: ✭ 574 (-9.03%)
Mutual labels:  rabbitmq
Ipfs Search
Search engine for the Interplanetary Filesystem.
Stars: ✭ 519 (-17.75%)
Mutual labels:  rabbitmq

Ruby amqp gem: the asynchronous Ruby RabbitMQ client

Ruby amqp gem is a feature-rich, EventMachine-based RabbitMQ client with batteries included.

It's the original RabbitMQ client for Ruby. These days there are very solid alternatives available: Bunny for MRI and March Hare for JRuby.

It implement AMQP 0.9.1 and support RabbitMQ extensions to AMQP 0.9.1.

A Word of Warning: Use This Only If You Already Use EventMachine

Unless you already use EventMachine, there is no real reason to use this client. Consider Bunny or March Hare instead.

amqp gem brings in a fair share of EventMachine complexity which cannot be fully eliminated. Event loop blocking, writes that happen at the end of loop tick, uncaught exceptions in event loop silently killing it: it's not worth the pain unless you've already deeply invested in EventMachine and understand how it works.

So, just use Bunny or March Hare. You will be much happier.

I know what RabbitMQ is, how do I get started?

See Getting started with amqp gem and other amqp gem documentation guides. We recommend that you read AMQP 0.9.1 Model Explained, too.

What is RabbitMQ?

RabbitMQ is an open source messaging middleware that emphasizes interoperability between different technologies (for example, Java, .NET, Ruby, Python, Node.js, Erlang, Go, C and so on).

Key features of RabbitMQ are very flexible yet simple routing and binary protocol efficiency. RabbitMQ supports many sophisticated features, for example, message acknowledgements, queue length limit, message TTL, redelivery of messages that couldn't be processed, load balancing between message consumers and so on.

What is amqp gem good for?

One can use amqp gem to make Ruby applications interoperate with other applications (both Ruby and not). Complexity and size may vary from simple work queues to complex multi-stage data processing workflows that involve dozens or hundreds of applications built with all kinds of technologies.

Specific examples:

  • Events collectors, metrics & analytics applications can aggregate events produced by various applications (Web and not) in the company network.

  • A Web application may route messages to a Java app that works with SMS delivery gateways.

  • MMO games can use flexible routing AMQP provides to propagate event notifications to players and locations.

  • Price updates from public markets or other sources can be distributed between interested parties, from trading systems to points of sale in a specific geographic region.

  • Content aggregators may update full-text search and geospatial search indexes by delegating actual indexing work to other applications over AMQP.

  • Companies may provide streaming/push APIs to their customers, partners or just general public.

  • Continuous integration systems can distribute builds between multiple machines with various hardware and software configurations using advanced routing features of AMQP.

  • An application that watches updates from a real-time stream (be it markets data or Twitter stream) can propagate updates to interested parties, including Web applications that display that information in the real time.

Getting started with Ruby amqp gem

Install RabbitMQ

Please refer to the RabbitMQ installation guide. Note that for Ubuntu and Debian we strongly advice that you use RabbitMQ apt repository that has recent versions of RabbitMQ. RabbitMQ packages Ubuntu and Debian ship with are outdated even in recent (10.10) releases. Learn more in the RabbitMQ versions guide.

Install the gem

On Microsoft Windows

gem install eventmachine
gem install amqp

On other OSes

gem install amqp

"Hello, World" example

#!/usr/bin/env ruby
# encoding: utf-8

require 'amqp'

EventMachine.run do
  connection = AMQP.connect(:host => '127.0.0.1')
  puts "Connecting to RabbitMQ. Running #{AMQP::VERSION} version of the gem..."

  ch  = AMQP::Channel.new(connection)
  q   = ch.queue("amqpgem.examples.hello_world", :auto_delete => true)
  x   = ch.default_exchange

  q.subscribe do |metadata, payload|
    puts "Received a message: #{payload}. Disconnecting..."

    connection.close {
      EventMachine.stop { exit }
    }
  end

  x.publish "Hello, world!", :routing_key => q.name
end

Getting started guide explains this and two more examples in detail, and is written in a form of a tutorial. See AMQP 0.9.1 Model Explained if you want to learn more about RabbitMQ protocol principles & concepts.

Supported Ruby Versions

Modern amqp gem release series support

  • Ruby 2.4
  • Ruby 2.3
  • Ruby 2.2

The last series to support Ruby 1.9 was 1.5.x.

JRuby users should use March Hare.

Documentation: tutorials, guides & API reference

We believe that in order to be a library our users really love, we need to care about documentation as much as (or more) code readability, API beauty and autotomated testing across 5 Ruby implementations on multiple operating systems. We do care about our documentation: if you don't find your answer in documentation, we consider it a high severity bug that you should file to us. Or just complain to @rubyamqp on Twitter.

Tutorials

Getting started guide is written as a tutorial that walks you through 3 examples:

  • The "Hello, world" of messaging, 1-to-1 communication
  • Blabbr, a Twitter-like example of broadcasting (1-to-many communication)
  • Weathr, an example of sophisticated routing capabilities AMQP 0.9.1 has to offer (1-to-many or many-to-many communication)

all in under 20 minutes. AMQP 0.9.1 Concepts will introduce you to protocol concepts in less than 5 minutes.

Guides

Documentation guides describe the library itself as well as AMQP concepts, usage scenarios, topics like working with exchanges and queues, error handing & recovery, broker-specific extensions, TLS support, troubleshooting and so on. Most of the documentation is in these guides.

Examples

You can find many examples (both real-world cases and simple demonstrations) under examples directory in the repository. Note that those examples are written against version 0.8.0.rc1 and later. 0.6.x and 0.7.x may not support certain AMQP protocol or "DSL syntax" features.

There is also a work-in-progress Messaging Patterns and Use Cases With AMQP documentation guide.

API reference

API reference is up on rubydoc.info and is updated daily.

How to use AMQP gem with Ruby on Rails, Sinatra and other Web frameworks

We cover Web application integration for multiple Ruby Web servers in Connecting to the broker guide.

Community

Maintainer Information

amqp gem is maintained by Michael Klishin.

Continuous Integration

Continuous Integration status

Links

License

amqp gem is licensed under the Ruby License.

Credits and copyright information

  • The Original Code is tmm1/amqp.
  • The Initial Developer of the Original Code is Aman Gupta.
  • Copyright (c) 2008 - 2010 Aman Gupta.
  • Contributions from Jakub Stastny are Copyright (c) 2011-2012 VMware, Inc.
  • Copyright (c) 2010 — 2017 ruby-amqp group members.

Currently maintained by ruby-amqp group members Special thanks to Dmitriy Samovskiy, Ben Hood and Tony Garnock-Jones.

How can I learn more about RabbitMQ and messaging in general?

Documentation Resources

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].