AMQP-HTTP compliant Server to run your rack (rails) application using AMQP as the transport protocol.
Add this line to your application's Gemfile:
gem 'jackalope'
And then execute:
$ bundle
Or install it yourself as:
$ gem install jackalope
jackalope -q <queue name> <rackup file>
for rails app:
jackalope -q my.queue config.ru
all parameters:
Parameters | Description | Default Value |
---|---|---|
-q, --queue | rabbitmq queue name for application communication | default.queue |
-s, --server | rabbitmq server host or IP address | localhost |
-p, --port | rabbitmq server port | 5672 |
-u, --user | username to use for the rabbitmq server connection | guest |
-P, --pass | password to use for the rabbitmq server connection | guest |
-t, --tls | use TLS when connecting to the rabbitmq server | false |
-c, --cert | path to the client certificate (pem format) | nil |
-k, --key | path to the client private key (pem format) | nil |
-r, --prefetch | number of messages to rcv w/o sending consumer ack | 1 |
-h, --heartbeat | heartbeat to use when connecting to rabbitmq server | 5 (seconds) |
-D, --daemonize | run daemonized in the background | false |
--pid | pid file path | nil |
--log | log file for stdout | nil |
--conf | configuration file | nil |
-d, --debug | turn on some debugging messages | false |
-h, --help | show the help dialog | N/A |
-v, --version | show the version | N/A |
Rack::AMQP.configure do |config|
# config.queue_name = 'default.queue'
# config.rabbit_host = 'localhost'
# config.rabbit_port = 5672
# config.username = 'guest'
# config.password = 'guest'
# config.pid_file = "#{File.dirname(__FILE__)}/../../tmp/pids/jackalope.pid"
# config.stdout_file = "#{File.dirname(__FILE__)}/../../log/jackalope.log"
# config.stderr_file = config.stdout_file
end
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request