Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
QueueingRabbit provides a Ruby DSL to interact with RabbitMQ. It is fairly flexible and allows you to integrate with existing infrastructure and naming conventions. It currently offers gems bunny and amqp as supported back-ends.
I built this gem at Wildbit in 2012. Back then there weren’t any solid generic queueing systems targeting RabbitMQ for Ruby. The gem was open-sourced in early 2013, but I never put any effort into selling it to the community. Even though the gem is working, maintained, and is still used by Wildbit in production, in the long run you should be better with now-existing mainstream alternatives like hutch and sneakers.
The following Ruby program publishes an excerpt of Joseph Brodsky’s poem line by line to a RabbitMQ exchange and prints received messages on the screen.
require 'queueing_rabbit'
class Reciter < QueueingRabbit::AbstractJob
def perform
puts payload
end
end
worker = QueueingRabbit::Worker.new(Reciter)
poem = <<-
I said fate plays a game without a score,
and who needs fish if you've got caviar?
The triumph of the Gothic style would come to pass
and turn you on - no need for coke, or grass.
I sit by the window. Outside, an aspen.
When I loved, I loved deeply. It wasn't often.
Thread.new {
poem.each_line { |l| Reciter.enqueue(l) }
sleep 5
worker.stop
}
worker.work!
This code has following important side effects:
Reciter
is created with default options (if not exists).Reciter
.Reciter
queue.Bunny
is a pseudo-synchronous RabbitMQ client. Amqp
is EventMachine-based and heavily asynchronous (lots of callbacks involved). Both clients are in active development, thoroughly documented and fairly stable.
Choose bunny
if you don’t want to worry about blocking I/O and EventMachine-compilant drivers. Choose amqp
if you’re familiar with EventMachine, designing a lightweight app from scratch and performance is a serious concern. Obviously there are exceptions, and no one knows your requirements better than you.
Also, you can use both of them. For example, you may decide to publish via bunny
from your Rails app and use amqp
in your background worker.
Check out the project wiki for additional guidance. If you have questions or something doesn’t work for you, feel free to file issues.
QueueingRabbit supports MRI Ruby version 1.9.3 and above. It is still compilant with Ruby 1.8.7, but some features may not work as expected and the compatibility will be removed in the near future.
Add this line to your application's Gemfile
:
gem 'queueing_rabbit'
And then execute:
$ bundle
Or install it globally as:
$ gem install queueing_rabbit
git checkout -b my-new-feature
)git commit -am 'Added some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that queueing_rabbit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.