rservicebus 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rservicebus/EndpointMapping.rb +16 -5
- data/lib/rservicebus/Host.rb +1 -1
- metadata +1 -1
@@ -13,7 +13,7 @@ module RServiceBus
|
|
13
13
|
def log( string, ver=false )
|
14
14
|
RServiceBus.log( string )
|
15
15
|
end
|
16
|
-
|
16
|
+
|
17
17
|
def configureMapping( mapping )
|
18
18
|
match = mapping.match( /(.+):(.+)/ )
|
19
19
|
if match.nil? then
|
@@ -25,21 +25,32 @@ module RServiceBus
|
|
25
25
|
|
26
26
|
self.log( "EndpointMapping.configureMapping: #{match[1]}, #{match[2]}", true )
|
27
27
|
@endpoints[match[1]] = match[2]
|
28
|
-
|
28
|
+
|
29
|
+
@queueNameList.each do |q|
|
30
|
+
if q != match[2] && q.downcase == match[2].downcase then
|
31
|
+
log( "*** Two queues specified with only case sensitive difference." )
|
32
|
+
log( "*** #{q} != #{match[2]}" )
|
33
|
+
log( "*** If you meant these queues to be the same, please match case and restart the bus." )
|
34
|
+
end
|
35
|
+
end
|
36
|
+
@queueNameList << match[2]
|
29
37
|
end
|
30
38
|
|
31
|
-
def Configure
|
39
|
+
def Configure( localQueueName )
|
32
40
|
self.log( "EndpointMapping.Configure" )
|
41
|
+
|
42
|
+
@queueNameList = [localQueueName]
|
43
|
+
|
33
44
|
mappings = self.getValue( "MESSAGE_ENDPOINT_MAPPINGS" )
|
34
45
|
return self if mappings.nil?
|
35
|
-
|
46
|
+
|
36
47
|
mappings.split( ";" ).each do |mapping|
|
37
48
|
self.configureMapping( mapping )
|
38
49
|
end
|
39
50
|
|
40
51
|
return self
|
41
52
|
end
|
42
|
-
|
53
|
+
|
43
54
|
def initialize
|
44
55
|
@endpoints=Hash.new
|
45
56
|
end
|
data/lib/rservicebus/Host.rb
CHANGED
@@ -140,7 +140,7 @@ module RServiceBus
|
|
140
140
|
.loadLibs()
|
141
141
|
.loadWorkingDirList();
|
142
142
|
|
143
|
-
@endpointMapping = EndpointMapping.new.Configure
|
143
|
+
@endpointMapping = EndpointMapping.new.Configure( @config.localQueueName )
|
144
144
|
|
145
145
|
self.configureStatistics()
|
146
146
|
.loadContracts()
|