Skip to content

errbit/hoptoad_zmq_notifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hoptoad 0MQ Notifier

Hoptoad notifier extension for speaking to the server over 0mq socket.

One should use this library to speak to Errbit server extended by Errbit 0MQ Handler (github.com/oruen/errbit_zmq_handler)

Advantage of using Hoptoad 0MQ Notifier is async notices sending. You no longer block your app flow with requests to exception handling server. 0MQ does all that stuff.

Requirements

Ruby 1.9 or JRuby. ffi-rzmq is not working with MRI (and REE) 1.8.7.

Installation

Install zeromq 2.1 from www.zeromq.org/ or your favorite package system.

Install the gem:

gem install hoptoad_zmq_notifier

Usage

In the same initializer you initialize your Hoptoad Notifier client:

# Your Errbit server config. Only api_key is still relevant.
HoptoadNotifier.configure do |config|
   config.api_key = 'ba134e3c7fab581e8685cde0a5e68728'
   config.host    = 'localhost'
   config.port    = 3000
end

# 0MQ notifier config
HoptoadZmqNotifier.configure do |config|
  # Address to connect to send exception notifications
  config.uri = "tcp://127.0.0.1:9998"
end

From now all notices will be send through 0MQ socket to address you defined.

License

HoptoadZmqNotifier is Copyright © 2011 oruen. It is free software, and may be redistributed under the terms specified in the MIT-LICENSE file.

About

Hoptoad Notifier extension making hoptoad client speak to server via 0MQ socket.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages