Package com.rabbitmq.client

Examples of com.rabbitmq.client.Channel.txCommit()


                            }
                            for (int j = 0; j < COMMIT_SIZE; j++) {
                                localChannel.basicPublish("", queueName, null, ("message" + t).getBytes("UTF-8"));
                            }
                            if (transactional) {
                                localChannel.txCommit();
                            }
                            localChannel.close();
                        }
                    } catch (IOException e) {
                        e.printStackTrace();
View Full Code Here


                            }
                            localChannel.txSelect();
                            for (int j = 0; j < COMMIT_SIZE; j++) {
                                localChannel.basicPublish("", queueName, null, ("message" + t).getBytes("UTF-8"));
                            }
                            localChannel.txCommit();
                            if (!channels.offer(localChannel)) {
                                localChannel.close();
                            }
                        }
                    } catch (IOException e) {
View Full Code Here

                doSendMessage(channel, amqpMessage);
            }
            if (CurrentUnitOfWork.isStarted()) {
                CurrentUnitOfWork.get().registerListener(new ChannelTransactionUnitOfWorkListener(channel));
            } else if (isTransactional) {
                channel.txCommit();
            } else if (waitForAck) {
                channel.waitForConfirmsOrDie();
            }
        } catch (IOException e) {
            if (isTransactional) {
View Full Code Here

          if (!autoAck) {
            channel.basicAck(envelope.getDeliveryTag(), false);
          }

          if (txSize != 0 && totalMsgCount % txSize == 0) {
            channel.txCommit();
          }

          now = System.currentTimeMillis();

          stats.collectStats(now, id.equals(envelope.getRoutingKey()) ? (nano - msgNano) : 0L);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.