Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions deps/rabbit/test/unit_amqp091_content_framing_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,7 @@ content_transcoding(_Config) ->
sequence_with_content([ClearEncoded, Op]),
sequence_with_content([ClearDecoded, Op])
end || Op <- [ClearDecoded, ClearEncoded, EnsureDecoded,
EnsureEncoded(rabbit_framing_amqp_0_9_1),
EnsureEncoded(rabbit_framing_amqp_0_8)]],
EnsureEncoded(rabbit_framing_amqp_0_9_1)]],
passed.

sequence_with_content(Sequence) ->
Expand Down
2 changes: 0 additions & 2 deletions deps/rabbit_common/codegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,6 @@ def genAmqpException(c,v,cls):
module = "rabbit_framing_amqp_%d_%d" % (spec.major, spec.minor)
if spec.revision != 0:
module = "%s_%d" % (module, spec.revision)
if module == "rabbit_framing_amqp_8_0":
module = "rabbit_framing_amqp_0_8"
print("-module(%s)." % module)
print("""-include("rabbit_framing.hrl").
-include_lib("kernel/include/logger.hrl").
Expand Down
11 changes: 2 additions & 9 deletions deps/rabbit_common/development.post.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,19 @@ CODEGEN = $(CURDIR)/codegen.py
CODEGEN_DIR ?= $(DEPS_DIR)/rabbitmq_codegen
CODEGEN_AMQP = $(CODEGEN_DIR)/amqp_codegen.py

AMQP_SPEC_JSON_FILES_0_8 = $(CODEGEN_DIR)/amqp-rabbitmq-0.8.json
AMQP_SPEC_JSON_FILES_0_9_1 = $(CODEGEN_DIR)/amqp-rabbitmq-0.9.1.json \
$(CODEGEN_DIR)/credit_extension.json

include/rabbit_framing.hrl:: $(CODEGEN) $(CODEGEN_AMQP) \
$(AMQP_SPEC_JSON_FILES_0_9_1) $(AMQP_SPEC_JSON_FILES_0_8)
include/rabbit_framing.hrl:: $(CODEGEN) $(CODEGEN_AMQP) $(AMQP_SPEC_JSON_FILES_0_9_1)
$(gen_verbose) env PYTHONPATH=$(CODEGEN_DIR) \
$(PYTHON) $(CODEGEN) --ignore-conflicts header \
$(AMQP_SPEC_JSON_FILES_0_9_1) $(AMQP_SPEC_JSON_FILES_0_8) $@
$(AMQP_SPEC_JSON_FILES_0_9_1) $@

src/rabbit_framing_amqp_0_9_1.erl:: $(CODEGEN) $(CODEGEN_AMQP) \
$(AMQP_SPEC_JSON_FILES_0_9_1)
$(gen_verbose) env PYTHONPATH=$(CODEGEN_DIR) \
$(PYTHON) $(CODEGEN) body $(AMQP_SPEC_JSON_FILES_0_9_1) $@

src/rabbit_framing_amqp_0_8.erl:: $(CODEGEN) $(CODEGEN_AMQP) \
$(AMQP_SPEC_JSON_FILES_0_8)
$(gen_verbose) env PYTHONPATH=$(CODEGEN_DIR) \
$(PYTHON) $(CODEGEN) body $(AMQP_SPEC_JSON_FILES_0_8) $@

clean:: clean-extra-sources

clean-extra-sources:
Expand Down
3 changes: 1 addition & 2 deletions deps/rabbit_common/development.pre.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
BUILD_DEPS = rabbitmq_codegen
TEST_DEPS = proper

EXTRA_SOURCES += include/rabbit_framing.hrl \
src/rabbit_framing_amqp_0_8.erl \
EXTRA_SOURCES += include/rabbit_framing.hrl \
src/rabbit_framing_amqp_0_9_1.erl

.DEFAULT_GOAL = all
Expand Down
48 changes: 0 additions & 48 deletions deps/rabbit_common/include/rabbit_framing.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@
-define(NOT_ALLOWED, 530).
-define(NOT_IMPLEMENTED, 540).
-define(INTERNAL_ERROR, 541).
-define(FRAME_OOB_METHOD, 4).
-define(FRAME_OOB_HEADER, 5).
-define(FRAME_OOB_BODY, 6).
-define(FRAME_TRACE, 7).
-define(NOT_DELIVERED, 310).
%% Method field records.
-record('basic.qos', {prefetch_size = 0, prefetch_count = 0, global = false}).
-record('basic.qos_ok', {}).
Expand Down Expand Up @@ -73,14 +68,12 @@
-record('connection.unblocked', {}).
-record('connection.update_secret', {new_secret, reason}).
-record('connection.update_secret_ok', {}).
-record('connection.redirect', {host, known_hosts = <<"">>}).
-record('channel.open', {out_of_band = <<"">>}).
-record('channel.open_ok', {channel_id = <<"">>}).
-record('channel.flow', {active}).
-record('channel.flow_ok', {active}).
-record('channel.close', {reply_code, reply_text = <<"">>, class_id, method_id}).
-record('channel.close_ok', {}).
-record('channel.alert', {reply_code, reply_text = <<"">>, details = []}).
-record('access.request', {realm = <<"/data">>, exclusive = false, passive = true, active = true, write = true, read = true}).
-record('access.request_ok', {ticket = 1}).
-record('exchange.declare', {ticket = 0, exchange, type = <<"direct">>, passive = false, durable = false, auto_delete = false, internal = false, nowait = false, arguments = []}).
Expand Down Expand Up @@ -109,42 +102,6 @@
-record('tx.rollback_ok', {}).
-record('confirm.select', {nowait = false}).
-record('confirm.select_ok', {}).
-record('file.qos', {prefetch_size = 0, prefetch_count = 0, global = false}).
-record('file.qos_ok', {}).
-record('file.consume', {ticket = 1, queue = <<"">>, consumer_tag = <<"">>, no_local = false, no_ack = false, exclusive = false, nowait = false}).
-record('file.consume_ok', {consumer_tag}).
-record('file.cancel', {consumer_tag, nowait = false}).
-record('file.cancel_ok', {consumer_tag}).
-record('file.open', {identifier, content_size}).
-record('file.open_ok', {staged_size}).
-record('file.stage', {}).
-record('file.publish', {ticket = 1, exchange = <<"">>, routing_key = <<"">>, mandatory = false, immediate = false, identifier}).
-record('file.return', {reply_code = 200, reply_text = <<"">>, exchange, routing_key}).
-record('file.deliver', {consumer_tag, delivery_tag, redelivered = false, exchange, routing_key, identifier}).
-record('file.ack', {delivery_tag = 0, multiple = false}).
-record('file.reject', {delivery_tag, requeue = true}).
-record('stream.qos', {prefetch_size = 0, prefetch_count = 0, consume_rate = 0, global = false}).
-record('stream.qos_ok', {}).
-record('stream.consume', {ticket = 1, queue = <<"">>, consumer_tag = <<"">>, no_local = false, exclusive = false, nowait = false}).
-record('stream.consume_ok', {consumer_tag}).
-record('stream.cancel', {consumer_tag, nowait = false}).
-record('stream.cancel_ok', {consumer_tag}).
-record('stream.publish', {ticket = 1, exchange = <<"">>, routing_key = <<"">>, mandatory = false, immediate = false}).
-record('stream.return', {reply_code = 200, reply_text = <<"">>, exchange, routing_key}).
-record('stream.deliver', {consumer_tag, delivery_tag, exchange, queue}).
-record('dtx.select', {}).
-record('dtx.select_ok', {}).
-record('dtx.start', {dtx_identifier}).
-record('dtx.start_ok', {}).
-record('tunnel.request', {meta_data}).
-record('test.integer', {integer_1, integer_2, integer_3, integer_4, operation}).
-record('test.integer_ok', {result}).
-record('test.string', {string_1, string_2, operation}).
-record('test.string_ok', {result}).
-record('test.table', {table, integer_op, string_op}).
-record('test.table_ok', {integer_result, string_result}).
-record('test.content', {}).
-record('test.content_ok', {content_checksum}).
%% Class property records.
-record('P_basic', {content_type, content_encoding, headers, delivery_mode, priority, correlation_id, reply_to, expiration, message_id, timestamp, type, user_id, app_id, cluster_id}).
-record('P_connection', {}).
Expand All @@ -154,8 +111,3 @@
-record('P_queue', {}).
-record('P_tx', {}).
-record('P_confirm', {}).
-record('P_file', {content_type, content_encoding, headers, priority, reply_to, message_id, filename, timestamp, cluster_id}).
-record('P_stream', {content_type, content_encoding, headers, priority, timestamp}).
-record('P_dtx', {}).
-record('P_tunnel', {headers, proxy_name, data_name, durable, broadcast}).
-record('P_test', {}).
3 changes: 1 addition & 2 deletions deps/rabbit_common/src/rabbit_command_assembler.erl
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
-export_type([frame/0]).

-type frame_type() :: ?FRAME_METHOD | ?FRAME_HEADER | ?FRAME_BODY |
?FRAME_OOB_METHOD | ?FRAME_OOB_HEADER | ?FRAME_OOB_BODY |
?FRAME_TRACE | ?FRAME_HEARTBEAT.
?FRAME_HEARTBEAT.
-type protocol() :: rabbit_framing:protocol().
-type method() :: rabbit_framing:amqp_method_record().
-type class_id() :: rabbit_framing:amqp_class_id().
Expand Down
5 changes: 2 additions & 3 deletions deps/rabbit_common/src/rabbit_framing.erl
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@
amqp_method_field_name/0, amqp_property_record/0,
amqp_exception/0, amqp_exception_code/0, amqp_class_id/0]).

-type protocol() :: 'rabbit_framing_amqp_0_8' | 'rabbit_framing_amqp_0_9_1'.
-type protocol() :: 'rabbit_framing_amqp_0_9_1'.

-define(protocol_type(T), type(T :: rabbit_framing_amqp_0_8:T |
rabbit_framing_amqp_0_9_1:T)).
-define(protocol_type(T), type(T :: rabbit_framing_amqp_0_9_1:T)).

-?protocol_type(amqp_field_type()).
-?protocol_type(amqp_property_type()).
Expand Down
Loading
Loading