cloudamqp / amqp-client.rb Goto Github PK
View Code? Open in Web Editor NEWModern AMQP 0-9-1 Ruby client
Home Page: https://cloudamqp.github.io/amqp-client.rb/
License: MIT License
Modern AMQP 0-9-1 Ruby client
Home Page: https://cloudamqp.github.io/amqp-client.rb/
License: MIT License
Connection#update_secret
should be implemented, just like in https://github.com/cloudamqp/amqp-client.js/pull/77/files
CI has been unstable for TruffleRuby (and JRuby) since they were added, the tests doesn't complete. On CRuby, all tests complete in ~10s. Here's a recent example of TruffleRuby timing out: https://github.com/cloudamqp/amqp-client.rb/runs/4280214610?check_suite_focus=true#step:5:17
1) Error:
HighLevelTest#test_it_can_reopen_channel_1_after_failed_publish:
TimeoutEveryTestCase::TestTimeout: timed out after 60 seconds
/home/runner/work/amqp-client.rb/amqp-client.rb/lib/amqp/client.rb:88:in `stop'
/home/runner/work/amqp-client.rb/amqp-client.rb/test/amqp/high_level_test.rb:82:in `test_it_can_reopen_channel_1_after_failed_publish'
/home/runner/work/amqp-client.rb/amqp-client.rb/test/test_helper.rb:27:in `block (2 levels) in run'
/home/runner/.rubies/truffleruby-21.3.0/lib/truffle/timeout.rb:163:in `timeout'
/home/runner/work/amqp-client.rb/amqp-client.rb/test/test_helper.rb:21:in `block in run'
48 runs, 10058 assertions, 0 failures, 1 errors, 3 skips
TruffleRuby and JRuby was marked as allowed to fail in #14, so they will look green, but if one looks at the summary page of a CI run, e.g. https://github.com/cloudamqp/amqp-client.rb/actions/runs/1487738770, there will be annotations if they failed.
What can sig/amqp-client.rbs
be used for? Do we need it in the repo? Currently I think it is a bit outdated (after running typeprof lib/amqp-client.rb > sig/amqp-client.rbs
there's quite the diff)
amqp-client.rb/sig/amqp-client.rbs
Lines 1 to 4 in 9b06622
It's not possible to call any high level operations inside the subscribe block. The program halts and it never goes on.
Example (publish inside subscribe)
client = AMQP::Client.new(RABBITMQ_URL).start
my_queue = client.queue('myqueue')
my_other_queue = client.queue('output.queue')
my_queue.subscribe(prefetch: 20, worker_threads: 0, no_ack: false) do |msg|
# the client will hang here
my_other_queue.publish('done')
msg.ack
puts 'acked'
rescue StandardError => e
warn(e)
msg.reject(requeue: false)
end
Is there a way to configure the client to have connection_timeout
that is below 1 second?
For example something like:
uri = "amqp://guest:guest@localhost"
amqp_client_options = { connection_timeout: 0.5 }
AMQP::Client.new(uri, **amqp_client_options).connect
If not supported, do you have it on the roadmap, and if yes, when could we expect it?
Otherwise we get this warning:
AMQP-Client could not enable TCP keepalive on socket. #<NameError: uninitialized constant Socket::SOL_TCP
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.