forked from kgiusti/oslo-messaging-clients
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
91 lines (61 loc) · 3.11 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
A simple RPC client and server, built around the oslo.messaging
library from Openstack. An academic exercise simply to gain an
understanding of the oslo.messenger API!
For more info on Openstack and oslo.messaging, see:
http://www.openstack.org/
Not officially part of the olso.messenger project, just my own sandbox
to play in.
RUNNING
-------
1) run a local instance of qpidd:
$ qpidd --load-module=./src/amqp.so --auth no --queue-patterns exclusive --queue-patterns unicast --topic-patterns broadcast
2) set up python environment. I do this by running "tox" in a
oslo.messaging repo, then activating the python environment set up by
tox:
$ source /home/kgiusti/work/openstack/oslo/messaging/.tox/py27/bin/activate
3) run a server (best to do this in its own dedicated terminal as it blocks):
$ ./my-server.py Server01
Running server, name=Server01 exchange=my-exchange topic=my-topic namespace=my-namespace
4) run the client, invoking "methodA" on topic "my-topic" with
arguments "arg1" and "arg2":
$ ./my-client.py my-topic methodA arg1 arg2
Calling server on topic my-topic, server=None exchange=my-exchange namespace=my-namespace fanout=None
See the source for the server (my-server.py) for the RPC methods it supports.
You can also pass oslo configuration values using the --config
argument to the client and server. Example - to set the
amqp_idle_timeout to 10 seconds:
./my-client.py --config amqp_idle_timeout 10 my-topic methodA arg1 arg2
Using AMQP 1.0 and the Dispatch Router
--------------------------------------
These clients can be run using my experimental Proton/Messenger driver
for olso.messaging. You'll need to use the experimental
oslo.messaging branch I have at Github that adds the Messenger
transport. See:
https://github.com/kgiusti/oslo.messaging/tree/kgiusti/messenger
However, you can't currently use the Qpid broker (qpidd) to do this.
Instead, you'll need to use the Dispatch Router as your messaging
"broker". See:
http://qpid.apache.org/components/dispatch-router/index.html for more
details regarding the Dispatch Router.
More detail TBD, but in summary you'll need to:
1) Build and install the Proton/C libraries, See:
http://qpid.apache.org/proton/index.html. I've used the 0.5 release.
2) Build Dispatch Router, linking it against the Proton libraries you installed in 1).
3) Pull a copy of the experimental oslo.messenger branch. Use tox as
above to set up your python environment.
4) If you've installed the Proton stuff in a non-standard path, you
must set your python path so the clients can find the Proton Messenger
python modules and C library wrapper. For example:
$ export PYTHONPATH="$PYTHONPATH:/home/kgiusti/work/proton/0.5/INSTALL/usr/lib64/python2.7/site-packages"
TBD
---
o) eventlet testing (?)
o) resource-balancing a subscription across multiple Messenger threads
o) Lockup on failure of Messenger thread
o) Failover/reconnect routers
EXTERNAL ISSUES
---------------
dispatch: load balance across all servers servicing a given topic.
messenger: how to cancel subscriptions?
messenger: how to abort sent messages after a timeout?
messenger, qpidd: how to create queues/topics on demand?