Skip to content

Commit

Permalink
Merge branch 'master' into rabbitmq-server-500
Browse files Browse the repository at this point in the history
Conflicts:
	src/rabbit_control_main.erl
	src/rabbit_types.erl
  • Loading branch information
michaelklishin committed Mar 30, 2016
2 parents b1ec9f3 + 704a2b5 commit 71e2710
Show file tree
Hide file tree
Showing 48 changed files with 3,643 additions and 871 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@
cover/
debug/
deps/
debug/
doc/
ebin/
etc/
logs/
plugins/

PACKAGES/

rabbit.d

# Generated sources files.
Expand Down Expand Up @@ -43,3 +46,5 @@ rabbitmq-server-*.zip
# Tracing tools
*-ttb
*.ti

PACKAGES/*
12 changes: 10 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
sudo: false
services:
- docker
language: erlang
notifications:
email:
Expand All @@ -11,14 +13,20 @@ otp_release:
- "R16B03-1"
- "17.5"
- "18.0"
env:
matrix:
- GROUP=1 GROUP=2

# The checkout made by Travis is a "detached HEAD". We switch back
# to a tag or a branch. This pleases our git_rmq fetch method in
# rabbitmq-components.mk and the proper tag/branch is selected in
# dependencies too.
before_script: (test "$TRAVIS_TAG" && git checkout "$TRAVIS_TAG") || (test "$TRAVIS_BRANCH" && git checkout "$TRAVIS_BRANCH")
before_script:
- ([ "${GROUP}" = "1" ] && ((test "$TRAVIS_TAG" && git checkout "$TRAVIS_TAG") || (test "$TRAVIS_BRANCH" && git checkout "$TRAVIS_BRANCH")) || /bin/true)

script: travis_wait make tests
script:
- ([ "${GROUP}" = "1" ] && travis_wait make tests)
- ([ "${GROUP}" = "2" ] && sh ./scripts/travis_test_ocf_ra.sh)

cache:
apt: true
24 changes: 14 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ $(TARGETS_IN_RABBITMQ_TEST): $(ERLANG_MK_RECURSIVE_TEST_DEPS_LIST) \
grep -E '^xmlto version 0\.0\.([0-9]|1[1-8])$$' >/dev/null || \
opt='--stringparam man.indent.verbatims=0' ; \
xsltproc --novalid $(DOCS_DIR)/examples-to-end.xsl $< > $<.tmp && \
(xmlto -o $(DOCS_DIR) $$opt man $< 2>&1 | (grep -qv '^Note: Writing' || :)) && \
xmlto -vv -o $(DOCS_DIR) $$opt man $< 2>&1 | (grep -v '^Note: Writing' || :) && \
test -f $@ && \
rm $<.tmp

# Use tmp files rather than a pipeline so that we get meaningful errors
Expand Down Expand Up @@ -336,15 +337,17 @@ SCRIPTS = rabbitmq-defaults \
rabbitmq-env \
rabbitmq-server \
rabbitmqctl \
rabbitmq-plugins
rabbitmq-plugins \
cuttlefish

WINDOWS_SCRIPTS = rabbitmq-defaults.bat \
rabbitmq-echopid.bat \
rabbitmq-env.bat \
rabbitmq-plugins.bat \
rabbitmq-server.bat \
rabbitmq-service.bat \
rabbitmqctl.bat
rabbitmqctl.bat \
cuttlefish

UNIX_TO_DOS ?= todos

Expand All @@ -355,7 +358,7 @@ install: install-erlapp install-scripts

install-erlapp: dist
$(verbose) mkdir -p $(DESTDIR)$(RMQ_ERLAPP_DIR)
$(inst_verbose) cp -r include ebin plugins LICENSE* INSTALL \
$(inst_verbose) cp -r include ebin plugins priv LICENSE* INSTALL \
$(DESTDIR)$(RMQ_ERLAPP_DIR)
$(verbose) echo "Put your EZs here and use rabbitmq-plugins to enable them." \
> $(DESTDIR)$(RMQ_ERLAPP_DIR)/plugins/README
Expand Down Expand Up @@ -385,18 +388,18 @@ install-man: manpages
$(inst_verbose) sections=$$(ls -1 docs/*.[1-9] \
| sed -E 's/.*\.([1-9])$$/\1/' | uniq | sort); \
for section in $$sections; do \
mkdir -p $(DESTDIR)$(MANDIR)/man$$section; \
for manpage in $(DOCS_DIR)/*.$$section; do \
gzip < $$manpage \
mkdir -p $(DESTDIR)$(MANDIR)/man$$section; \
for manpage in $(DOCS_DIR)/*.$$section; do \
gzip < $$manpage \
> $(DESTDIR)$(MANDIR)/man$$section/$$(basename $$manpage).gz; \
done; \
done
done; \
done

install-windows: install-windows-erlapp install-windows-scripts install-windows-docs

install-windows-erlapp: dist
$(verbose) mkdir -p $(DESTDIR)$(WINDOWS_PREFIX)
$(inst_verbose) cp -r include ebin plugins LICENSE* INSTALL \
$(inst_verbose) cp -r include ebin plugins priv LICENSE* INSTALL \
$(DESTDIR)$(WINDOWS_PREFIX)
$(verbose) echo "Put your EZs here and use rabbitmq-plugins.bat to enable them." \
> $(DESTDIR)$(WINDOWS_PREFIX)/plugins/README.txt
Expand Down Expand Up @@ -449,3 +452,4 @@ package-rpm-suse package-windows package-standalone-macosx \
package-generic-unix: $(PACKAGES_SOURCE_DIST_FILE)
$(verbose) $(MAKE) -C packaging $@ \
SOURCE_DIST_FILE=$(abspath $(PACKAGES_SOURCE_DIST_FILE))

4 changes: 4 additions & 0 deletions docs/README-for-packages
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ An example configuration file is provided in the same directory as
this README. Copy it to /etc/rabbitmq/rabbitmq.config to use it. The
RabbitMQ server must be restarted after changing the configuration
file.

An example policy file for HA queues is provided in the same directory
as this README. Copy and chmod +x it to
/usr/local/sbin/set_rabbitmq_policy to use it with the Pacemaker OCF RA.
109 changes: 109 additions & 0 deletions docs/advanced.config.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
[


%% ----------------------------------------------------------------------------
%% Advanced Erlang Networking/Clustering Options.
%%
%% See http://www.rabbitmq.com/clustering.html for details
%% ----------------------------------------------------------------------------
%% Sets the net_kernel tick time.
%% Please see http://erlang.org/doc/man/kernel_app.html and
%% http://www.rabbitmq.com/nettick.html for further details.
%%
%% {kernel, [{net_ticktime, 60}]},
%% ----------------------------------------------------------------------------
%% RabbitMQ Shovel Plugin
%%
%% See http://www.rabbitmq.com/shovel.html for details
%% ----------------------------------------------------------------------------

{rabbitmq_shovel,
[{shovels,
[%% A named shovel worker.
%% {my_first_shovel,
%% [

%% List the source broker(s) from which to consume.
%%
%% {sources,
%% [%% URI(s) and pre-declarations for all source broker(s).
%% {brokers, ["amqp://user:password@host.domain/my_vhost"]},
%% {declarations, []}
%% ]},

%% List the destination broker(s) to publish to.
%% {destinations,
%% [%% A singular version of the 'brokers' element.
%% {broker, "amqp://"},
%% {declarations, []}
%% ]},

%% Name of the queue to shovel messages from.
%%
%% {queue, <<"your-queue-name-goes-here">>},

%% Optional prefetch count.
%%
%% {prefetch_count, 10},

%% when to acknowledge messages:
%% - no_ack: never (auto)
%% - on_publish: after each message is republished
%% - on_confirm: when the destination broker confirms receipt
%%
%% {ack_mode, on_confirm},

%% Overwrite fields of the outbound basic.publish.
%%
%% {publish_fields, [{exchange, <<"my_exchange">>},
%% {routing_key, <<"from_shovel">>}]},

%% Static list of basic.properties to set on re-publication.
%%
%% {publish_properties, [{delivery_mode, 2}]},

%% The number of seconds to wait before attempting to
%% reconnect in the event of a connection failure.
%%
%% {reconnect_delay, 2.5}

%% ]} %% End of my_first_shovel
]}
%% Rather than specifying some values per-shovel, you can specify
%% them for all shovels here.
%%
%% {defaults, [{prefetch_count, 0},
%% {ack_mode, on_confirm},
%% {publish_fields, []},
%% {publish_properties, [{delivery_mode, 2}]},
%% {reconnect_delay, 2.5}]}
]},

{rabbitmq_auth_backend_ldap, [
%%
%% Authorisation
%% =============
%%

%% The LDAP plugin can perform a variety of queries against your
%% LDAP server to determine questions of authorisation. See
%% http://www.rabbitmq.com/ldap.html#authorisation for more
%% information.

%% Set the query to use when determining vhost access
%%
%% {vhost_access_query, {in_group,
%% "ou=${vhost}-users,ou=vhosts,dc=example,dc=com"}},

%% Set the query to use when determining resource (e.g., queue) access
%%
%% {resource_access_query, {constant, true}},

%% Set queries to determine which tags a user has
%%
%% {tag_queries, []}
]}
].



17 changes: 17 additions & 0 deletions docs/rabbitmq-server.service.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# systemd unit example
[Unit]
Description=RabbitMQ broker
After=syslog.target network.target

[Service]
Type=notify
User=rabbitmq
Group=rabbitmq
NotifyAccess=all
TimeoutStartSec=3600
WorkingDirectory=/var/lib/rabbitmq
ExecStart=/usr/lib/rabbitmq/bin/rabbitmq-server
ExecStop=/usr/lib/rabbitmq/bin/rabbitmqctl stop

[Install]
WantedBy=multi-user.target
Loading

0 comments on commit 71e2710

Please sign in to comment.