File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -16,25 +16,25 @@ You can download the latests build at:
16
16
http://github.com/xetorthio/rmq/downloads
17
17
18
18
To use it just as a producer:
19
+
19
20
Producer p = new Producer(new Jedis("localhost"),"some cool topic");
20
21
p.publish("some cool message");
21
22
22
- To use it just as a consumer you can
23
+ To use it just as a consumer you can consume messages as they become available (this will block if there are no new messages):
23
24
24
- consume messages as they become available (this will block if there are no new messages)
25
25
Consumer c = new Consumer(new Jedis("localhost"),"consumer identifier","some cool topic");
26
26
c.consume(new Callback() {
27
27
public void onMessage(String topic, String message) {
28
28
//do something here with the message
29
29
}
30
30
});
31
31
32
- consume next waiting message and return right away
32
+ Consume next waiting message and return right away:
33
33
34
34
Consumer c = new Consumer(new Jedis("localhost"),"consumer identifier","some cool topic");
35
35
String message = c.consume();
36
36
37
- read next message without removing it from the queue
37
+ Read next message without removing it from the queue:
38
38
39
39
Consumer c = new Consumer(new Jedis("localhost"),"consumer identifier","some cool topic");
40
40
String message = c.read();
You can’t perform that action at this time.
0 commit comments