jerryluk-rabbitmq-jruby-client 0.1.5 → 0.1.6
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/rabbitmq_client.rb +3 -3
 - metadata +1 -1
 
    
        data/lib/rabbitmq_client.rb
    CHANGED
    
    | 
         @@ -64,7 +64,7 @@ class RabbitMQClient 
     | 
|
| 
       64 
64 
     | 
    
         
             
                  message_body
         
     | 
| 
       65 
65 
     | 
    
         
             
                end
         
     | 
| 
       66 
66 
     | 
    
         | 
| 
       67 
     | 
    
         
            -
                def persistent_publish(message_body, props=MessageProperties:: 
     | 
| 
      
 67 
     | 
    
         
            +
                def persistent_publish(message_body, props=MessageProperties::PERSISTENT_TEXT_PLAIN)
         
     | 
| 
       68 
68 
     | 
    
         
             
                  raise RabbitMQClientError, "can only publish persistent message to durable queue" unless @durable
         
     | 
| 
       69 
69 
     | 
    
         
             
                  publish(message_body, props)
         
     | 
| 
       70 
70 
     | 
    
         
             
                end
         
     | 
| 
         @@ -119,7 +119,7 @@ class RabbitMQClient 
     | 
|
| 
       119 
119 
     | 
    
         
             
              attr_reader :connection
         
     | 
| 
       120 
120 
     | 
    
         | 
| 
       121 
121 
     | 
    
         
             
              # Instance Methods
         
     | 
| 
       122 
     | 
    
         
            -
              def initialize(options={ 
     | 
| 
      
 122 
     | 
    
         
            +
              def initialize(options={})
         
     | 
| 
       123 
123 
     | 
    
         
             
                # server address
         
     | 
| 
       124 
124 
     | 
    
         
             
                @host = options[:host] || '127.0.0.1'
         
     | 
| 
       125 
125 
     | 
    
         
             
                @port = options[:port] || 5672
         
     | 
| 
         @@ -133,7 +133,7 @@ class RabbitMQClient 
     | 
|
| 
       133 
133 
     | 
    
         
             
                @queues = {}
         
     | 
| 
       134 
134 
     | 
    
         
             
                @exchanges = {}
         
     | 
| 
       135 
135 
     | 
    
         | 
| 
       136 
     | 
    
         
            -
                connect  
     | 
| 
      
 136 
     | 
    
         
            +
                connect unless options[:no_auto_connect]
         
     | 
| 
       137 
137 
     | 
    
         
             
                # Disconnect before the object is destroyed
         
     | 
| 
       138 
138 
     | 
    
         
             
                define_finalizer(self, lambda {|id| self.disconnect if self.connected? })
         
     | 
| 
       139 
139 
     | 
    
         
             
                self
         
     |