rservicebus 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -36,10 +36,11 @@ module RServiceBus
|
|
36
36
|
@queueNameList << match[2]
|
37
37
|
end
|
38
38
|
|
39
|
-
def Configure( localQueueName )
|
39
|
+
def Configure( localQueueName=nil )
|
40
40
|
self.log( "EndpointMapping.Configure" )
|
41
41
|
|
42
|
-
@queueNameList = [
|
42
|
+
@queueNameList = []
|
43
|
+
@queueNameList << localQueueName unless localQueueName.nil?
|
43
44
|
|
44
45
|
mappings = self.getValue( "MESSAGE_ENDPOINT_MAPPINGS" )
|
45
46
|
return self if mappings.nil?
|
@@ -33,5 +33,15 @@ module RServiceBus
|
|
33
33
|
return value
|
34
34
|
end
|
35
35
|
|
36
|
+
def RServiceBus.sendMsg( msg, responseQueue="agent" )
|
37
|
+
require "rservicebus/EndpointMapping"
|
38
|
+
endpointMapping = EndpointMapping.new
|
39
|
+
endpointMapping.Configure
|
40
|
+
queueName = endpointMapping.get( msg.class.name )
|
41
|
+
|
42
|
+
agent = RServiceBus::Agent.new.getAgent( URI.parse( "beanstalk://127.0.0.1:11300" ) )
|
43
|
+
agent.sendMsg(msg, queueName, responseQueue)
|
44
|
+
|
45
|
+
end
|
36
46
|
|
37
47
|
end
|