Simon MacMullen
c2a3107672
Move max_hops to upstream_set.
2011-06-17 13:19:55 +01:00
Simon MacMullen
54ffd130f8
Fix a list vs binary bug around default exchanges / vhosts.
2011-06-17 12:54:46 +01:00
Simon MacMullen
b7e7019065
Remove explicit specification of the exchange
2011-06-17 12:54:24 +01:00
Simon MacMullen
c639bf7385
If we log disconnections / failed connections, we should probably log successful connections too.
2011-06-17 12:40:16 +01:00
Simon MacMullen
0beb5c72c6
If the upstream channel goes down for an intelligible reason, just log it and die quietly.
2011-06-17 12:34:36 +01:00
Simon MacMullen
6943d4bf37
Rephrase
2011-06-17 12:04:38 +01:00
Simon MacMullen
e8db3d7ae3
Update the warnings / limitations.
2011-06-17 11:58:02 +01:00
Simon MacMullen
e626a81e89
Less of an explosion when the other end cannot be contacted.
2011-06-16 18:26:02 +01:00
Simon MacMullen
aa4bb71de4
If the downstream channel is going down cleanly, don't blow up, we're likely to go down very soon anyway.
2011-06-16 18:19:23 +01:00
Simon MacMullen
54497b3e0f
Test max_hops by building a ring with three brokers.
2011-06-16 17:56:23 +01:00
Simon MacMullen
ebd5185e94
Check length of AMQP array properly.
2011-06-16 17:55:59 +01:00
Simon MacMullen
4e3c2410e3
Acknowledge dropped messages, or they'll build up forever, oops.
2011-06-16 17:55:36 +01:00
Simon MacMullen
fbeec700e9
Ignore app file properly.
2011-06-16 16:16:23 +01:00
Simon MacMullen
bda7f423a8
Simplistic max_hops. Needs testing.
2011-06-16 15:44:34 +01:00
Simon MacMullen
329fc5a787
Remove purpose argument, let bindings propagate freely.
2011-06-16 14:48:06 +01:00
Simon MacMullen
18fbdfb62e
Rename x-forwarding to x-received-from, remove protocol from it.
2011-06-16 13:23:36 +01:00
Simon MacMullen
c4b6c10a64
Essay.
2011-06-07 14:29:10 +01:00
Simon MacMullen
de9af501f1
Essay still to come, but here's a couple of comments in place to explain some bits.
2011-06-07 13:26:49 +01:00
Simon MacMullen
767555d9fc
Another attempt at explaining these, by explictly discussing how it works. Also remove the (* 1000) thing, that doesn't make things any clearer.
2011-06-06 13:28:58 +01:00
Simon MacMullen
4c2d21f879
Attempt to make docs clearer.
2011-06-06 13:07:10 +01:00
Simon MacMullen
942601b847
Update documentation for that.
2011-06-06 12:39:22 +01:00
Simon MacMullen
b9ba315033
Rename queue_expires to expires, add support for message-ttl.
2011-06-06 12:17:12 +01:00
Simon MacMullen
153be18672
Rejig the configuration to go through an additional layer of indirection so that exchange arguments can plausibly be immutable, and to get rid of the confusing merging.
...
Also fix the insidious default queue expiry that had been hiding.
2011-06-03 18:09:23 +01:00
Simon MacMullen
e1f297f875
Make all federation objects have a prefix to their name, generate a more unique nodename and allow the admin to override it.
2011-06-02 18:28:05 +01:00
Simon MacMullen
cf06cfd19a
Remove the special handling of serial being undefined, and explain why we don't care.
2011-06-02 17:55:14 +01:00
Simon MacMullen
ff943bbc75
Don't delete the upstream Q on reconnect if the downstream X is transient. I had silly ideas that that corresponded more to the semantics, but not really.
2011-06-02 17:38:34 +01:00
Simon MacMullen
6c71bcf216
If we find the serial is not defined we don't actually want to blow up, this could be normal, we're just a short-lived exchange. So instead go into a mode where the only thing we can do is stop.
2011-06-02 17:36:53 +01:00
Simon MacMullen
f8c6b0a0c2
One more instance.
2011-06-02 15:21:24 +01:00
Simon MacMullen
9f0961b181
Oops
2011-06-02 15:15:28 +01:00
Simon MacMullen
ec1bfd11e0
Move pget / set_table_value to rabbit_misc
2011-06-02 15:05:05 +01:00
Simon MacMullen
8a96385b04
"Handle" getting not_found from peek_serial (not that we can do anything, it's pretty much a sign that we're dying anyway, so lets die) + cosmetic.
2011-06-02 14:31:34 +01:00
Matthias Radestock
98b0d038e9
refactor: inline and re-arrange
2011-06-01 20:43:47 +01:00
Matthias Radestock
6a2816ea99
some refactoring and cosmetics:
...
- fewer intermediate vars
- more logical sequence of operations on connection establishment
2011-06-01 19:15:25 +01:00
Simon MacMullen
04e83ea49a
Fix the command-queuing logic. This requires a number of changes:
...
* Actually fix the logic: keep track of the next expected
serial. Queue up commands that come after it, and ignore ones
before it. Take initial value of the serial in the same tx as
we execute rabbit_binding:list_for_source.
* Introduce a function in rabbitmq-server to peek the next value
of an exchange's serial to support this.
* Make (un)binding transmission asynchronous, and note it in the
README. This is the right thing to do, but unfortunately it
means we need to insert sleep()s all over the place in the
test suite. Ah well.
* Make remove_bindings into a single message sent to each link,
rather than a bunch of (remove_binding)s.
* Make add_bindings always send a message to each link, even if
it does nothing, to eat up the serial number.
* Make the serialisation unit test actually declare exchanges.
2011-06-01 16:38:39 +01:00
Simon MacMullen
1784f7dfa4
Oops.
2011-05-31 13:51:19 +01:00
Simon MacMullen
4cd0c697e1
Add a (currently stupid) test to ensure we serialise the add / remove bindings calls properly.
2011-05-31 13:51:12 +01:00
Simon MacMullen
e7c2e90253
Move #upstream{}-munging into rabbit_federation_upstream. This increases the amount of pget copies in the world, but we'll deal with that soon.
2011-05-27 17:35:20 +01:00
Matthias Radestock
5f9f2efa39
cosmetic
2011-05-27 14:50:27 +01:00
Matthias Radestock
4e00092165
cosmetic
2011-05-27 14:36:01 +01:00
Simon MacMullen
06b9b71e62
Rearrange exports
2011-05-27 14:16:52 +01:00
Simon MacMullen
2e1de9fe2f
Post bug 24079 update
2011-05-27 13:57:30 +01:00
Simon MacMullen
24f1a4017a
Various simple / uncontroversial cleanups.
2011-05-27 13:54:05 +01:00
Simon MacMullen
80208e86f0
Merge heads
2011-05-27 13:19:18 +01:00
Simon MacMullen
faff573a89
This is not great, but necessary to run the tests on something other than an Optiplex. Still faster than many other test suites...
2011-05-27 11:57:55 +01:00
Matthias Radestock
2a13b663d7
merge heads
2011-05-27 06:21:19 +01:00
Matthias Radestock
f336da1c49
renaming refactor
2011-05-26 13:57:41 +01:00
Matthias Radestock
79167d6c76
cosmetic
2011-05-26 13:55:13 +01:00
Simon MacMullen
486600bb92
Various clarifications + list of enhancements.
2011-05-26 12:15:14 +01:00
Matthias Radestock
d4c060a586
cosmetics
...
- write funs as a single line when we can
- define funs in the same order as the exports
- only use section marker comments for clearly delineated sections,
and keep them quite coarse grained
- other minor tweaks
2011-05-26 09:57:41 +01:00
Matthias Radestock
26e0c6d625
Clarify provenance of and changes in pg2_fixed
2011-05-26 09:17:01 +01:00
Matthias Radestock
25a254da12
less will
2011-05-26 08:04:41 +01:00
Simon MacMullen
48621877bb
Typo
2011-05-19 13:17:33 +01:00
Simon MacMullen
f6ae916866
Update now that things have been merged to default
2011-05-17 14:44:00 +01:00
Simon MacMullen
5adf0b4429
This looked like an error and confused me.
2011-05-04 16:09:44 +01:00
Simon MacMullen
5027f1f564
App name has changed
2011-05-04 16:02:27 +01:00
Simon MacMullen
6b6c32bf42
Application names: rabbit_foo -> rabbitmq_foo
2011-04-13 16:02:31 +01:00
Simon MacMullen
87e333be56
Build system changes.
2011-04-12 12:18:42 +01:00
Simon MacMullen
b903cd07b0
Merge bug 23628 and update for API changes in bug 23939.
2011-04-08 17:05:38 +01:00
Simon MacMullen
804299b424
API change
2011-04-01 17:40:46 +01:00
Simon MacMullen
38374291ad
Cosmetic.
2011-04-01 14:14:29 +01:00
Simon MacMullen
ee319f74fc
Revert a605a7bde03c, of course that doesn't make sense, what if the link restarts, the bindings will be wrong.
2011-04-01 13:52:16 +01:00
Simon MacMullen
2fb9d57f18
Thread through bindings from start callback, get rid of the last use of rabbit_binding:list_for_source.
2011-04-01 12:21:18 +01:00
Simon MacMullen
c770696ab6
API changes.
2011-04-01 12:05:20 +01:00
Simon MacMullen
a288f25ee1
updating use of amqp_client exit reasons
2011-03-29 17:41:43 +01:00
Simon MacMullen
5e29f9392a
Slightly more doc.
2011-03-29 11:52:17 +01:00
Simon MacMullen
5c6900f1d1
API change.
2011-03-29 11:45:55 +01:00
Simon MacMullen
f4fd3ac4be
API change.
2011-03-28 14:18:46 +01:00
Simon MacMullen
5f36fa6d70
Fix link startup. Tests all pass again.
2011-03-28 13:17:31 +01:00
Simon MacMullen
1e38436b14
Use process groups rather than navigating the supervisor hierarchy to talk to exchange pid sets. The restart test fails, but it's Friday night.
2011-03-25 18:27:30 +00:00
Simon MacMullen
85e2ab33fd
Create a links API.
2011-03-24 12:46:20 +00:00
Simon MacMullen
6ae679b635
bug23939 API changes.
2011-03-23 14:14:02 +00:00
Simon MacMullen
6a31956637
Symmetry.
2011-03-23 12:33:06 +00:00
Simon MacMullen
ad8428d9fc
This makes tracking down bugs rather easier.
2011-03-23 12:26:14 +00:00
Simon MacMullen
1081f99586
Split up smart_unbind_test and find a way to test that unbinds get sent upstream.
2011-03-23 11:43:43 +00:00
Simon MacMullen
8f5bf686b8
A bit more general and hopefully clearer.
2011-03-23 11:33:24 +00:00
Simon MacMullen
8cb922f1c2
Refactor tests a bit.
2011-03-23 11:11:26 +00:00
Simon MacMullen
b8e63691c4
Somewhat embarassingly that's been wrong for a while. But I'm not sure what test we could use to check it that doesn't e.g. look directly at the upstream bindings. Ugh.
2011-03-22 18:01:30 +00:00
Simon MacMullen
11c8fa7b9a
The previous commit was buggy because we never added bindings. Add more test to catch that, fix it, and optimise add_binding as well.
2011-03-22 16:35:25 +00:00
Simon MacMullen
813e4d1431
Sadly that little badmatch was inaudible due to the continuous barrage of explosions.
2011-03-22 16:17:11 +00:00
Simon MacMullen
59d449e7bf
Reduce use of rabbit_binding:list_for_source/1 by keeping track ourselves of where we're at.
2011-03-22 16:05:49 +00:00
Simon MacMullen
75f6e1c4a2
serialise_events/1.
2011-03-21 12:28:29 +00:00
Simon MacMullen
2163ab4831
Simplify.
2011-03-21 11:47:30 +00:00
Simon MacMullen
3cd4b78949
Rename rabbit_federation_exchange_upstream to rabbit_federation_link.
2011-03-21 11:41:57 +00:00
Simon MacMullen
92a65e37c2
Slightly smaller, quite a lot more correct.
2011-03-21 11:31:26 +00:00
Simon MacMullen
75b2cad486
Ensure that we use Mnesia's ordering for add / remove bindings.
2011-03-18 17:44:50 +00:00
Simon MacMullen
deada309ce
Remove maybe_unbind_upstreams and push its logic into the exchange processes
2011-03-18 17:16:46 +00:00
Simon MacMullen
0923020d4f
Make sure rabbit_federation_db:forget_exchange/1 actually gets called.
2011-03-04 18:15:00 +00:00
Simon MacMullen
18bb7e00ed
That seemed to break every logging function. Pity.
2011-03-04 17:58:16 +00:00
Simon MacMullen
b337ff2ed0
Don't keep durability in the state forever, we mostly don't care.
2011-03-04 11:55:10 +00:00
Simon MacMullen
9fda27efb5
Cosmetic + comments.
2011-03-04 11:10:47 +00:00
Simon MacMullen
96ab34354e
Improve documentation again.
2011-03-04 10:43:12 +00:00
Simon MacMullen
6706a27004
Allow port to be any numeric type.
2011-03-04 10:43:03 +00:00
Simon MacMullen
f5d3229a32
Remove TODO, the issues have gone into bugzilla.
2011-03-03 17:50:05 +00:00
Simon MacMullen
63ba1f7164
Default to no prefetch count.
2011-03-03 17:29:57 +00:00
Simon MacMullen
78f2c255f1
So, err, the delivery tag map is no longer needed now that we have a one-one channel relationship.
2011-03-03 16:48:29 +00:00
Simon MacMullen
49420a7930
If we blow up while opening connections and channels, make sure we close the ones that got opened.
2011-03-03 16:30:27 +00:00
Simon MacMullen
4fd555e2c9
Name the file properly to prevent DETS auto-repair from blowing up, but handle the error if it does anyway.
2011-03-03 15:42:06 +00:00
Simon MacMullen
08caf247fc
Clean up upstream_from_table/2 substantially.
2011-03-03 15:29:00 +00:00
Simon MacMullen
56bc814d8c
Remove URIs from configuration.
2011-03-03 14:13:05 +00:00
Simon MacMullen
c8c974552e
Add protocol, fix host.
2011-03-03 12:16:47 +00:00
Simon MacMullen
6ff9b80cc4
Further pushback of URIs.
2011-03-03 12:05:20 +00:00
Simon MacMullen
b4fb8e6f18
Remove URIs from exchange_upstream.
2011-03-03 12:01:17 +00:00
Simon MacMullen
6d1b4e1a60
Make tests independent of any crazy configuration file you may have lying around.
2011-03-03 10:43:47 +00:00
Simon MacMullen
2debec04a5
Oops, forgot to add this...
2011-03-03 10:33:31 +00:00
Simon MacMullen
afe72dfc0e
It's been a long day.
2011-03-02 17:16:38 +00:00
Simon MacMullen
6fb49364ff
Handle non-guest connections locally.
2011-03-02 17:13:29 +00:00
Simon MacMullen
c5136d8538
Damn, I thought of something else.
2011-03-02 16:37:23 +00:00
Simon MacMullen
eff6725109
Configurable retry interval / queue expiry / prefetch count / heartbeat.
2011-03-02 16:29:21 +00:00
Simon MacMullen
5363229765
Use uri_parser that is now in the broker.
2011-03-02 15:09:25 +00:00
Simon MacMullen
da406e466c
Rename uri_parser as a simple way to avoid clashing with the one in rabbitmq-shovel.
2011-03-02 14:46:45 +00:00
Simon MacMullen
6db99c1f52
TODO and WARNING
2011-03-02 14:39:39 +00:00
Simon MacMullen
235223e334
Shorter names, determine if we created something by existence of a special argument.
2011-03-02 14:31:53 +00:00
Simon MacMullen
693b9b800e
Reset bindings on connect.
2011-03-02 13:13:30 +00:00
Simon MacMullen
daa1d7dbe7
Use DETS, abstract a bit.
2011-03-01 16:09:34 +00:00
Simon MacMullen
2a7945efec
More information.
2011-03-01 13:18:13 +00:00
Simon MacMullen
55d3aa399b
Tweak.
2011-03-01 13:13:53 +00:00
Simon MacMullen
65f899be4d
Tweak.
2011-03-01 13:12:15 +00:00
Simon MacMullen
c395ef1c2b
More doc, focussing on "why" rather than "how".
2011-03-01 13:09:33 +00:00
Simon MacMullen
f49355e047
Documentation.
2011-03-01 12:50:42 +00:00
Simon MacMullen
ffe8ed1074
Deal with downstream channel going down, it's trivial now.
2011-03-01 11:04:00 +00:00
Simon MacMullen
49e035243d
Fix various bugs:
...
Make supervision more correct
Make shutdown work
Fix durability in tests
2011-03-01 11:01:42 +00:00
Simon MacMullen
c3031441b1
Split up such that we have one process per (upstream, downstream) combination. This mostly works, but there's something weird with the supervision hierarchy keeping the Erlang VM alive when rabbit_federation_exchange_upstream is not temporary.
2011-02-28 18:10:01 +00:00
Simon MacMullen
119fc3e04f
Don't exclude all those non-RabbitMQ brokers supporting AMQP 0-9-1, SASL EXTERNAL and (soon) e2e bindings.
2011-02-24 13:23:10 +00:00
Simon MacMullen
944cd4993b
Support connections with alternate creds, SSL, EXTERNAL.
2011-02-24 13:19:00 +00:00
Simon MacMullen
86d41ae23e
Create the exchange process at exchange recovery. This means moving the processes / supervisor under the rabbit application, which means making them be able to run in a dumb state when the amqp_client is not yet available, which means splitting code out into a bunch of modules, etc etc.
2011-02-23 16:47:50 +00:00
Simon MacMullen
7a9b3140a8
Bah
2011-02-22 17:41:45 +00:00
Simon MacMullen
599ed44559
We only ever use exchange from the upstream properties.
2011-02-22 17:26:35 +00:00
Simon MacMullen
1cdaeef21f
Use rabbitmqctl wait
2011-02-22 17:02:15 +00:00
Simon MacMullen
24479f9ba7
TODO
2011-02-22 17:02:02 +00:00
Simon MacMullen
6a9a6e896e
Don't allow binding, unbinding or publishing loops, by the simple expedient of only allowing things to cross one hop.
2011-02-22 16:29:42 +00:00
Simon MacMullen
6c83263973
TODO
2011-02-18 17:19:00 +00:00
Simon MacMullen
5f0cd4d884
Add forwarding information in a header.
2011-02-18 16:27:12 +00:00
Simon MacMullen
40b80e9f8a
Only transmit unbinds upstream if it's the last with the same {Source, Key, Args}.
2011-02-18 13:40:10 +00:00
Simon MacMullen
cdb9c1e20d
In multiple_downstreams_test messages can arrive in any order. Deal with that and stop being racy.
2011-02-18 12:51:51 +00:00
Simon MacMullen
45f9aad9f1
Conserve vertical space.
2011-02-18 12:46:31 +00:00
Simon MacMullen
2efd415f87
Delete upstream queues when exchange is deleted. Remove childspec from supervisor when exchange is stopped.
2011-02-18 11:59:20 +00:00
Simon MacMullen
6e4d1f6d81
Validate args
2011-02-17 18:14:06 +00:00
Simon MacMullen
3bc063c990
Another use of with_disposable_channel.
2011-02-17 17:10:43 +00:00
Simon MacMullen
a3bcddc176
Delete and recreate upstream queue when creating transient exchange
2011-02-17 17:08:08 +00:00
Simon MacMullen
f756188eac
Make the static configuration more useful / flexible.
2011-02-17 16:30:13 +00:00
Simon MacMullen
fe192c1b78
TODO
2011-02-17 15:40:22 +00:00
Simon MacMullen
77fdde4bef
TODO
2011-02-17 15:37:17 +00:00
Simon MacMullen
e74bd6b923
Use acks / confirms to make sure we're never responsible for anything.
2011-02-17 15:23:48 +00:00
Simon MacMullen
6c9e11df7c
Turns out e2e just works, but let's prove that (and note that we're not completely efficient here, we send all msgs that get routed to the exchanges bound to the federation exchange, regardless of whether they get routed anywhere after that).
2011-02-17 12:49:26 +00:00
Simon MacMullen
1697acd3d1
TODO
2011-02-16 12:14:43 +00:00
Simon MacMullen
d85ca4a125
That's a binary now.
2011-02-15 18:26:50 +00:00
Simon MacMullen
5e573553ee
Handle the upstream broker going down.
2011-02-15 18:25:21 +00:00
Simon MacMullen
c1cf725a5d
Grab the port number from URLs, add a test across two brokers.
2011-02-15 14:30:42 +00:00
Simon MacMullen
8c0b0118a6
Another attempt at readable names. And no, this should not be our own URI, we don't know that.
2011-02-15 13:28:33 +00:00
Simon MacMullen
690eb40534
Revert "readable name" for the time being as it's not unique enough. And add the test that let me find that.
2011-02-15 12:28:35 +00:00
Simon MacMullen
011c19dfe1
Separate out the config based exchange tests entirely.
2011-02-15 12:15:23 +00:00
Simon MacMullen
66c2bb1d85
Don't store the backing module in the ETS table, we already have it in the args. This means we always have it, and can always call with_module(...)
2011-02-15 12:15:06 +00:00
Simon MacMullen
d2ae33229c
Use a readable queue name, and don't have it expire immediately.
2011-02-11 18:26:00 +00:00
Simon MacMullen
2b875b4c48
Improvements to shutdown.
2011-02-11 17:17:16 +00:00
Simon MacMullen
f41265b56a
TODO
2011-02-11 14:46:06 +00:00
Simon MacMullen
537f7b9c69
Multiple upstreams.
2011-02-11 14:44:37 +00:00
Simon MacMullen
1c787900eb
Be more resilient when unbinding.
2011-02-11 13:45:51 +00:00
Simon MacMullen
3b2c67075e
Refactor tests, test configuration, allow more than one federation exchange per broker(!)
2011-02-11 13:33:32 +00:00
Simon MacMullen
e8bd411781
The simplest possible test.
2011-02-11 12:06:27 +00:00
Simon MacMullen
ffe698a346
TODO
2011-02-11 11:23:43 +00:00
Simon MacMullen
6c8101b8c0
Make some attempt to assert args equivalence and remove bindings.
2011-02-10 18:16:44 +00:00
Simon MacMullen
6371fa1cd9
Rename local / remote to downstream / upstream.
2011-02-10 17:59:33 +00:00
Simon MacMullen
438df4c513
TODO
2011-02-10 17:49:01 +00:00
Simon MacMullen
da339a0513
Give the federation exchange another type of exchange to emulate. This sorta works now (we can federate a message! woo!), but in a couple of cases we need the backing module before we have it. Hmm.
2011-02-10 17:11:33 +00:00
Simon MacMullen
8f4cf84e23
The beginnings of a federation plugin. Does not work.
2011-02-10 16:26:32 +00:00