<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
Hi,<br>
<br>
To answer 1:<br>
A setup I could imagine would be to have a "work queue", in which
each message would consist of a file identifier and a queue name.
Your servers can pick up jobs from this queue in a round-robin
fashion. Whenever you want to send a new file with your clients, you
first declare a new queue for your file (let's call it "file
queue"), and then publish a message to the "work queue" mentioned
above (with the name of the "file queue"). Then you continue
publishing bits of the file to the "file queue". The servers that
serve a job from the "work queue" would subscribe to the "file
queue", whose name was picked up from the job's message.<br>
<br>
And to answer 2:<br>
RabbitMQ guarantees ordering of the messages, as long as the
messages in question follow the exact same path through the clients
and the broker (same publisher, same exchange, same queue and same
consumer). With the setup described above, you should be good to go
without extra identifiers.<br>
<br>
Hope that makes sense,<br>
Vlad.<br>
<br>
<br>
On 03/08/2011 09:52 PM, asaf david wrote:
<blockquote
cite="mid:25859673.87.1299621124348.JavaMail.geo-discussion-forums@yqiz8"
type="cite">hello
<div>I'm a RabbitMQ beginner. I need to handle a case where
several clients can produce files for processing, which should
be done in some servers. I've realized there is no native
support for files transfers, so I'm going to chunk a produced
file to many small messages are transfer them (similar to the
answer given <a moz-do-not-send="true"
href="https://groups.google.com/d/msg/rabbitmq-discuss/-G39l-JJtp4/OTSd9FUJdfEJ">here</a>),
and reassemble them to a whole file at the server. However there
are two points i'm not sure about:</div>
<div>
<ol>
<li>How do i make sure that different messages that belong to
the same file won't end up in different servers? I want a
fair dispatching between the servers on a per-file base, not
per-message</li>
<li>How do I make sure that messages won't be reordered?
should i attach an identifier to each message to mark it's
location in the original file?</li>
</ol>
<div>thanks in advance :)</div>
</div>
<div><br>
</div>
<pre wrap=""><fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
rabbitmq-discuss mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a>
<a class="moz-txt-link-freetext" href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a>
</pre>
</blockquote>
</body>
</html>