rservicebus2 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/bin/return_messages_to_source_queue +3 -3
  3. data/bin/rsb_ctl +1 -1
  4. data/bin/rservicebus2 +3 -3
  5. data/bin/rservicebus2-transport +4 -5
  6. data/bin/send_empty_message +6 -7
  7. data/lib/rservicebus2.rb +59 -0
  8. data/lib/{rservicebus → rservicebus2}/agent.rb +2 -2
  9. data/lib/{rservicebus → rservicebus2}/appresource.rb +2 -2
  10. data/lib/{rservicebus → rservicebus2}/appresource/dir.rb +1 -1
  11. data/lib/{rservicebus → rservicebus2}/appresource/file.rb +1 -1
  12. data/lib/{rservicebus → rservicebus2}/appresource/fluiddb.rb +1 -1
  13. data/lib/{rservicebus → rservicebus2}/appresource_configure.rb +4 -4
  14. data/lib/{rservicebus → rservicebus2}/audit.rb +1 -1
  15. data/lib/{rservicebus → rservicebus2}/circuitbreaker.rb +5 -5
  16. data/lib/{rservicebus → rservicebus2}/config.rb +1 -2
  17. data/lib/{rservicebus → rservicebus2}/cron_manager.rb +4 -4
  18. data/lib/{rservicebus → rservicebus2}/endpointmapping.rb +4 -4
  19. data/lib/{rservicebus → rservicebus2}/errormessage.rb +1 -1
  20. data/lib/{rservicebus → rservicebus2}/handler_loader.rb +1 -1
  21. data/lib/{rservicebus → rservicebus2}/handler_manager.rb +1 -1
  22. data/lib/{rservicebus → rservicebus2}/helper_functions.rb +4 -4
  23. data/lib/{rservicebus → rservicebus2}/host.rb +4 -4
  24. data/lib/{rservicebus → rservicebus2}/message.rb +2 -2
  25. data/lib/{rservicebus → rservicebus2}/message/statisticoutput.rb +1 -1
  26. data/lib/{rservicebus → rservicebus2}/message/subscription.rb +1 -1
  27. data/lib/{rservicebus → rservicebus2}/message/verboseoutput.rb +1 -1
  28. data/lib/{rservicebus → rservicebus2}/monitor.rb +1 -1
  29. data/lib/{rservicebus → rservicebus2}/monitor/csvdir.rb +7 -7
  30. data/lib/{rservicebus → rservicebus2}/monitor/dir.rb +1 -1
  31. data/lib/{rservicebus → rservicebus2}/monitor/dirnotifier.rb +11 -11
  32. data/lib/{rservicebus → rservicebus2}/monitor/message.rb +1 -1
  33. data/lib/{rservicebus → rservicebus2}/monitor/xmldir.rb +2 -2
  34. data/lib/{rservicebus → rservicebus2}/monitor_configure.rb +7 -7
  35. data/lib/{rservicebus → rservicebus2}/mq.rb +3 -3
  36. data/lib/{rservicebus → rservicebus2}/mq/beanstalk.rb +2 -2
  37. data/lib/{rservicebus → rservicebus2}/resource_manager.rb +7 -7
  38. data/lib/{rservicebus → rservicebus2}/saga/base.rb +1 -1
  39. data/lib/{rservicebus → rservicebus2}/saga/data.rb +2 -2
  40. data/lib/{rservicebus → rservicebus2}/saga/manager.rb +24 -26
  41. data/lib/{rservicebus → rservicebus2}/saga_loader.rb +7 -7
  42. data/lib/{rservicebus → rservicebus2}/saga_storage.rb +3 -3
  43. data/lib/{rservicebus → rservicebus2}/saga_storage/dir.rb +2 -3
  44. data/lib/{rservicebus → rservicebus2}/saga_storage/inmemory.rb +5 -2
  45. data/lib/{rservicebus → rservicebus2}/sendat_manager.rb +3 -3
  46. data/lib/{rservicebus → rservicebus2}/sendat_storage.rb +3 -3
  47. data/lib/{rservicebus → rservicebus2}/sendat_storage/file.rb +1 -1
  48. data/lib/{rservicebus → rservicebus2}/sendat_storage/inmemory.rb +1 -1
  49. data/lib/{rservicebus → rservicebus2}/state_manager.rb +3 -3
  50. data/lib/{rservicebus → rservicebus2}/state_storage.rb +3 -3
  51. data/lib/{rservicebus → rservicebus2}/state_storage/dir.rb +1 -1
  52. data/lib/{rservicebus → rservicebus2}/state_storage/inmemory.rb +1 -1
  53. data/lib/{rservicebus → rservicebus2}/statistic_manager.rb +3 -3
  54. data/lib/{rservicebus → rservicebus2}/stats.rb +1 -1
  55. data/lib/{rservicebus → rservicebus2}/subscription_manager.rb +5 -5
  56. data/lib/{rservicebus → rservicebus2}/subscription_storage.rb +1 -1
  57. data/lib/{rservicebus → rservicebus2}/subscription_storage/file.rb +1 -1
  58. data/lib/{rservicebus → rservicebus2}/subscription_storage_configure.rb +2 -2
  59. data/lib/rservicebus2/test.rb +1 -0
  60. data/lib/{rservicebus → rservicebus2}/test/bus.rb +2 -2
  61. data/lib/{rservicebus → rservicebus2}/transporter.rb +16 -16
  62. data/lib/{rservicebus → rservicebus2}/usermessage/withpayload.rb +1 -1
  63. metadata +58 -59
  64. data/lib/rservicebus.rb +0 -59
  65. data/lib/rservicebus/subscription_storage/redis.rb +0 -69
  66. data/lib/rservicebus/test.rb +0 -1
