bunny 2.14.4 → 2.19.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +30 -12
  3. data/lib/bunny/channel.rb +2 -2
  4. data/lib/bunny/queue.rb +0 -3
  5. data/lib/bunny/reader_loop.rb +11 -11
  6. data/lib/bunny/session.rb +42 -9
  7. data/lib/bunny/transport.rb +12 -11
  8. data/lib/bunny/version.rb +1 -1
  9. data/spec/higher_level_api/integration/basic_cancel_spec.rb +4 -4
  10. data/spec/higher_level_api/integration/basic_consume_spec.rb +17 -9
  11. data/spec/higher_level_api/integration/connection_spec.rb +26 -0
  12. data/spec/higher_level_api/integration/tls_connection_spec.rb +194 -189
  13. data/spec/issues/issue202_spec.rb +1 -1
  14. data/spec/issues/issue609_spec.rb +84 -0
  15. data/spec/issues/issue78_spec.rb +2 -2
  16. data/spec/lower_level_api/integration/basic_cancel_spec.rb +1 -1
  17. data/spec/lower_level_api/integration/basic_consume_spec.rb +8 -8
  18. data/spec/unit/exchange_recovery_spec.rb +2 -2
  19. metadata +37 -95
  20. data/.github/ISSUE_TEMPLATE.md +0 -18
  21. data/.gitignore +0 -28
  22. data/.rspec +0 -1
  23. data/.travis.yml +0 -32
  24. data/.yardopts +0 -8
  25. data/CONTRIBUTING.md +0 -132
  26. data/ChangeLog.md +0 -2103
  27. data/Gemfile +0 -55
  28. data/LICENSE +0 -21
  29. data/Rakefile +0 -54
  30. data/benchmarks/basic_publish/with_128K_messages.rb +0 -35
  31. data/benchmarks/basic_publish/with_1k_messages.rb +0 -35
  32. data/benchmarks/basic_publish/with_4K_messages.rb +0 -35
  33. data/benchmarks/basic_publish/with_64K_messages.rb +0 -35
  34. data/benchmarks/channel_open.rb +0 -28
  35. data/benchmarks/mutex_and_monitor.rb +0 -42
  36. data/benchmarks/queue_declare.rb +0 -29
  37. data/benchmarks/queue_declare_and_bind.rb +0 -29
  38. data/benchmarks/queue_declare_bind_and_delete.rb +0 -29
  39. data/benchmarks/synchronized_sorted_set.rb +0 -53
  40. data/benchmarks/write_vs_write_nonblock.rb +0 -49
  41. data/bunny.gemspec +0 -34
  42. data/docker-compose.yml +0 -28
  43. data/docker/Dockerfile +0 -24
  44. data/docker/apt/preferences.d/erlang +0 -3
  45. data/docker/apt/sources.list.d/bintray.rabbitmq.list +0 -2
  46. data/docker/docker-entrypoint.sh +0 -26
  47. data/docker/rabbitmq.conf +0 -29
  48. data/examples/connection/authentication_failure.rb +0 -16
  49. data/examples/connection/automatic_recovery_with_basic_get.rb +0 -40
  50. data/examples/connection/automatic_recovery_with_client_named_queues.rb +0 -36
  51. data/examples/connection/automatic_recovery_with_multiple_consumers.rb +0 -46
  52. data/examples/connection/automatic_recovery_with_republishing.rb +0 -109
  53. data/examples/connection/automatic_recovery_with_server_named_queues.rb +0 -35
  54. data/examples/connection/channel_level_exception.rb +0 -27
  55. data/examples/connection/disabled_automatic_recovery.rb +0 -34
  56. data/examples/connection/heartbeat.rb +0 -17
  57. data/examples/connection/manually_reconnecting_consumer.rb +0 -23
  58. data/examples/connection/manually_reconnecting_publisher.rb +0 -28
  59. data/examples/connection/unknown_host.rb +0 -16
  60. data/examples/consumers/high_and_low_priority.rb +0 -50
  61. data/examples/guides/exchanges/direct_exchange_routing.rb +0 -36
  62. data/examples/guides/exchanges/fanout_exchange_routing.rb +0 -28
  63. data/examples/guides/exchanges/headers_exchange_routing.rb +0 -31
  64. data/examples/guides/exchanges/mandatory_messages.rb +0 -30
  65. data/examples/guides/extensions/alternate_exchange.rb +0 -30
  66. data/examples/guides/extensions/basic_nack.rb +0 -33
  67. data/examples/guides/extensions/connection_blocked.rb +0 -35
  68. data/examples/guides/extensions/consumer_cancellation_notification.rb +0 -39
  69. data/examples/guides/extensions/dead_letter_exchange.rb +0 -32
  70. data/examples/guides/extensions/exchange_to_exchange_bindings.rb +0 -29
  71. data/examples/guides/extensions/per_message_ttl.rb +0 -36
  72. data/examples/guides/extensions/per_queue_message_ttl.rb +0 -36
  73. data/examples/guides/extensions/publisher_confirms.rb +0 -28
  74. data/examples/guides/extensions/queue_lease.rb +0 -26
  75. data/examples/guides/extensions/sender_selected_distribution.rb +0 -32
  76. data/examples/guides/getting_started/blabbr.rb +0 -27
  77. data/examples/guides/getting_started/hello_world.rb +0 -22
  78. data/examples/guides/getting_started/weathr.rb +0 -49
  79. data/examples/guides/queues/one_off_consumer.rb +0 -25
  80. data/examples/guides/queues/redeliveries.rb +0 -81
  81. data/profiling/basic_publish/with_4K_messages.rb +0 -33
  82. data/repl +0 -3
  83. data/spec/tls/generate-server-cert.sh +0 -8
  84. data/spec/tls/server-openssl.cnf +0 -10
  85. data/spec/tls/server.csr +0 -16
