
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
A Ruby gem that implements the outbox pattern for Kafka message publishing to ensure message durability and delivery reliability.
Add this line to your application's Gemfile:
gem 'pigeon'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install pigeon
Configure the gem with your Karafka and Kafka details using dry-configurable:
Pigeon.configure do |config|
config.client_id = "my-application"
config.kafka_brokers = ["kafka1:9092", "kafka2:9092"]
config.max_retries = 5
config.retry_delay = 60 # seconds
config.max_retry_delay = 3600 # 1 hour
config.encrypt_payload = false
config.retention_period = 7 # days
# Additional Karafka-specific configuration
config.karafka_config = {
delivery: :async,
kafka: {
'bootstrap.servers': 'kafka1:9092,kafka2:9092',
'request.required.acks': 1
}
}
end
You can also access configuration values directly:
# Get the current configuration
client_id = Pigeon.config.client_id
max_retries = Pigeon.config.max_retries
# Simple publishing
Pigeon.publisher.publish(
topic: "my-topic",
payload: { user_id: 123, action: "signup" }
)
# With additional options
Pigeon.publisher.publish(
topic: "my-topic",
payload: { user_id: 123, action: "signup" },
key: "user-123",
headers: { "source" => "web-app" },
sync: true, # attempt immediate publishing
partition: 1
)
# Process pending messages
stats = Pigeon.processor.process_pending(batch_size: 100)
puts "Processed: #{stats[:processed]}, Succeeded: #{stats[:succeeded]}, Failed: #{stats[:failed]}"
# Process a specific message
success = Pigeon.processor.process_message("message-id")
# Clean up old processed messages
cleaned = Pigeon.processor.cleanup_processed(older_than: 14) # days
puts "Cleaned up #{cleaned} messages"
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
Bug reports and pull requests are welcome on GitHub.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that duramq demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.