Skip to content

Commit

Permalink
Updated to RabbitMQ v3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrisbin committed Nov 29, 2012
1 parent be088cd commit 7b2e9a5
Show file tree
Hide file tree
Showing 22 changed files with 308 additions and 318 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -5,7 +5,7 @@ This is a fork of the [official RabbitMQ/AMQP Erlang client](https://github.com/
It's meant to be included in your rebar projects in your rebar.config file:

{deps, [
{amqp_client, ".*", {git, "git://github.com/jbrisbin/amqp_client.git", {tag, "rabbitmq-2.8.2"}}}
{amqp_client, ".*", {git, "git://github.com/jbrisbin/amqp_client.git", {tag, "rabbitmq-3.0.0"}}}
]}.

The "master" branch of this port is a simple re-packaging of the rabbit_common AMQP client dependency.
Expand All @@ -16,7 +16,7 @@ To use the "community" branch in your project, which includes stricter compilati
to the version tag:

{deps, [
{amqp_client, ".*", {git, "git://github.com/jbrisbin/amqp_client.git", {tag, "rabbitmq-2.8.2-community"}}}
{amqp_client, ".*", {git, "git://github.com/jbrisbin/amqp_client.git", {tag, "rabbitmq-3.0.0-community"}}}
]}.

### License
Expand Down
8 changes: 0 additions & 8 deletions amqp_client.sublime-project

This file was deleted.

138 changes: 0 additions & 138 deletions amqp_client.sublime-workspace

This file was deleted.

34 changes: 8 additions & 26 deletions include/amqp_client.hrl
Expand Up @@ -20,16 +20,6 @@
-include_lib("rabbit_common/include/rabbit.hrl").
-include_lib("rabbit_common/include/rabbit_framing.hrl").

-define(PROTOCOL_VERSION_MAJOR, 0).
-define(PROTOCOL_VERSION_MINOR, 9).
-define(PROTOCOL_HEADER, <<"AMQP", 0, 0, 9, 1>>).
-define(PROTOCOL, rabbit_framing_amqp_0_9_1).

-define(MAX_CHANNEL_NUMBER, 65535).
-define(DEFAULT_CONSUMER, {amqp_selective_consumer, []}).

-define(PROTOCOL_SSL_PORT, (?PROTOCOL_PORT - 1)).

-record(amqp_msg, {props = #'P_basic'{}, payload = <<>>}).

-record(amqp_params_network, {username = <<"guest">>,
Expand All @@ -49,26 +39,18 @@
socket_options = []}).

-record(amqp_params_direct, {username = <<"guest">>,
password = none,
virtual_host = <<"/">>,
node = node(),
adapter_info = none,
client_properties = []}).

-record(adapter_info, {address = unknown,
port = unknown,
peer_address = unknown,
peer_port = unknown,
name = unknown,
protocol = unknown,
additional_info = []}).

-define(LOG_DEBUG(Format), error_logger:info_msg(Format)).
-define(LOG_INFO(Format, Args), error_logger:info_msg(Format, Args)).
-define(LOG_WARN(Format, Args), error_logger:warning_msg(Format, Args)).

-define(CLIENT_CAPABILITIES, [{<<"publisher_confirms">>, bool, true},
{<<"exchange_exchange_bindings">>, bool, true},
{<<"basic.nack">>, bool, true},
{<<"consumer_cancel_notify">>, bool, true}]).
-record(amqp_adapter_info, {address = unknown,
port = unknown,
peer_address = unknown,
peer_port = unknown,
name = unknown,
protocol = unknown,
additional_info = []}).

-endif.
34 changes: 34 additions & 0 deletions include/amqp_client_internal.hrl
@@ -0,0 +1,34 @@
%% The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License at
%% http://www.mozilla.org/MPL/
%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
%% License for the specific language governing rights and limitations
%% under the License.
%%
%% The Original Code is RabbitMQ.
%%
%% The Initial Developer of the Original Code is VMware, Inc.
%% Copyright (c) 2007-2012 VMware, Inc. All rights reserved.
%%

-include("amqp_client.hrl").

-define(PROTOCOL_VERSION_MAJOR, 0).
-define(PROTOCOL_VERSION_MINOR, 9).
-define(PROTOCOL_HEADER, <<"AMQP", 0, 0, 9, 1>>).
-define(PROTOCOL, rabbit_framing_amqp_0_9_1).

-define(MAX_CHANNEL_NUMBER, 65535).

-define(LOG_DEBUG(Format), error_logger:info_msg(Format)).
-define(LOG_INFO(Format, Args), error_logger:info_msg(Format, Args)).
-define(LOG_WARN(Format, Args), error_logger:warning_msg(Format, Args)).
-define(LOG_ERR(Format, Args), error_logger:error_msg(Format, Args)).

-define(CLIENT_CAPABILITIES, [{<<"publisher_confirms">>, bool, true},
{<<"exchange_exchange_bindings">>, bool, true},
{<<"basic.nack">>, bool, true},
{<<"consumer_cancel_notify">>, bool, true}]).
Binary file modified rebar
Binary file not shown.
2 changes: 1 addition & 1 deletion rebar.config
@@ -1,5 +1,5 @@
{deps, [
{rabbit_common, ".*", {git, "git://github.com/jbrisbin/rabbit_common.git", {tag, "rabbitmq-2.8.2"}}}
{rabbit_common, ".*", {git, "git://github.com/jbrisbin/rabbit_common.git", {tag, "rabbitmq-3.0.0"}}}
]}.

{erl_opts, [
Expand Down

0 comments on commit 7b2e9a5

Please sign in to comment.