Package com.rabbitmq.client.AMQP

Examples of com.rabbitmq.client.AMQP.BasicProperties


    MessageProperties messageProperties = message.getMessageProperties();
    if (mandatory) {
      messageProperties.getHeaders().put(
          PublisherCallbackChannel.RETURN_CORRELATION, this.uuid);
    }
    BasicProperties convertedMessageProperties = this.messagePropertiesConverter
        .fromMessageProperties(messageProperties, encoding);
    channel.basicPublish(exchange, routingKey, mandatory,
        convertedMessageProperties, message.getBody());
    // Check if commit needed
    if (isChannelLocallyTransacted(channel)) {
View Full Code Here


      while (true) {
        String response = null;
       
        QueueingConsumer.Delivery delivery = consumer.nextDelivery();
       
        BasicProperties props = delivery.getProperties();
        BasicProperties replyProps = new BasicProperties
                                         .Builder()
                                         .correlationId(props.getCorrelationId())
                                         .build();
       
        try {
View Full Code Here

 
  public String call(String message) throws Exception {    
    String response = null;
    String corrId = UUID.randomUUID().toString();
   
    BasicProperties props = new BasicProperties
                                .Builder()
                                .correlationId(corrId)
                                .replyTo(replyQueueName)
                                .build();
   
View Full Code Here

        int previousSent = 0;
        long previousReportTime = startTime;

        long nextSummaryTime = startTime + SUMMARY_EVERY_MS;
        byte[] message = new byte[256];
        BasicProperties props = shouldPersist() ?
                MessageProperties.MINIMAL_PERSISTENT_BASIC :
                    MessageProperties.MINIMAL_BASIC;
        for (int i = 0; i < _messageCount; i++) {
            ByteArrayOutputStream acc = new ByteArrayOutputStream();
            DataOutputStream d = new DataOutputStream(acc);
View Full Code Here

    i.close();

    Map<String, Object> headers = new HashMap<String, Object>();
    headers.put("filename", filename);
    headers.put("length", (int) f.length());
    BasicProperties props = new BasicProperties.Builder().headers(headers).build();
    ch.basicPublish(exchange, routingKey, props, body);
    System.out.println(" done.");
      }

      conn.close();
View Full Code Here

    {
        if (nextPublishSeqNo > 0) {
            unconfirmedSet.add(getNextPublishSeqNo());
            nextPublishSeqNo++;
        }
        BasicProperties useProps = props;
        if (props == null) {
            useProps = MessageProperties.MINIMAL_BASIC;
        }
        transmit(new AMQCommand(new Basic.Publish.Builder()
                                    .exchange(exchange)
View Full Code Here

            Basic.GetOk getOk = (Basic.GetOk)method;
            Envelope envelope = new Envelope(getOk.getDeliveryTag(),
                                             getOk.getRedelivered(),
                                             getOk.getExchange(),
                                             getOk.getRoutingKey());
            BasicProperties props = (BasicProperties)replyCommand.getContentHeader();
            byte[] body = replyCommand.getContentBody();
            int messageCount = getOk.getMessageCount();
            return new GetResponse(envelope, props, body, messageCount);
        } else if (method instanceof Basic.GetEmpty) {
            return null;
View Full Code Here

        fieldArray.add(123);
        table.put("A", fieldArray);
        //roundtrip of content headers
        AMQP.Queue.DeclareOk ok = channel.queueDeclare();
        String q = ok.getQueue();
        BasicProperties props = new BasicProperties(null, null, table, null,
                                                    null, null, null, null,
                                                    null, null, null, null,
                                                    null, null);
        channel.basicPublish("", q, props, "".getBytes());
        BasicProperties rProps = channel.basicGet(q, true).getProps();
        assertMapsEqual(props.getHeaders(), rProps.getHeaders());

        //sending as part of method arguments - we are relying on
        //exchange.declare ignoring the arguments table.
        channel.exchangeDeclare("x", "direct", false, false, table);
        channel.exchangeDelete("x");
View Full Code Here

        // of indication back from the server that it's caught up with us
    }

    public void publishOneInOneOutReceive(int backlogSize, int bodySize, int repeatCount, int sampleGranularity) throws IOException, InterruptedException {
        String q = "test";
        BasicProperties props = MessageProperties.MINIMAL_PERSISTENT_BASIC;
        Connection conn = newConnection();
        Channel chan = conn.createChannel();
        byte[] body = new byte[bodySize];
        List<Long> plateauSampleTimes = new ArrayList<Long>(repeatCount);
        List<Double> plateauSampleDeltas = new ArrayList<Double>(repeatCount);
View Full Code Here

        // of indication back from the server that it's caught up with us
    }

    public void publishOneInOneOutReceive(int backlogSize, int bodySize, int repeatCount, int sampleGranularity) throws IOException, InterruptedException {
        String q = "test";
        BasicProperties props = MessageProperties.MINIMAL_PERSISTENT_BASIC;
        Connection conn = newConnection();
        Channel chan = conn.createChannel();
        byte[] body = new byte[bodySize];
        List<Long> plateauSampleTimes = new ArrayList<Long>(repeatCount);
        List<Double> plateauSampleDeltas = new ArrayList<Double>(repeatCount);
View Full Code Here

TOP

Related Classes of com.rabbitmq.client.AMQP.BasicProperties

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.