[rabbitmq-discuss] fanout queue not working
octomeow
octomeow at gmail.com
Fri Mar 30 17:07:44 BST 2012
Hi everyone
thanks for the comments. it pointed me in the right direction
the logstash code I was using did use a routing key so even though
it's a
fanout exchange, only one queue rawlogs_consumer would get it.
Julie
On Mar 30, 5:56 am, Steve Powell <st... at rabbitmq.com> wrote:
> Dear octo,
>
> Trying to understand what queues and bindings you may have created I
> reformatted the list_bindings output you sent:
>
> Listing bindings ...
> exchange log2_consumer queue log2_consumer []
> exchange rawlogs_consumer queue rawlogs_consumer []
> rawlogsexchange log2_consumer queue []
> rawlogsexchange rawlogs_consumer queue logstash []
> ...done.
>
> The first column is theexchangename, followed by 'exchange', then the
> destination (queue) name, followed by 'queue' then the routing key, and
> lastly any arguments on the binding (you have none []).
>
> So what appears is that you have
>
> * bound log2_consumer to the default (blank)exchange(with the routing
> key set to the name of the queue -- which is normal for a direct
> exchange, which the defaultexchangeis);
>
> * bound rawlogs_consumer similarly;
>
> These two are default bindings created whenever you create a queue.
>
> Then again you have two (explicit) bindings which you have no-doubt
> created yourself:
>
> * bound log2_consumer to the rawlogsexchange, with a blank ("") routing
> key
>
> * bound rawlogs_consumer to the rawlogsexchangewith the logstash key.
>
> If rawlogs is afanoutexchangethen if you publish a message to thatexchange, both of these queues should get a copy of the message
> (regardless of what routing key you supply on the publish -- and
> regardless of the routing key used to bind the queue to thefanoutexchange).
>
> So, the obvious question is 'how did you publish those messages'?
> Supplementary: 'what do you mean "connect fine" to the queue'?
>
> I can guess that if you publish to the defaultexchange("") with
> routing key "rawlogs_consumer" you would see what you say you see, but I
> can't think how else you might see it. Certainly, if you publish to the
> "rawlogs"exchangeI would expect the message to appear on both queues.
>
> Steve Powell
> st... at rabbitmq.com
> [wrk: +44-2380-111-528] [mob: +44-7815-838-558]
>
> On 30 Mar 2012, at 01:26, octomeow wrote:
>
>
>
>
>
> > newbie to rabbitmq and I'm not getting messages into a certain queue
>
> > I have a simplefanoutexchange
> > # rabbitmqctl list_exchanges
> > rawlogsfanout
>
> > I have bound thisexchangeto a few queues
> > # rabbitmqctl list_bindings
> > Listing bindings ...
> > exchange log2_consumer queue
> > log2_consumer []
> > exchange rawlogs_consumer queue
> > rawlogs_consumer []
> > rawlogsexchange log2_consumer queue []
> > rawlogsexchange rawlogs_consumer queue
> > logstash []
> > ...done.
>
> > I connect fine to the log2_consumer queue....however, I get NO
> > messages.
>
> > my other queue..... the rawlogs_consumer does the the messges
> > _______________________________________________
> > rabbitmq-discuss mailing list
> > rabbitmq-disc... at lists.rabbitmq.com
> >https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-disc... at lists.rabbitmq.comhttps://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
More information about the rabbitmq-discuss
mailing list