List of usage examples for com.rabbitmq.client Channel confirmSelect
Confirm.SelectOk confirmSelect() throws IOException;
From source file:vn.com.uet.performance.rabbitmq.MulticastParams.java
License:Open Source License
public Producer createProducer(Connection connection, Stats stats, String id) throws IOException { Channel channel = connection.createChannel(); if (producerTxSize > 0) channel.txSelect();/* ww w .j a v a 2s . c o m*/ if (confirm >= 0) channel.confirmSelect(); if (!predeclared || !exchangeExists(connection, exchangeName)) { channel.exchangeDeclare(exchangeName, exchangeType); } final Producer producer = new Producer(channel, exchangeName, id, randomRoutingKey, flags, producerTxSize, producerRateLimit, producerMsgCount, minMsgSize, timeLimit, confirm, stats); channel.addReturnListener(producer); channel.addConfirmListener(producer); return producer; }