Module: Vx::Lib::Consumer
- Extended by:
- Consumer
- Included in:
- Consumer
- Defined in:
- lib/vx/lib/consumer.rb,
lib/vx/lib/consumer/ack.rb,
lib/vx/lib/consumer/rpc.rb,
lib/vx/lib/consumer/error.rb,
lib/vx/lib/consumer/params.rb,
lib/vx/lib/consumer/publish.rb,
lib/vx/lib/consumer/session.rb,
lib/vx/lib/consumer/testing.rb,
lib/vx/lib/consumer/version.rb,
lib/vx/lib/consumer/subscribe.rb,
lib/vx/lib/consumer/instrument.rb,
lib/vx/lib/consumer/serializer.rb,
lib/vx/lib/consumer/subscriber.rb,
lib/vx/lib/consumer/configuration.rb
Defined Under Namespace
Modules: Ack, ClassMethods, Instrument, Publish, Rpc, Subscribe, Testing
Classes: Configuration, ConnectionDoesNotExistError, ModelIsNotdefined, Params, Serializer, Session, Subscriber
Constant Summary
collapse
- VERSION =
"0.2.1"
- @@session =
Session.new
- @@configuration =
Configuration.new
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Instance Attribute Details
#_channel ⇒ Object
Returns the value of attribute _channel.
24
25
26
|
# File 'lib/vx/lib/consumer.rb', line 24
def _channel
@_channel
end
|
#delivery_info ⇒ Object
Returns the value of attribute delivery_info.
23
24
25
|
# File 'lib/vx/lib/consumer.rb', line 23
def delivery_info
@delivery_info
end
|
#properties ⇒ Object
Returns the value of attribute properties.
22
23
24
|
# File 'lib/vx/lib/consumer.rb', line 22
def properties
@properties
end
|
Instance Method Details
#configuration ⇒ Object
121
122
123
|
# File 'lib/vx/lib/consumer.rb', line 121
def configuration
@@configuration
end
|
117
118
119
|
# File 'lib/vx/lib/consumer.rb', line 117
def configure
yield configuration
end
|
#exception_handler(e, env) ⇒ Object
129
130
131
132
133
134
|
# File 'lib/vx/lib/consumer.rb', line 129
def exception_handler(e, env)
unless env.is_a?(Hash)
env = {env: env}
end
configuration.on_error.call(e, env)
end
|
#live? ⇒ Boolean
109
110
111
|
# File 'lib/vx/lib/consumer.rb', line 109
def live?
session.live?
end
|
#session ⇒ Object
125
126
127
|
# File 'lib/vx/lib/consumer.rb', line 125
def session
@@session
end
|
#shutdown ⇒ Object
105
106
107
|
# File 'lib/vx/lib/consumer.rb', line 105
def shutdown
session.shutdown
end
|
#wait_shutdown(timeout = nil) ⇒ Object
113
114
115
|
# File 'lib/vx/lib/consumer.rb', line 113
def wait_shutdown(timeout = nil)
session.wait_shutdown(timeout)
end
|