Skip to content

Commit 83436f3

Browse files
committed
Native (Web)STOMP
1 parent d265fdd commit 83436f3

File tree

13 files changed

+1414
-574
lines changed

13 files changed

+1414
-574
lines changed

deps/rabbitmq_stomp/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ define PROJECT_ENV
99
{passcode, <<"guest">>}]},
1010
{default_vhost, <<"/">>},
1111
{default_topic_exchange, <<"amq.topic">>},
12-
{default_nack_requeue, true},
12+
{default_nack_requeue, true},
1313
{ssl_cert_login, false},
1414
{implicit_connect, false},
1515
{tcp_listeners, [61613]},

deps/rabbitmq_stomp/include/rabbit_stomp.hrl

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,16 @@
1515

1616
-define(INFO_ITEMS,
1717
[conn_name,
18+
name,
19+
user,
1820
connection,
1921
connection_state,
2022
session_id,
21-
channel,
2223
version,
2324
implicit_connect,
2425
auth_login,
2526
auth_mechanism,
26-
peer_addr,
27+
%% peer_addr,
2728
host,
2829
port,
2930
peer_host,
@@ -42,3 +43,16 @@
4243
-define(STOMP_GUIDE_URL, <<"https://rabbitmq.com/docs/stomp">>).
4344

4445
-define(DEFAULT_MAX_FRAME_SIZE, 4 * 1024 * 1024).
46+
47+
-define(SIMPLE_METRICS,
48+
[pid,
49+
recv_oct,
50+
send_oct,
51+
reductions]).
52+
-define(OTHER_METRICS,
53+
[recv_cnt,
54+
send_cnt,
55+
send_pend,
56+
garbage_collection,
57+
state,
58+
timeout]).

deps/rabbitmq_stomp/include/rabbit_stomp_headers.hrl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,20 @@
8181
?HEADER_EXCLUSIVE,
8282
?HEADER_PERSISTENT
8383
]).
84+
85+
86+
-define(QUEUE_PREFIX, "/queue").
87+
-define(TOPIC_PREFIX, "/topic").
88+
-define(EXCHANGE_PREFIX, "/exchange").
89+
-define(AMQQUEUE_PREFIX, "/amq/queue").
90+
-define(TEMP_QUEUE_PREFIX, "/temp-queue").
91+
%% reply queues names can have slashes in the content so no further
92+
%% parsing happens.
93+
-define(REPLY_QUEUE_PREFIX, "/reply-queue/").
94+
95+
%%-------------------------------------------------
96+
97+
-define(DEST_PREFIXES, [?EXCHANGE_PREFIX, ?TOPIC_PREFIX, ?QUEUE_PREFIX,
98+
?AMQQUEUE_PREFIX, ?REPLY_QUEUE_PREFIX]).
99+
100+
-define(ALL_DEST_PREFIXES, [?TEMP_QUEUE_PREFIX | ?DEST_PREFIXES]).

deps/rabbitmq_stomp/src/rabbit_stomp.erl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
start(normal, []) ->
2929
Config = parse_configuration(),
3030
Listeners = parse_listener_configuration(),
31+
rabbit_global_counters:init([{protocol, stomp}]),
3132
Result = rabbit_stomp_sup:start_link(Listeners, Config),
3233
EMPid = case rabbit_event:start_link() of
3334
{ok, Pid} -> Pid;

0 commit comments

Comments
 (0)