Coder Social home page Coder Social logo

solars / stomp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stompgem/stomp

1.0 2.0 0.0 405 KB

A ruby gem for sending and receiving messages from a Stomp protocol compliant message queue. Includes: failover logic, ssl support.

Home Page: http://rubyforge.org/projects/stomp/

License: Apache License 2.0

Ruby 100.00%

stomp's Introduction

README

Overview

An implementation of the Stomp protocol for Ruby. See:

Example Usage

client = Stomp::Client.new("test", "user", "localhost", 61613)
client.send("/my/queue", "hello world!")
client.subscribe("/my/queue") do |msg|
  p msg
end

Failover + SSL Example URL Usage

options = "initialReconnectDelay=5000&randomize=false&useExponentialBackOff=false"

#remotehost1 uses SSL, remotehost2 doesn't
client = Stomp::Client.new("failover:(stomp+ssl://login1:passcode1@remotehost1:61612,stomp://login2:passcode2@remotehost2:61613)?#{options}")

client.send("/my/queue", "hello world!")
client.subscribe("/my/queue") do |msg|
  p msg
end

Hash Login Example Usage

hash = {
    :hosts => [
      {:login => "login1", :passcode => "passcode1", :host => "remotehost1", :port => 61612, :ssl => true},
      {:login => "login2", :passcode => "passcode2", :host => "remotehost2", :port => 61613, :ssl => false},

    ],
    # These are the default parameters, don't need to be set
    :initial_reconnect_delay => 0.01,
    :max_reconnect_delay => 30.0,
    :use_exponential_back_off => true,
    :back_off_multiplier => 2,
    :max_reconnect_attempts => 0,
    :randomize => false,
    :backup => false,
    :timeout => -1,
    :connect_headers => {},
    :parse_timeout => 5,
    :logger => nil,
  }

  # for client
  client = Stomp::Client.new(hash)

  # for connection
  connection = Stomp::Connection.new(hash)

Contact info

Up until March 2009 the project was maintained and primarily developed by Brian McCallister.

The project is now maintained by Johan Sørensen <[email protected]> and others.

Source Code

https://github.com/morellon/stomp/
http://gitorious.org/projects/stomp/
http://github.com/js/stomp/

Project urls

Project Home :

http://gitorious.org/projects/stomp/
http://rubyforge.org/projects/stomp/

Stomp Protocol Info :

http://stomp.github.com/index.html
http://stomp.codehaus.org/Protocol

Contributors

The following people have contributed to Stomp:

stomp's People

Contributors

gmallard avatar grempe avatar js avatar kiall avatar kpumuk avatar neilw avatar shortcut-kinder avatar tonyg avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.