[rabbitmq-discuss] Queued file transfer with many writers and many readers using the Java client

Dimitar Bakardzhiev dimitar.bakardzhiev at rexintegra.com
Mon Aug 18 07:48:17 BST 2008


We would like to use RabbitMQ for a Queued file transfer with many 
writers and many readers using the Java client.
We are not that familiar with AMQP yet and try to use the examples part 
of the Java client binary distribution for a start.

Unfortunately there is no example showing how to use all methods from 
File class especially such very nice sounding methods such as Cancel, 
Return, QoS.
Both FileProducer and FileConsumer examples make no use of File class 
methods but only Basic class Publish.

Here is the code we think will work for reliable file transfer, but the 
usage of transmit(AMQPChannel ) methods is not right and we are 
wondering waht the proper usage should be:

    public void filePublish(int ticket, String exchange, String routingKey,
            boolean mandatory, boolean immediate, FileProperties props,
            byte[] body,String identifier,Channel channel) throws 
IOException {
        FileProperties useProps = props;
        if (props == null) {
            useProps = new FileProperties();
        }
        File.Publish publish = new File.Publish(ticket, exchange, 
routingKey,
                mandatory, immediate,identifier);
        AMQCommand command = new AMQCommand(publish, useProps, body);

        command.transmit(channel);??????????????????????????
    }
   
It will help us start using RabitMQ sooner if we can get some examples 
of how to use File class methods in Java client.
   
Can somebody help?
-- 

Dimitar Bakardzhiev

Managing Partner
RexIntegra Ltd.
Phone: +359 2 9711324
Mobile: +359 899 126 315
View Dimitar Bakardzhiev's profile on LinkedIn 
<http://www.linkedin.com/in/dimitarbakardzhiev>
www.rexintegra.com <http://www.rexintegra.com>

------------------------------------------------------------------------

This e-mail and its attachments may contain RexIntegra Ltd. proprietary 
information, which is PRIVILEGED, CONFIDENTIAL, or subject to COPYRIGHT 
belonging to RexIntegra Ltd. This e-mail is intended solely for the use 
of the individual or entity to which it is addressed. If you are not the 
intended recipient of this e-mail, or the employee or agent responsible 
for delivering this e-mail to the intended recipient, you are hereby 
notified that any dissemination, distribution, copying, or action taken 
in relation to the contents of and attachments to this e-mail is 
STRICTLY PROHIBITED and may be UNLAWFUL. If you have received this 
e-mail in error, please notify the sender immediately and permanently 
delete the original and any copy of this e-mail and any printout. Thank 
you.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20080818/ee51bf72/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: btn_profile_greytxt_80x15.gif
Type: image/gif
Size: 384 bytes
Desc: not available
Url : http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20080818/ee51bf72/attachment.gif 


More information about the rabbitmq-discuss mailing list