[rabbitmq-discuss] RabbitMQ/AMQP understanding
0x6e6562 at gmail.com
Fri Aug 22 22:11:26 BST 2008
On Fri, Aug 22, 2008 at 9:17 PM, Torben Hoffmann
<torben.lehoff at googlemail.com> wrote:
> My plan is to use Erlang for the consumers since they have to deal with a
> very concise protocol so pattern matching and bit strings is just what the
> doctor ordered!
> The specific behaviour I am looking for is that when a message arrives in a
> queue that a consumer is tied to that message will be sent to the consumer
> directly (this is what I meant by interrupt-like) instead of having to
> program the consumer to look in the queue for a message ever so often to see
> if there is something for it (this is what I meant by polling).
> The reason I am asking this is two-fold:
> Polling with most likely slow down the system if I have a lot of consumers
> looking for a message ever so often. This will be bad since some of the
> message scenarios has the contraint that all members in a group must be able
> to receive data on a separate medium within 500 ms. This constraint applies
> to all sizes of our system - even nationwide systems - so time should not be
> wasted anywhere.
> I have just completed a project in Erlang where I was forced to set up a
> polling mechanism to get messages from an embedded server running on a
> communications card we had to use. I hated and still hate that solution
> since the polling is a fix to a problem that fits a more interrupt-like
> behaviour a lot better.
The Erlang client for AMQP, as any other spec compliant client, is
capable of subscribing to a queue in order to be notified of the
delivery of new messages.
If you do intend to use RabbitMQ as your AMQP broker, you will be able
to benefit from the direct Erlang client.
This has the exact same API as the TCP client, the difference is that
it can co-located in the same Erlang VM, thus saving marshalling and
So application code can use the Erlang client in a location
transparent fashion - either remote via TCP or embedded in the same
More information about the rabbitmq-discuss