use of com.rabbitmq.jms.admin.RMQDestination in project rabbitmq-jms-client by rabbitmq.
the class RMQSession method createTopic.
/**
* {@inheritDoc}
*/
@Override
public Topic createTopic(String topicName) throws JMSException {
illegalStateExceptionIfClosed();
RMQDestination dest = new RMQDestination(topicName, false, false);
declareTopic(dest);
return dest;
}
use of com.rabbitmq.jms.admin.RMQDestination in project rabbitmq-jms-client by rabbitmq.
the class RMQSession method createQueue.
/**
* {@inheritDoc}
*/
@Override
public Queue createQueue(String queueName) throws JMSException {
illegalStateExceptionIfClosed();
RMQDestination dest = new RMQDestination(queueName, true, false);
declareRMQQueue(dest, null, false, true);
return dest;
}
use of com.rabbitmq.jms.admin.RMQDestination in project rabbitmq-jms-client by rabbitmq.
the class AmqpPropertiesCustomiserIT method customiserIsApplied.
@Test
public void customiserIsApplied() throws Exception {
channel.queueDeclare(QUEUE_NAME, // durable
false, // exclusive
true, // autoDelete
true, // options
null);
queueConn.start();
QueueSession queueSession = queueConn.createQueueSession(false, Session.DUPS_OK_ACKNOWLEDGE);
// write-only AMQP-mapped queue
Queue queue = new RMQDestination(QUEUE_NAME, "", QUEUE_NAME, null);
QueueSender queueSender = queueSession.createSender(queue);
TextMessage message = queueSession.createTextMessage(MESSAGE);
queueSender.send(message);
queueConn.close();
GetResponse response = channel.basicGet(QUEUE_NAME, false);
assertNotNull(response, "basicGet failed to retrieve a response");
byte[] body = response.getBody();
assertNotNull(body, "body of response is null");
assertEquals(new String(body), MESSAGE, "body of response is not correct");
assertEquals(response.getProps().getContentType(), TEXT_PLAIN, "body of response is not correct");
}
Aggregations