Example usage for com.rabbitmq.client.impl Frame fieldValueSize

List of usage examples for com.rabbitmq.client.impl Frame fieldValueSize

Introduction

In this page you can find the example usage for com.rabbitmq.client.impl Frame fieldValueSize.

Prototype

private static long fieldValueSize(Object value) throws UnsupportedEncodingException 

Source Link

Document

Computes the AMQP wire-protocol length of a protocol-encoded field-value.

Usage

From source file:org.springframework.integration.amqp.AmqpOutboundEndpoint.java

License:Apache License

protected boolean includeMessageHeader(String headerName, Object headerValue) {
    boolean isHeaderSupported = false;
    try {/*from   w  w w.  ja  va 2s  .c o m*/
        Frame.fieldValueSize(headerValue);
        isHeaderSupported = true;
    } catch (Exception e) {
        // Frame.fieldValueSize throws an exception for invalid header value types
    }
    return isHeaderSupported;
}