@@ -1,33 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # encoding: utf-8
3
-
4
- require "rubygems"
5
- require "bunny"
6
- require "ruby-prof"
7
-
8
- conn = Bunny.new
9
- conn.start
10
-
11
- puts
12
- puts "-" * 80
13
- puts "Benchmarking on #{RUBY_DESCRIPTION}"
14
-
15
- n = 50_000
16
- ch = conn.create_channel
17
- x = ch.default_exchange
18
- s = "z" * 4096
19
-
20
- # warm up the JIT, etc
21
- puts "Doing a warmup run..."
22
- 16000.times { x.publish(s, :routing_key => "anything") }
23
-
24
- # give OS, the server and so on some time to catch
25
- # up
26
- sleep 2.0
27
-
28
- result = RubyProf.profile do
29
- n.times { x.publish(s, :routing_key => "anything") }
30
- end
31
-
32
- printer = RubyProf::FlatPrinter.new(result)
33
- printer.print(STDOUT, {})
data/repl DELETED
@@ -1,3 +0,0 @@
1
- #!/bin/sh
2
-
3
- bundle exec ruby -w `which ripl` -Ilib -r'bunny' -r'ripl/multi_line' -r'ripl/irb'
@@ -1,8 +0,0 @@
1
- #!/bin/sh
2
-
3
- DIRNAME=$(dirname "$0")
4
-
5
- openssl req -sha256 -new -key $DIRNAME/server_key.pem -out $DIRNAME/server.csr -subj "/CN=mercurio" -config $DIRNAME/server-openssl.cnf
6
- openssl x509 -sha256 -req -in $DIRNAME/server.csr -CA $DIRNAME/ca_certificate.pem -CAkey $DIRNAME/ca_key.pem -CAcreateserial -CAserial $DIRNAME/ca.srl -out $DIRNAME/server_certificate.pem -days 3650 -extensions v3_req -extfile $DIRNAME/server-openssl.cnf
7
-
8
- echo "Written new server CSR and certificate"
@@ -1,10 +0,0 @@
1
- [req]
2
- req_extensions = v3_req
3
- distinguished_name = req_distinguished_name
4
- [req_distinguished_name]
5
- [ v3_req ]
6
- basicConstraints = CA:FALSE
7
- keyUsage = nonRepudiation, digitalSignature, keyEncipherment
8
- subjectAltName = @alt_names
9
- [alt_names]
10
- IP.1 = 127.0.0.1
data/spec/tls/server.csr DELETED
@@ -1,16 +0,0 @@
1
- -----BEGIN CERTIFICATE REQUEST-----
2
- MIICkjCCAXoCAQAwEzERMA8GA1UEAwwIbWVyY3VyaW8wggEiMA0GCSqGSIb3DQEB
3
- AQUAA4IBDwAwggEKAoIBAQCkvvzm5nB3CDqTFEYQnfOy8DwJLm34MvdrKQAThzDy
4
- qa37sb4IC0YclBFbZfsw8+paK+Rpo2Vlhzclb66z0cGs9SvxuKkJ45w0fk0ctxMg
5
- tvWISRGZR7LMw5u0q2m61dK0FTGSl+qzJohb5Dklb6BApoGoIPH+eYraVxHR29x2
6
- x8hqzBt5TpiUW8bu7LPQJbX0mYGhKQDf86kao+sptRQ2045D7vB3jrkPhq0XZVJi
7
- QymzOSSejYSN1oZ464DtT+dpLBYHEVJoJPu4r4kY/8A7v+93PWQaDERKBfvwWHfV
8
- U44xn7R/aojSvNT7kQILsf2BnfJlMwoedWQLxPddmB3PAgMBAAGgOjA4BgkqhkiG
9
- 9w0BCQ4xKzApMAkGA1UdEwQCMAAwCwYDVR0PBAQDAgXgMA8GA1UdEQQIMAaHBH8A
10
- AAEwDQYJKoZIhvcNAQELBQADggEBAFyfaotajM/h2dyodKJqO6stAIpxiQXTds8V
11
- 5ZHDozBxzLZkeBIY+hsqh/owmqomk56swui+336WAKIBwIJyJrtIl8C/lupGaTbR
12
- BouWWbyZOQAE2ExHcUgdGEOVoCN2ieBR4RVQ8Id4GAlHvlFGPqakaLMV6Zc7VqDh
13
- vxdOLgATEE+MhebTo9yOHj14qdvzhi5w3ZEg1kdfOuGN9I4gJcv4PWwudBhn4wE7
14
- oHAIP2nixROI7cZcZ9fBrimcdGQsXNZLTXiGzNra4utOXuQ7w5qoiEhHoxXalowE
15
- KvEA9otLadjtULg6DRd3zYuIyrUiBIRUHZ1p2xSnd/lLekbMfCQ=
16
- -----END CERTIFICATE REQUEST-----