[rabbitmq-discuss] sending zipped message

Mohsen Lotfizad mtlotfizad at gmail.com
Wed May 23 09:24:38 BST 2012


Hi,
I have a code like this:

                    byte[] rawBytes = serialize(trxEntities);
                    byte[] zipped = rawBytes;

                    if (shouldBeCompress) {
                        zipped = compressor.compress(rawBytes);
                    }

                    BasicProperties persistentBasic =
MessageProperties.PERSISTENT_BASIC;
                    channel.basicPublish("", queueName, persistentBasic,
zipped);

As you see some of my messages should be compress along witch some others
shouldn't.
Is there any way I could set any properties to tell the consumer that "hey!
this is a zipped message" ?

PS. does *"com.rabbitmq.client.AMQP<eclipse-javadoc:%E2%98%82=rabbitmq-java-client-src-2.8.2/lib%5C/rabbitmq-client.jar%3Ccom.rabbitmq.client%28AMQP.class%E2%98%83AMQP>
.BasicProperties<eclipse-javadoc:%E2%98%82=rabbitmq-java-client-src-2.8.2/lib%5C/rabbitmq-client.jar%3Ccom.rabbitmq.client%28AMQP$BasicProperties.class%E2%98%83BasicProperties>.BasicProperties(...,
Map<eclipse-javadoc:%E2%98%82=rabbitmq-java-client-src-2.8.2/lib%5C/rabbitmq-client.jar%3Ccom.rabbitmq.client%28AMQP$BasicProperties.class%E2%98%83BasicProperties%7EBasicProperties%7ELjava.lang.String;%7ELjava.lang.String;%7ELjava.util.Map%5C%3CLjava.lang.String;Ljava.lang.Object;%3E;%7ELjava.lang.Integer;%7ELjava.lang.Integer;%7ELjava.lang.String;%7ELjava.lang.String;%7ELjava.lang.String;%7ELjava.lang.String;%7ELjava.util.Date;%7ELjava.lang.String;%7ELjava.lang.String;%7ELjava.lang.String;%7ELjava.lang.String;%E2%98%82Map>
<String<eclipse-javadoc:%E2%98%82=rabbitmq-java-client-src-2.8.2/lib%5C/rabbitmq-client.jar%3Ccom.rabbitmq.client%28AMQP$BasicProperties.class%E2%98%83BasicProperties%7EBasicProperties%7ELjava.lang.String;%7ELjava.lang.String;%7ELjava.util.Map%5C%3CLjava.lang.String;Ljava.lang.Object;%3E;%7ELjava.lang.Integer;%7ELjava.lang.Integer;%7ELjava.lang.String;%7ELjava.lang.String;%7ELjava.lang.String;%7ELjava.lang.String;%7ELjava.util.Date;%7ELjava.lang.String;%7ELjava.lang.String;%7ELjava.lang.String;%7ELjava.lang.String;%E2%98%82String>,
Object<eclipse-javadoc:%E2%98%82=rabbitmq-java-client-src-2.8.2/lib%5C/rabbitmq-client.jar%3Ccom.rabbitmq.client%28AMQP$BasicProperties.class%E2%98%83BasicProperties%7EBasicProperties%7ELjava.lang.String;%7ELjava.lang.String;%7ELjava.util.Map%5C%3CLjava.lang.String;Ljava.lang.Object;%3E;%7ELjava.lang.Integer;%7ELjava.lang.Integer;%7ELjava.lang.String;%7ELjava.lang.String;%7ELjava.lang.String;%7ELjava.lang.String;%7ELjava.util.Date;%7ELjava.lang.String;%7ELjava.lang.String;%7ELjava.lang.String;%7ELjava.lang.String;%E2%98%82Object>>
headers, ...)"* help me? I mean could I set any parameter in
BasicProperties.header ?

-- 

Sincerely
ML
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120523/2496f9b9/attachment.htm>


More information about the rabbitmq-discuss mailing list