@@ -1,59 +0,0 @@
1
- # Add the currently running directory to the start of the load path
2
- # $:.unshift File.dirname(__FILE__) + '/../../lib'
3
-
4
- # Don't buffer stdout
5
- $stdout.sync = true
6
-
7
- require 'rubygems'
8
- require 'yaml'
9
- require 'uuidtools'
10
- require 'json'
11
- require 'uri'
12
-
13
- require 'rservicebus/helper_functions'
14
- require 'rservicebus/errormessage'
15
- require 'rservicebus/handler_loader'
16
- require 'rservicebus/handler_manager'
17
- require 'rservicebus/appresource_configure'
18
- require 'rservicebus/mq'
19
- require 'rservicebus/host'
20
- require 'rservicebus/config'
21
- require 'rservicebus/endpointmapping'
22
- require 'rservicebus/stats'
23
- require 'rservicebus/statistic_manager'
24
- require 'rservicebus/audit'
25
-
26
- require 'rservicebus/message'
27
- require 'rservicebus/message/subscription'
28
- require 'rservicebus/message/statisticoutput'
29
- require 'rservicebus/message/verboseoutput'
30
-
31
- require 'rservicebus/usermessage/withpayload'
32
-
33
- require 'rservicebus/state_manager'
34
- require 'rservicebus/cron_manager'
35
- require 'rservicebus/circuitbreaker'
36
-
37
- require 'rservicebus/appresource'
38
- require 'rservicebus/resource_manager'
39
-
40
- require 'rservicebus/subscription_manager'
41
- require 'rservicebus/subscription_storage'
42
- require 'rservicebus/subscription_storage_configure'
43
-
44
- require 'rservicebus/monitor_configure'
45
-
46
- require 'rservicebus/agent'
47
-
48
- require 'rservicebus/saga_loader.rb'
49
- require 'rservicebus/saga/manager.rb'
50
- require 'rservicebus/saga/data.rb'
51
- require 'rservicebus/saga/base.rb'
52
-
53
- require 'rservicebus/saga_storage'
54
-
55
- require 'rservicebus/sendat_manager'
56
-
57
- # Initial definition of the namespace
58
- module RServiceBus
59
- end
@@ -1,69 +0,0 @@
1
- module RServiceBus
2
-
3
- require 'redis'
4
-
5
- #Implementation of Subscription Storage to Redis
6
- class SubscriptionStorage_Redis<SubscriptionStorage
7
-
8
- @redis
9
-
10
- # Constructor
11
- #
12
- # @param [String] appName Name of the application, which is used as a Namespace
13
- # @param [String] uri a location for the resource to which we will attach, eg redis://127.0.0.1/foo
14
- def initialize( appName, uri )
15
- super(appName, uri)
16
- port = uri.port.nil? ? 6379 : uri.port
17
- @redis = Redis.new( :host=>uri.host, :port=>port )
18
- end
19
-
20
- def getAll
21
- RServiceBus.log 'Load subscriptions'
22
- begin
23
- content = @redis.get( @appName + '.Subscriptions')
24
- if content.nil? then
25
- subscriptions = Hash.new
26
- else
27
- subscriptions = YAML::load(content)
28
- end
29
- return subscriptions
30
- rescue Exception => e
31
- puts 'Error connecting to redis'
32
- if e.message == 'Redis::CannotConnectError' ||
33
- e.message == 'Redis::ECONNREFUSED' then
34
- puts '***Most likely, redis is not running. Start redis, and try running this again.'
35
- else
36
- puts e.message
37
- puts e.backtrace
38
- end
39
- abort()
40
- end
41
- end
42
-
43
- def add( eventName, queueName )
44
- content = @redis.get( @appName + '.Subscriptions')
45
- if content.nil? then
46
- subscriptions = Hash.new
47
- else
48
- subscriptions = YAML::load(content)
49
- end
50
-
51
- if subscriptions[eventName].nil? then
52
- subscriptions[eventName] = Array.new
53
- end
54
-
55
- subscriptions[eventName] << queueName
56
- subscriptions[eventName] = subscriptions[eventName].uniq
57
-
58
- @redis.set( @appName + '.Subscriptions', YAML::dump(subscriptions ) )
59
-
60
- return subscriptions
61
- end
62
-
63
- def remove( eventName, queueName )
64
- raise 'Method, remove, needs to be implemented for this subscription storage'
65
- end
66
-
67
- end
68
-
69
- end
@@ -1 +0,0 @@
1
- require 'rservicebus/test/bus'