stomp_actors 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -25,7 +25,7 @@ values, and `#receive(msg)` method.
25
25
 
26
26
  Define `#subscribe_opts` to customize subscription options.
27
27
 
28
- Use `ack(msg)` to acknowledge message.
28
+ Use `ack(msg)` to acknowledge message, if needed.
29
29
 
30
30
  Example:
31
31
 
@@ -44,12 +44,12 @@ class MyConsumer < StompActors::Consumer
44
44
  end
45
45
 
46
46
  def receive(msg)
47
- # do something
47
+ # do something with msg
48
48
  ack(msg)
49
49
  end
50
50
  end
51
51
 
52
- MyConsumer.new # your actor is now subscribed and will process messages.
52
+ MyConsumer.new # your actor is now subscribed and will receive messages.
53
53
  ```
54
54
 
55
55
  ### Producers
@@ -73,7 +73,7 @@ class MyProducer < StompActors::Producer
73
73
  end
74
74
 
75
75
  p = MyProducer.new
76
- p.emit("stuff") # message sent by actor
76
+ p.emit("stuff") # message sent to queue
77
77
  ```
78
78
 
79
79
  ## Contributing
@@ -8,6 +8,10 @@ module StompActors
8
8
  attr_accessor :subscription_id
9
9
 
10
10
  def initialize
11
+ async.start
12
+ end
13
+
14
+ def start
11
15
  connect
12
16
  subscribe
13
17
  end
@@ -6,7 +6,7 @@ module StompActors
6
6
  include Client
7
7
 
8
8
  def initialize
9
- connect
9
+ async.connect
10
10
  end
11
11
 
12
12
  def emit(msg)
@@ -1,3 +1,3 @@
1
1
  module StompActors
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stomp_actors
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-28 00:00:00.000000000 Z
12
+ date: 2013-03-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler