Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
StompJob gives a Resque-like interface for message brokers using the STOMP protocol. It uses https://github.com/stompgem/stomp under the hood.
Add this line to your application's Gemfile:
gem 'stomp_job'
And then execute:
$ bundle
Or install it yourself as:
$ gem install stomp_job
To create a worker class, simply add include StompJob::Worker
to your class, configure it with the stomp_options
class method, and define a perform
method.
To enqueue a message, call YourWorker.enqueue(*args)
, where YourWorker is your worker class, and *args has the same arity as your perform method.
To run your workers, run ./bin/stomper
. Make sure that stomper has your workers loaded by passing --require flags. e.g.
./bin/stomper --require=./examples/scream_worker
See the examples/ directory for example usage.
If you're working with rails, start the workers by running ./bin/stomper --rails
instead.
Additionally, there is an ActiveJob adapter included with this gem. To use it, simply add
require 'stomp_job/extensions/active_job_adapter'
config.active_job.queue_adapter = :stomp_job
to your config/application.rb file.
You can configure the connection to your STOMP broker as follows:
StompJob::Configuration.setup do |config|
config[:hosts] = [
{login: "your_username", passcode: "your_password", host: "example.com", port: 61613}
]
config[:reliable] = true
config[:initial_reconnect_delay] = 0.01
# config[:some_option] = some_value
end
Alternatively you can call
StompJob::Configuration.load_config!(file="config/stomp_job.yml")
to load connection information out of a config file. This is the recommended method for loading config from a rails app.
Any contributions should include tests. There is a dockerized ArtemisMQ instance in spec/activemq-artemis/ that you can test against. Credit for the Docker stuff goes to https://github.com/vromero/activemq-artemis-docker.
Testing running the ArtemisMQ instance are NOT run by default, and can be run with
rspec --tag integration
Make sure you have the ArtemisMQ docker instance running locally when you run this or else tests will hang. Assuming a sane docker setup, the docker instance can be launched with
docker run -d --name artemis -p 61613:61613 vromero/activemq-artemis
The below are some current issues/features that could still be implemented for this gem:
StompJob.logger = Rails.logger
Bug reports and pull requests are welcome on GitHub at https://github.com/mGageTechOps/stomp_job. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that stomp_job demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.