Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View Abdulrazak-Alkl's full-sized avatar

Abdul Razzak Alkel Abdulrazak-Alkl

View GitHub Profile
require 'bunny'
require 'active_support/all'
class Rabbitmq
def self.publish(message, to, delay)
channel = connection.create_channel
queue = channel.queue(to, durable: true)
channel.exchange_declare(DELAYED_EXCHANGE_NAME, 'x-delayed-message', durable: true, arguments: {'x-delayed-type' => 'direct'})
queue.bind(DELAYED_EXCHANGE_NAME, routing_key: queue.name)
$ ruby -v
jruby 9.1.7.0 (2.3.1) 2017-01-11 68056ae Java HotSpot(TM) 64-Bit Server VM 24.80-b11 on 1.7.0_80-b15 +jit [linux-x86_64]
$ gem install bunny
Successfully installed bunny-2.6.3
1 gem installed
$ irb
irb(main):001:0> require 'bunny'
NameError: uninitialized constant IO::EWOULDBLOCKWaitReadable
@Abdulrazak-Alkl
Abdulrazak-Alkl / test.js
Created March 1, 2013 12:41
test code........
function test()
{
if (true)
document.window.Location = "google.com";
}
function test()
{
if (true)
document.window.Location = "google.com";
}
function test()
{
if (true)
document.window.Location = "google.com";
}