eventbus 0.26 → 0.27
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/eventbus/connectors/stomp.rb +25 -8
- metadata +1 -1
@@ -35,23 +35,40 @@ module StompConnectionDriver
|
|
35
35
|
:max_hbrlck_fails => ENV['EVENTBUS_STOMP_MAX_HBREADLOCK_FAILS'] || 5,
|
36
36
|
:connect_timeout => 30,
|
37
37
|
:connect_headers => {
|
38
|
-
|
38
|
+
|
39
|
+
# :host
|
40
|
+
#
|
41
|
+
# This is the STOMP VHOST, NOT a hostname! Make sure your broker is set up right!
|
42
|
+
# This is a requirement of STOMP 1.2. The broker may (read: probably will)
|
43
|
+
# drop connections on you if you're sending a value it doesn't recognize. If you're
|
44
|
+
# getting lots of "connection reset by peer" and connection drops, dude, look at this really hard.
|
45
|
+
# Behavior highly dependent on the broker, however. Works fine in Apache Apollo by adding this line
|
46
|
+
# to the apollo.xml file:
|
47
|
+
#
|
48
|
+
# <host_name>eventbus</host_name>
|
49
|
+
#
|
50
|
+
|
51
|
+
:host => ENV['BROKER_VHOST'] || "eventbus",
|
52
|
+
|
53
|
+
# :accept-version and :heart-beat
|
54
|
+
#
|
55
|
+
# Used to set up heart-beating to keep connection alive and notice right away when it isn't.
|
39
56
|
#
|
40
57
|
# Value is two integer millisecond interval values, comma-delimited
|
41
58
|
# <interval we can send>,<interval we want to receive from server>
|
42
|
-
#
|
59
|
+
# Heart-beating can be disabled entirely or from one end by using 0 for
|
43
60
|
# one or both of these values in the EVENTBUS_STOMP_HEARTBEAT_INTERVALS environment variable:
|
44
|
-
# 0,0 Disable all
|
45
|
-
# 0,1000 Receive
|
46
|
-
# 1000,0 Send
|
61
|
+
# 0,0 Disable all heart-beating
|
62
|
+
# 0,1000 Receive heart-beats from broker every 1000ms, but don't send them.
|
63
|
+
# 1000,0 Send heart-beats from client every 1000ms, but don't look for them from broker.
|
47
64
|
#
|
48
65
|
# This is turned on by default to keep the connection alive in some environments where they can be
|
49
|
-
# dropped silently. If the
|
66
|
+
# dropped silently. If the heart-beat fails, it will trigger the :reliable re-connect.
|
50
67
|
# Best to leave it on.
|
51
68
|
#
|
52
|
-
# For
|
69
|
+
# For heart-beats to work properly, you must be using Stomp protocol version 1.2 or higher.
|
53
70
|
# Tested to work with Apache Apollo.
|
54
|
-
|
71
|
+
|
55
72
|
:"accept-version" => ENV['EVENTBUS_STOMP_PROTOCOL_VERSION'] || "1.2",
|
56
73
|
:"heart-beat" => ENV['EVENTBUS_STOMP_HEARTBEAT_INTERVALS'] || '1000,1000',
|
57
74
|
},
|