[rabbitmq-discuss] Help defining appropriate queue model

Michael Bridgen mikeb at rabbitmq.com
Thu Mar 3 12:58:54 GMT 2011


On 03/03/2011 11:20 AM, Fabio Margarido wrote:
> On Wed, Mar 2, 2011 at 22:02, Michael Bridgen<mikeb at rabbitmq.com>  wrote:
>> The rabbitmq-lvc-plugin gives you an exchange type that acts like a direct
>> exchange; but when you bind a queue, the queue gets the most recent message
>> for the binding key given before being routed new messages.
>>
>> http://github.com/squaremo/rabbitmq-lvc-plugin
>
> This sounds really interesting. Is this the plugin Alister and Alexis
> were talking about?

I think so, although I'm surprised Alexis didn't know its name ..

> Is it actively developed (or considered
> feature-complete) and considered stable?

Nope; have a look at the README -- 
https://github.com/squaremo/rabbitmq-lvc-plugin/blob/master/README.md

It's labeled "experimental", though it's dead simple and there are few 
moving parts.  The biggest limitation you may face, *may* face, is that 
it's not written to be hugely scalable -- it just does the simplest 
thing possible.

I've uploaded an ez on github, which you can drop into 
rabbitmq-server/plugins/; it should work with v2.3.1 and default branch. 
  It'll be easier than compiling it yourself.

> I've tried to get it up and running to give it a try but I'm stuck.
> Following the build instructions in the github page led to the
> following error when I ran (cd ../rabbitmq-erlang-client ; make clean
> &&  make):
>
> escript ../rabbitmq-server/generate_deps deps.mk ebin
> escript: exception error: no function clause matching
>                   generate_deps__escript__1299__149734__266135:main(["deps.mk",
>                                                                      "ebin"])
>    in function  escript:run/2
>    in call from escript:start/1
>    in call from init:start_it/1
>    in call from init:start_em/1
> sed -e 's:%%VSN%%:0.0.0:g'<  rabbit_common.app.in>  rabbit_common.app
> mkdir -p dist
> rm -f dist/rabbit_common.ez
> make -C ../rabbitmq-server
> make: *** [dist/rabbit_common.ez] Error 2

Hmm. I thought that build problem had been eradicated.  Maybe it's 
because of the old branch.

> If I skip these steps:
>
> (cd rabbitmq-server ; hg up -C bug22169 ; make -j)
> (cd ../rabbitmq-erlang-client ; make clean&&  make)

Oh -- you don't need to compile to a particular branch any more.  I've 
fixed the README.

> This is the error I get when trying to compile the plugin:
>
> ERL_LIBS=build/deps:deps erlc -I include -o ebin -Wall +debug_info -pa
> ebin src/rabbit_exchange_type_lvc.erl
> src/rabbit_exchange_type_lvc.erl:21: field routing_key undefined in
> record basic_message
> src/rabbit_exchange_type_lvc.erl:27: variable 'RK' is unbound
> make: *** [ebin/rabbit_exchange_type_lvc.beam] Error 1

That's a consequence of the problem with compiling 
rabbitmq-erlang-client, above.


Michael


More information about the rabbitmq-discuss mailing list