rservicebus 0.0.21 → 0.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/rservicebus.rb CHANGED
@@ -8,8 +8,6 @@ require "redis"
8
8
  require "json"
9
9
 
10
10
  require "rservicebus/helper_functions"
11
- require "rservicebus/Agent/Beanstalk"
12
- require "rservicebus/Agent/Bunny"
13
11
  require "rservicebus/ErrorMessage"
14
12
  require "rservicebus/HandlerLoader"
15
13
  require "rservicebus/ConfigureAppResource"
@@ -2,7 +2,7 @@ module RServiceBus
2
2
 
3
3
  #Marshals configuration information for an rservicebus host
4
4
  class Config
5
- attr_reader :appName, :messageEndpointMappings, :handlerPathList, :localQueueName, :errorQueueName, :maxRetries, :forwardReceivedMessagesTo, :verbose, :queueTimeout, :statOutputCountdown, :contractList, :libList, :auditQueueName, :mqHost
5
+ attr_reader :appName, :messageEndpointMappings, :handlerPathList, :localQueueName, :errorQueueName, :maxRetries, :forwardReceivedMessagesTo, :verbose, :queueTimeout, :statOutputCountdown, :contractList, :libList, :forwardSentMessagesTo, :mqHost
6
6
 
7
7
  @appName
8
8
  @messageEndpointMappings
@@ -11,7 +11,7 @@ class Config
11
11
 
12
12
  @localQueueName
13
13
  @errorQueueName
14
- @auditQueueName
14
+ @forwardSentMessagesTo
15
15
  @maxRetries
16
16
  @forwardReceivedMessagesTo
17
17
 
@@ -85,7 +85,7 @@ class Config
85
85
  @appName = self.getValue( "APPNAME", "RServiceBus" )
86
86
  @localQueueName = self.getValue( "LOCAL_QUEUE_NAME", @appName )
87
87
  @errorQueueName = self.getValue( "ERROR_QUEUE_NAME", "error" )
88
- @auditQueueName = self.getValue( "AUDIT_QUEUE_NAME" )
88
+ @forwardSentMessagesTo = self.getValue( "AUDIT_QUEUE_NAME" )
89
89
  @maxRetries = self.getValue( "MAX_RETRIES", "5" ).to_i
90
90
  @forwardReceivedMessagesTo = self.getValue( "FORWARD_RECEIVED_MESSAGES_TO" )
91
91
  @queueTimeout = self.getValue( "QUEUE_TIMEOUT", "5" ).to_i
@@ -10,8 +10,6 @@ module RServiceBus
10
10
  @handlerList
11
11
  @resourceByHandlerNameList
12
12
 
13
- @forwardReceivedMessagesToQueue
14
-
15
13
  @subscriptions
16
14
 
17
15
  @mq
@@ -266,8 +264,8 @@ module RServiceBus
266
264
  def _SendAlreadyWrappedAndSerialised( serialized_object, queueName )
267
265
  log "Bus._SendAlreadyWrappedAndSerialised", true
268
266
 
269
- if !@config.auditQueueName.nil? then
270
- @mq.send( @config.auditQueueName, serialized_object )
267
+ if !@config.forwardSentMessagesTo.nil? then
268
+ @mq.send( @config.forwardSentMessagesTo, serialized_object )
271
269
  end
272
270
 
273
271
  @mq.send( queueName, serialized_object )
@@ -39,12 +39,15 @@ module RServiceBus
39
39
 
40
40
  # Connect to the broker
41
41
  #
42
+ # @param [String] host machine runnig the mq
43
+ # @param [String] port port the mq is running on
42
44
  def connect( host, port )
43
45
  raise "Method, connect, needs to be implemented"
44
46
  end
45
47
 
46
- # Connect to the queue
48
+ # Connect to the receiving queue
47
49
  #
50
+ # @param [String] queuename name of the receiving queue
48
51
  def subscribe( queuename )
49
52
  raise "Method, subscribe, needs to be implemented"
50
53
  end
@@ -54,12 +57,15 @@ module RServiceBus
54
57
  raise "Method, pop, needs to be implemented"
55
58
  end
56
59
 
57
- # "Commit" queue
60
+ # "Commit" the pop
58
61
  def ack
59
62
  raise "Method, ack, needs to be implemented"
60
63
  end
61
64
 
62
65
  # At least called in the Host rescue block, to ensure all network links are healthy
66
+ #
67
+ # @param [String] queueName name of the queue to which the m sg should be sent
68
+ # @param [String] msg msg to be sent
63
69
  def send( queueName, msg )
64
70
  begin
65
71
  @connection.close
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rservicebus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.21
4
+ version: 0.0.22
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-10 00:00:00.000000000 Z
12
+ date: 2012-10-18 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A Ruby interpretation of NServiceBus
15
15
  email: guy@guyirvine.com