/
supervisor-config.xml
120 lines (114 loc) · 4.9 KB
/
supervisor-config.xml
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:akka="http://akka.io/schema/akka"
xmlns:beans="http://www.springframework.org/schema/lang"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://akka.io/schema/akka
http://akka.io/akka-2.0-SNAPSHOT.xsd">
<akka:supervision id="supervision1">
<akka:restart-strategy failover="AllForOne" retries="3" timerange="1000">
<akka:trap-exits>
<akka:trap-exit>java.io.IOException</akka:trap-exit>
<akka:trap-exit>java.lang.NullPointerException</akka:trap-exit>
</akka:trap-exits>
</akka:restart-strategy>
<akka:typed-actors>
<akka:typed-actor interface="akka.spring.foo.IFoo"
implementation="akka.spring.foo.Foo"
lifecycle="permanent"
timeout="1000"/>
<akka:typed-actor interface="akka.spring.foo.IBar"
implementation="akka.spring.foo.Bar"
lifecycle="permanent"
timeout="1000"/>
<akka:typed-actor interface="akka.spring.foo.IMyPojo"
implementation="akka.spring.foo.MyPojo"
lifecycle="temporary"
timeout="1000">
</akka:typed-actor>
</akka:typed-actors>
</akka:supervision>
<akka:supervision id="supervision-untyped-actors">
<akka:restart-strategy failover="AllForOne" retries="3" timerange="1000">
<akka:trap-exits>
<akka:trap-exit>java.io.IOException</akka:trap-exit>
<akka:trap-exit>java.lang.NullPointerException</akka:trap-exit>
</akka:trap-exits>
</akka:restart-strategy>
<akka:untyped-actors>
<akka:untyped-actor implementation="akka.spring.foo.PingActor"
lifecycle="permanent"
timeout="1000"/>
<akka:untyped-actor implementation="akka.spring.foo.PongActor"
lifecycle="permanent"
timeout="1000"/>
</akka:untyped-actors>
</akka:supervision>
<!--
<akka:supervision id="supervision2">
<akka:restart-strategy failover="AllForOne" retries="3" timerange="5000">
<akka:trap-exits>
<akka:trap-exit>java.lang.Exception</akka:trap-exit>
</akka:trap-exits>
</akka:restart-strategy>
<akka:typed-actors>
<akka:typed-actor implementation="akka.spring.foo.StatefulPojo" lifecycle="permanent"
timeout="10000"/>
</akka:typed-actors>
</akka:supervision>
-->
<akka:dispatcher id="mydispatcher" type="executor-based-event-driven" name="myDispatcher">
<akka:thread-pool queue="bounded-array-blocking-queue"
capacity="100"
fairness="true"
core-pool-size="1"
max-pool-size="20"
keep-alive="3000"/>
</akka:dispatcher>
<akka:supervision id="supervision-with-dispatcher">
<akka:restart-strategy failover="AllForOne" retries="3" timerange="1000">
<akka:trap-exits>
<akka:trap-exit>java.lang.Exception</akka:trap-exit>
</akka:trap-exits>
</akka:restart-strategy>
<akka:typed-actors>
<akka:typed-actor interface="akka.spring.foo.IFoo"
implementation="akka.spring.foo.Foo"
lifecycle="permanent"
timeout="1000">
<akka:dispatcher ref="mydispatcher" />
</akka:typed-actor>
<akka:typed-actor interface="akka.spring.foo.IMyPojo"
implementation="akka.spring.foo.MyPojo"
lifecycle="temporary"
timeout="1000">
<akka:dispatcher ref="mydispatcher" />
</akka:typed-actor>
</akka:typed-actors>
</akka:supervision>
<!-- <akka:supervision id="parent-supervision">
<akka:restart-strategy failover="AllForOne" retries="3" timerange="1000">
<akka:trap-exits>
<akka:trap-exit>java.lang.Exception</akka:trap-exit>
</akka:trap-exits>
</akka:restart-strategy>
<akka:typed-actors>
<akka:typed-actor implementation="akka.spring.foo.Foo" lifecycle="permanent" timeout="1000" />
<akka:typed-actor implementation="akka.spring.foo.MyPojo" lifecycle="temporary" timeout="1000" />
</akka:typed-actors>
<akka:supervision id="nested-supervision">
<akka:restart-strategy failover="AllForOne" retries="3" timerange="1000">
<akka:trap-exits>
<akka:trap-exit>java.lang.IOException</akka:trap-exit>
</akka:trap-exits>
</akka:restart-strategy>
<akka:typed-actors>
<akka:typed-actor implementation="akka.spring.foo.Bar" lifecycle="permanent" timeout="1000" />
</akka:typed-actors>
</akka:supervision>
</akka:supervision>
-->
</beans>