Java Code Examples for com.rabbitmq.client.MessageProperties#PERSISTENT_BASIC

The following examples show how to use com.rabbitmq.client.MessageProperties#PERSISTENT_BASIC . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LocalMessageQueue.java    From elasticactors with Apache License 2.0 5 votes vote down vote up
private AMQP.BasicProperties createProps(InternalMessage message) {
    if(message.getTimeout() < 0) {
        return message.isDurable() ? MessageProperties.PERSISTENT_BASIC : MessageProperties.BASIC;
    } else {
        if(message.isDurable()) {
            return new AMQP.BasicProperties.Builder().contentType("application/octet-stream").deliveryMode(2)
                    .priority(0).expiration(String.valueOf(message.getTimeout())).build();
        } else {
            return new AMQP.BasicProperties.Builder().contentType("application/octet-stream").deliveryMode(1)
                    .priority(0).expiration(String.valueOf(message.getTimeout())).build();
        }
    }
}
 
Example 2
Source File: RemoteMessageQueue.java    From elasticactors with Apache License 2.0 5 votes vote down vote up
private AMQP.BasicProperties createProps(InternalMessage message) {
    if(message.getTimeout() < 0) {
        return message.isDurable() ? MessageProperties.PERSISTENT_BASIC : MessageProperties.BASIC;
    } else {
        if(message.isDurable()) {
            return new AMQP.BasicProperties.Builder().contentType("application/octet-stream").deliveryMode(2)
                    .priority(0).expiration(String.valueOf(message.getTimeout())).build();
        } else {
            return new AMQP.BasicProperties.Builder().contentType("application/octet-stream").deliveryMode(1)
                    .priority(0).expiration(String.valueOf(message.getTimeout())).build();
        }
    }
}
 
Example 3
Source File: LocalMessageQueue.java    From elasticactors with Apache License 2.0 5 votes vote down vote up
private AMQP.BasicProperties createProps(InternalMessage message) {
    if(message.getTimeout() < 0) {
        return message.isDurable() ? MessageProperties.PERSISTENT_BASIC : MessageProperties.BASIC;
    } else {
        if(message.isDurable()) {
            return new AMQP.BasicProperties.Builder().contentType("application/octet-stream").deliveryMode(2)
                    .priority(0).expiration(String.valueOf(message.getTimeout())).build();
        } else {
            return new AMQP.BasicProperties.Builder().contentType("application/octet-stream").deliveryMode(1)
                    .priority(0).expiration(String.valueOf(message.getTimeout())).build();
        }
    }
}
 
Example 4
Source File: RemoteMessageQueue.java    From elasticactors with Apache License 2.0 5 votes vote down vote up
private AMQP.BasicProperties createProps(InternalMessage message) {
    if(message.getTimeout() < 0) {
        return message.isDurable() ? MessageProperties.PERSISTENT_BASIC : MessageProperties.BASIC;
    } else {
        if(message.isDurable()) {
            return new AMQP.BasicProperties.Builder().contentType("application/octet-stream").deliveryMode(2)
                    .priority(0).expiration(String.valueOf(message.getTimeout())).build();
        } else {
            return new AMQP.BasicProperties.Builder().contentType("application/octet-stream").deliveryMode(1)
                    .priority(0).expiration(String.valueOf(message.getTimeout())).build();
        }
    }
}