use of com.swiftmq.amqp.v100.generated.transport.definitions in project swiftmq-client by iitsoftware.
the class TransactionController method discharge.
private synchronized void discharge(TxnIdIF txnId, boolean fail) throws AMQPException {
AMQPMessage msg = new AMQPMessage();
Discharge discharge = new Discharge();
discharge.setTxnId(txnId);
discharge.setFail(new AMQPBoolean(fail));
msg.setAmqpValue(new AmqpValue(discharge));
DeliveryStateIF deliveryState = producer.send(msg);
if (deliveryState instanceof Rejected) {
Rejected rejected = (Rejected) deliveryState;
com.swiftmq.amqp.v100.generated.transport.definitions.Error error = rejected.getError();
if (error != null)
throw new AMQPException(error.getValueString());
else
throw new AMQPException(("Unknown transactiom error"));
}
}
Aggregations