Project

amqparty

0.01
No commit activity in last 3 years
No release in over 3 years
AMQP-HTTP compliant replacement for HTTParty
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 0
~> 3.0

Runtime

>= 0.10.0
 Project Readme

Amqparty

A AMQP-HTTP compliant modification of HTTParty for use with jackalope

Travis CI

Installation

Add this line to your application's Gemfile:

gem 'amqparty'

And then execute:

$ bundle

Or install it yourself as:

$ gem install amqparty

Usage

First configure AMQParty to connect to your AMQP broker (RabbitMQ or other)

AMQParty.configure do |c|
  c.amqp_host = 'localhost'
end

Then you can use it to talk to your service:

AMQParty.get("amqp://queue.name/path")

Uri scheme must be amqp or amqps. Hostname is actually the queue name.

Post and put also work. Delete, head, options are untested.

Valid configuration parameters are shown below:

Parameters Description Default Value
amqp_host host name or IP address of the rabbitmq server localhost
port rabbitmq server port 5672
username username to use for the rabbitmq server connection guest
password password to use for the rabbitmq server connection guest
tls use TLS when connecting to the rabbitmq server false
tls_ca_certificates an array of paths to CA certificates in pem format []
tls_cert path to the client certificate for SSL connections in pem format nil
tls_key path to the client private key for SSL connections in pem format nil
verify_peer disable/enable peer verification (used with TLS) false
request_timeout value in seconds indicating the reply wait timeout for an amqp request 5
hearbeat value in seconds indicating the heartbeat 60

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request