<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><div>On Nov 1, 2010, at 3:17 PM, Brian Jones wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>1. &nbsp;NodeA, NodeB, and NodeC connect. All of them will be both publishers and consumers</div><div>2. Any node publishes a message</div><div>3. The other two nodes *each* receive the message</div><div>4. The publishing node *does not* receive the message.&nbsp;</div></blockquote><div><br></div>IMHO it's easier to decide whether a message is your own message or not (by setting your own name in a header) in the consumer and toss it if it is. I've done this before and it's easier than creating complicated routing rules to prevent the producer from receiving its own message, given the simplicity of fanout exchanges. It's simple and it works (my favorite! :).&nbsp;</div><div><br></div><div>Basic.Reject might also be something to look at here:&nbsp;</div><div><br></div><div><a href="http://www.rabbitmq.com/blog/2010/08/03/well-ill-let-you-go-basicreject-in-rabbitmq/">http://www.rabbitmq.com/blog/2010/08/03/well-ill-let-you-go-basicreject-in-rabbitmq/</a></div><div><br><blockquote type="cite">

<div>1. NodeA, NodeB, and NodeC connect. All of them will be both publishers and consumers</div><div>2. Any of the nodes publishes a message</div>

<div>3. Exactly one of the other nodes receives the message -- first one wins.&nbsp;</div><div>4. The publishing node *does not* receive the message.&nbsp;</div></blockquote><div><br></div><div>You'll need consumers to bind on the same queue name to get the round-robin stuff. You'll also likely want to incorporate some variation of the "throw away my own messages" or Basic.Reject scheme mentioned above.</div><div><br></div><div>FWIW- I've found it's almost always easier to deal with messages by deciding what to do with them after you've consumed them rather than by trying to prevent them from ever going to your consumers in the first place. I can also shove more messages down the pipe because it doesn't have to try and figure out whether or not to deliver a message.</div></div><div><div><div><br>Jon&nbsp;Brisbin</div><div>Portal&nbsp;Webmaster</div><div>NPC&nbsp;International,&nbsp;Inc.</div><br></div><br class="Apple-interchange-newline">
</div>
<br></div></body></html>