use of com.swiftmq.amqp.v100.generated.transport.definitions.Error in project swiftmq-client by iitsoftware.
the class Link method close.
/**
* Close this link.
*
* @throws AMQPException on error
*/
public void close() throws AMQPException {
if (closed)
return;
Semaphore sem = new Semaphore();
POCloseLink po = new POCloseLink(sem, this);
mySession.getSessionDispatcher().dispatch(po);
sem.waitHere();
mySession.detach(this);
closed = true;
if (!po.isSuccess())
throw new AMQPException(po.getException());
}
use of com.swiftmq.amqp.v100.generated.transport.definitions.Error in project rabbitmq-stream-java-client by rabbitmq.
the class SwiftMqCodec method createMessage.
protected Message createMessage(byte[] data) {
AMQPMessage amqpMessage;
try {
amqpMessage = new AMQPMessage(data);
} catch (Exception e) {
throw new StreamException("Error while decoding AMQP 1.0 message");
}
Object body = extractBody(amqpMessage);
com.rabbitmq.stream.Properties properties = createProperties(amqpMessage);
Map<String, Object> applicationProperties = createApplicationProperties(amqpMessage);
Map<String, Object> messageAnnotations = createMessageAnnotations(amqpMessage);
return new SwiftMqMessage(amqpMessage, body, properties, applicationProperties, messageAnnotations);
}
Aggregations