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
|
%% This Source Code Form is subject to the terms of the Mozilla Public
%% License, v. 2.0. If a copy of the MPL was not distributed with this
%% file, You can obtain one at https://mozilla.org/MPL/2.0/.
%%
%% Copyright (c) 2020-2022 VMware, Inc. or its affiliates. All rights reserved.
%%
-define(CLIENT_ID_MAXLEN, 23).
%% reader state
-record(state, { socket,
conn_name,
await_recv,
deferred_recv,
received_connect_frame,
connection_state,
keepalive,
keepalive_sup,
conserve,
parse_state,
proc_state,
connection,
stats_timer }).
%% processor state
-record(proc_state, { socket,
subscriptions,
consumer_tags,
unacked_pubs,
awaiting_ack,
awaiting_seqno,
message_id,
client_id,
clean_sess,
will_msg,
channels,
connection,
exchange,
adapter_info,
ssl_login_name,
%% Retained messages handler. See rabbit_mqtt_retainer_sup
%% and rabbit_mqtt_retainer.
retainer_pid,
auth_state,
send_fun,
peer_addr,
mqtt2amqp_fun,
amqp2mqtt_fun,
register_state }).
-record(auth_state, {username,
user,
vhost}).
%% does not include vhost: it is used in
%% the table name
-record(retained_message, {topic,
mqtt_msg}).
-define(INFO_ITEMS,
[host,
port,
peer_host,
peer_port,
protocol,
channels,
channel_max,
frame_max,
client_properties,
ssl,
ssl_protocol,
ssl_key_exchange,
ssl_cipher,
ssl_hash,
conn_name,
connection_state,
connection,
consumer_tags,
unacked_pubs,
awaiting_ack,
awaiting_seqno,
message_id,
client_id,
clean_sess,
will_msg,
exchange,
ssl_login_name,
retainer_pid,
user,
vhost]).
-define(MQTT_GUIDE_URL, <<"https://rabbitmq.com/mqtt.html">>).
|