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 = [localQueueName]
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
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.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: